road-runner-common 0.7.1

Shared Rust utilities for exchange ecosystem backend services.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Canonical Prometheus metric names for Kafka producers/consumers. Every service
//! must register its Kafka metrics under these names (labels: `topic`, `group`) so
//! dashboards and alerts are portable across the platform.

/// Messages successfully produced (label: `topic`).
pub const PRODUCER_MESSAGES_TOTAL: &str = "kafka_producer_messages_total";
/// Producer send errors (label: `topic`).
pub const PRODUCER_ERRORS_TOTAL: &str = "kafka_producer_errors_total";

/// Messages consumed (label: `topic`, `group`).
pub const CONSUMER_MESSAGES_TOTAL: &str = "kafka_consumer_messages_total";
/// Consumer processing/handler errors (label: `topic`, `group`).
pub const CONSUMER_ERRORS_TOTAL: &str = "kafka_consumer_errors_total";
/// End-to-end handler duration histogram (label: `topic`, `group`).
pub const CONSUMER_PROCESS_DURATION_SECONDS: &str = "kafka_consumer_process_duration_seconds";
/// Consumer lag in seconds (label: `topic`, `group`).
pub const CONSUMER_LAG_SECONDS: &str = "kafka_consumer_lag_seconds";