Skip to content

OTEL Metrics

This document describes Queuert’s OpenTelemetry metrics implementation. Metrics provide quantitative visibility into queue health, worker performance, and job processing throughput. See the ObservabilityAdapter TSDoc for the adapter interface.

Queuert uses three OpenTelemetry metric instruments: Counter, Histogram, and UpDownCounter.

All metrics follow the pattern:

queuert.{component}.{operation}[.{suboperation}]

Components:

  • worker - Worker lifecycle events
  • job - Individual job events
  • job_chain - Chain-level events
  • job_type - Job type aggregations
  • state_adapter - Database adapter health
  • notify_adapter - Notification adapter health

Histograms track duration distributions at three levels. The ObservabilityAdapter interface accepts milliseconds; the @queuert/otel adapter converts to seconds per OTEL Messaging Semantic Conventions:

queuert.job_chain.duration
├── queuert.job.duration (first job)
│ ├── queuert.job.attempt.duration (attempt 1)
│ └── queuert.job.attempt.duration (attempt 2, retry)
├── queuert.job.duration (continuation)
│ └── queuert.job.attempt.duration
└── (wait time between jobs)

Two gauges track real-time worker state:

  • queuert.job_type.idle — Workers currently idle for job type
  • queuert.job_type.processing — Jobs currently being processed