OpenTelemetry
Send Queuebert measurements through an application-owned OpenTelemetry meter.
Keep your telemetry setup#
@queuebert/otel records counters, duration histograms and observable queue gauges through your application's OpenTelemetry Meter. It does not start an SDK, choose an exporter, open a Prometheus endpoint, or install third-party BullMQ auto-instrumentation.
Configure your SDK before importing application code. See the package reference for installation and the complete registry example.
Record outcomes and queue counts#
A MetricsRegistry accepts recordJobCompleted, recordJobFailed, and updateQueueCounts. It can produce a raw snapshot or Queuebert-shaped statistics through getSnapshot() and transformToQueuebertStats().
The stable metric names are exported as METRIC_NAMES: completed, failed, duration, waiting, active, delayed, and queue throughput. Success and failure rates are fractions from 0 to 1.
Bound cardinality and clean up#
Use maxJobNames to bound job-name cardinality. Overflow names are grouped under __other__. Call registry.destroy() during shutdown to unregister observable callbacks.
Use the Nest integration#
Import QueuebertOTelModule from @queuebert/otel/nest. The module supports synchronous and asynchronous registration, and exposes the configured meter and tracer through the service and injection tokens.
There is no @queuebert/nest/otel subpackage. Follow the Nest example for the standalone integration.