Accessing metrics
Prometheus runs athttp://localhost:9090 when you start BOOM with Docker Compose.
Open the Prometheus UI to query metrics and visualize pipeline performance.
Architecture
BOOM uses the OpenTelemetry SDK to export metrics:Metrics initialization
Each BOOM binary initializes metrics on startup:src/bin/scheduler.rs
Metric labels
All metrics include resource attributes:service.name: Binary name (scheduler,consumer,producer)service.instance.id: Unique UUID for this instanceservice.namespace: Always"boom"service.version: BOOM version fromCargo.tomldeployment.environment.name: Deployment environment (dev,prod, etc.)
The
instance_id distinguishes metrics from multiple instances of the same service running in parallel.Kafka consumer metrics
kafka_consumer_alert_processed_total
Type: CounterUnit:
{alert}Description: Total number of alerts consumed from Kafka
Example queries
Pre-built queries
BOOM includes pre-configured Prometheus queries for the Kafka consumer.Alert worker metrics
alert_worker_active
Type: UpDownCounterUnit:
{alert}Description: Number of alerts currently being processed by alert workers This gauge increases when workers start processing an alert and decreases when they finish.
alert_worker_alert_processed_total
Type: CounterUnit:
{alert}Description: Total number of alerts processed by alert workers Labels:
status: Processing outcome (success,error)
Example queries
Pre-built queries
Access pre-configured alert worker queries in Prometheus.Enrichment worker metrics
enrichment_worker_active
Type: UpDownCounterUnit:
{alert}Description: Number of alerts currently being enriched
enrichment_worker_batch_processed_total
Type: CounterUnit:
{batch}Description: Total number of enrichment batches processed
enrichment_worker_alert_processed_total
Type: CounterUnit:
{alert}Description: Total number of alerts enriched Labels:
status: Processing outcome (success,error)
Example queries
Pre-built queries
View pre-configured enrichment worker queries.Filter worker metrics
filter_worker_active
Type: UpDownCounterUnit:
{alert}Description: Number of alerts currently being filtered
filter_worker_batch_processed_total
Type: CounterUnit:
{batch}Description: Total number of filter batches executed
filter_worker_alert_processed_total
Type: CounterUnit:
{alert}Description: Total number of alerts processed by filters Labels:
reason: Filter outcome (passed,failed)
Example queries
Pre-built queries
Access pre-configured filter worker queries.Global meters
BOOM defines separate meters for each binary:src/utils/o11y/metrics.rs
Separate meters prevent metric collisions when multiple binaries run simultaneously.
Metric export configuration
Metrics are exported via OTLP over gRPC:src/utils/o11y/metrics.rs
Temporality
BOOM uses cumulative temporality, which is more natural for Prometheus:- Counters report cumulative totals since process start
- Prometheus calculates rates using
rate()orirate() - Better compatibility with Prometheus than delta temporality
Dashboard examples
Pipeline throughput
Visualize end-to-end pipeline throughput:Worker health
Monitor active workers across all stages:Error rates
Track processing errors:Filter effectiveness
Measure filter selectivity:Alerting
Example Prometheus alerts
prometheus-alerts.yaml
Graceful shutdown
Metrics are flushed on graceful shutdown:src/bin/scheduler.rs
Metric retention
Prometheus retention is configured in the Docker Compose setup. By default:- Retention time: 15 days
- Storage location: Docker volume
docker-compose.yaml to adjust retention settings.
Next steps
Logging
Configure structured logging and tracing
Processing alerts
Understand the alert processing pipeline
Prometheus docs
Learn more about Prometheus query language