0.2.3 • Published 1 month ago
@stacksleuth/redis-agent v0.2.3
@stacksleuth/redis-agent
StackSleuth Redis Agent
🚀 What is StackSleuth Redis Agent?
Advanced Redis performance monitoring agent - Command-level tracking, memory usage analysis, connection pooling optimization, slow query detection, and real-time cache performance metrics.
✨ Key Features
- 🔴 Command-level Tracking: Individual Redis command performance
- 💾 Memory Usage Analysis: Redis memory optimization insights
- 🔗 Connection Pool Monitoring: Connection efficiency tracking
- 🐌 Slow Query Detection: Automatic slow command identification
- 📊 Cache Hit/Miss Metrics: Cache performance optimization
- 🔄 Real-time Monitoring: Live Redis performance insights
- ⚡ Multiple Client Support: Redis, ioredis, node_redis support
- 🎯 Custom Metrics: Application-specific Redis monitoring
📦 Installation
npm install @stacksleuth/redis-agent
yarn add @stacksleuth/redis-agent
pnpm add @stacksleuth/redis-agent
🏁 Quick Start
import Redis from 'ioredis';
import { RedisAgent } from '@stacksleuth/redis-agent';
// Initialize Redis client
const redis = new Redis({
host: 'localhost',
port: 6379
});
// Initialize Redis agent
const agent = new RedisAgent({
enabled: true,
monitorCommands: true,
trackMemory: true,
slowQueryThreshold: 100 // ms
});
// Start monitoring
agent.startMonitoring();
// Instrument Redis client
agent.instrumentClient(redis);
// Your Redis operations are now monitored
await redis.set('key', 'value');
const value = await redis.get('key');
📚 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