pub struct MetricsSnapshot {
pub process_initiated: Vec<(Box<str>, u64)>,
pub process_completed: Vec<(Box<str>, u64)>,
pub validation_failed: Vec<(Box<str>, u64)>,
pub outbox_delivery_attempts: Vec<(Box<str>, u64)>,
pub deadline_fired: Vec<(Box<str>, u64)>,
pub dead_letter_recorded: Vec<(Box<str>, u64)>,
}Expand description
A point-in-time snapshot of all EngineMetrics counters.
Obtained via EngineMetrics::snapshot(). All fields are Vec of
(label, count) pairs sorted by label for deterministic Prometheus output.
The label field uses a "," separator for multi-label metrics
(e.g. "gpke,accepted" for {family="gpke",result="accepted"}).
The render_prometheus function splits them appropriately.
Fields§
§process_initiated: Vec<(Box<str>, u64)>(family, count) pairs for makod_process_initiated_total.
process_completed: Vec<(Box<str>, u64)>("family,result", count) pairs for makod_process_completed_total.
validation_failed: Vec<(Box<str>, u64)>("message_type,release", count) pairs for makod_validation_failed_total.
outbox_delivery_attempts: Vec<(Box<str>, u64)>(result, count) pairs for makod_outbox_delivery_attempts_total.
deadline_fired: Vec<(Box<str>, u64)>(family, count) pairs for makod_deadline_fired_total.
dead_letter_recorded: Vec<(Box<str>, u64)>(reason, count) pairs for makod_dead_letter_recorded_total.
Implementations§
Source§impl MetricsSnapshot
impl MetricsSnapshot
Sourcepub fn render_prometheus(&self) -> String
pub fn render_prometheus(&self) -> String
Render this snapshot to Prometheus text exposition format (v0.0.4).
The output follows the format:
# HELP <metric_name> <description>
# TYPE <metric_name> counter
<metric_name>{<labels>} <value>Multi-label metrics use a "," separator in the internal label string,
which is split into separate key="value" pairs in the output.
Trait Implementations§
Source§impl Clone for MetricsSnapshot
impl Clone for MetricsSnapshot
Source§fn clone(&self) -> MetricsSnapshot
fn clone(&self) -> MetricsSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more