Expand description
Prometheus metrics counters, histograms, gauges and tracing initialisation Prometheus metrics for stygian pipelines.
Provides a process-wide MetricsRegistry that tracks:
- Counters: requests, errors, cache hits/misses
- Histograms: request duration, pipeline execution time
- Gauges: active workers, queue depth, circuit-breaker state
§Example
use stygian_graph::application::metrics::{MetricsRegistry, MetricEvent};
let registry = MetricsRegistry::new();
registry.record(MetricEvent::RequestStarted { service: "http".into() });
registry.record(MetricEvent::RequestCompleted {
service: "http".into(),
duration_ms: 142,
success: true,
});
let snapshot = registry.snapshot();
assert_eq!(snapshot.requests_total, 1);
assert_eq!(snapshot.errors_total, 0);Structs§
- Metrics
Registry - Thread-safe registry for all pipeline metrics.
- Metrics
Snapshot - Point-in-time snapshot of all metric counters.
- Tracing
Init - Tracing initialisation configuration.
Enums§
- LogFormat
- Log output format
- Metric
Event - An observable event emitted by the pipeline engine.
Functions§
- global_
metrics - Process-wide global
MetricsRegistryinstance.