@tachyonlabs/queuesight-bullmq
v0.1.0
Published
QueueSight BullMQ monitoring SDK
Maintainers
Readme
QueueSight SDK
QueueSight SDK provides observability for BullMQ queues.
It captures job lifecycle events and sends them to QueueSight for monitoring, debugging, and analysis.
QueueSight helps you understand:
- Failed jobs
- Job processing timelines
- Queue backlogs
- Worker activity
- Job retries and errors
Installation
npm install @tachyonlabs/queuesight-sdkRequirements
- Node.js >= 18
- BullMQ >= 5
- Redis
Quick Start
import { Queue } from "bullmq";
import { monitorQueue } from "@tachyonlabs/queuesight-sdk";
const emailQueue = new Queue("emailQueue", {
connection: {
host: "localhost",
port: 6379
}
});
monitorQueue(emailQueue, {
apiKey: "your-queuesight-api-key"
});That's it. QueueSight will now receive job lifecycle events.
What gets monitored
QueueSight captures the following events:
- waiting
- active
- completed
- failed
- stalled
Each event includes:
- Queue name
- Job ID
- Worker ID
- Timestamp
- Error (if failed)
- Result (if completed)
Configuration
monitorQueue(queue, {
apiKey: "your-api-key",
// Optional
batchSize: 100, // events per batch (default: 100)
flushInterval: 1000 // ms between flushes (default: 1000)
});How it works
The SDK listens to BullMQ QueueEvents and sends batched telemetry to QueueSight ingestion servers.
It is designed to be:
- Non-blocking
- Fault tolerant
- Low overhead
- Production safe
If QueueSight is unavailable, your application will continue running normally.
Example Worker
import { Worker } from "bullmq";
const worker = new Worker("emailQueue", async job => {
console.log("Processing job:", job.id);
});QueueSight will automatically capture worker activity.
Stopping monitoring
const monitor = monitorQueue(queue, {
apiKey: "your-api-key"
});
monitor.stop();Security
QueueSight SDK never blocks your application.
All network errors are handled silently.
Sensitive job payloads are not sent by default.
License
MIT License
