0.2.3 • Published 1 month ago
@stacksleuth/backend-agent v0.2.3
@stacksleuth/backend-agent
StackSleuth Backend Agent
🚀 What is StackSleuth Backend Agent?
Comprehensive backend performance monitoring agent for Node.js applications - HTTP request tracing, database query optimization, memory profiling, and real-time metrics collection with WebSocket integration.
✨ Key Features
- 🚀 HTTP Request Monitoring: Automatic request/response tracking
- 📊 Database Query Optimization: Real-time query performance analysis
- 💾 Memory Profiling: Advanced memory leak detection and optimization
- 🔄 Real-time Metrics: Live performance data with WebSocket integration
- 🎯 Custom Middleware: Easy integration with existing applications
- 📈 Performance Analytics: Comprehensive performance data collection
- 🔧 Framework Agnostic: Works with Express, Koa, Fastify, and more
- ⚡ Production Ready: Minimal overhead, battle-tested implementation
📦 Installation
npm install @stacksleuth/backend-agent
yarn add @stacksleuth/backend-agent
pnpm add @stacksleuth/backend-agent
🏁 Quick Start
import express from 'express';
import { BackendAgent } from '@stacksleuth/backend-agent';
const app = express();
const agent = new BackendAgent({
enabled: true,
sampleRate: 0.1
});
// Start monitoring
agent.startMonitoring();
// Middleware integration
app.use(agent.middleware());
app.get('/api/users', async (req, res) => {
// Your route logic
const users = await User.find();
res.json(users);
});
app.listen(3000, () => {
console.log('Server running with StackSleuth monitoring');
});
📚 Resources
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
📄 License
MIT License - see the LICENSE file for details.
Website • Documentation • NPM Registry • GitHub
Made with ⚡ by StackSleuth