Expand description
Metrics registry trait and implementation for Prometheus metrics
This module provides a trait-based interface for creating and managing Prometheus metrics with automatic label injection and hierarchical naming support.
Modules§
- frontend_
perf - Frontend pipeline stage and finer-grained perf metrics. Used by both runtime (route, transport_roundtrip) and llm (preprocess, postprocess, tokenize, template, detokenize).
- prometheus_
names - Prometheus metric name constants and sanitization utilities
- request_
plane - Request-plane metrics for AddressedPushRouter. Used to pinpoint serialization vs transport roundtrip latency.
- tokio_
perf - Tokio runtime metrics and event-loop canary
- transport_
metrics - Transport-layer Prometheus metrics (TCP + NATS). Statics are incremented directly in the client send paths.
- work_
handler_ perf - Transport breakdown metrics for work handler (backend side). Captures network transit (T2-T1) and backend processing time (T3-T2).
Structs§
- Metrics
- Wrapper struct that provides access to metrics functionality
This struct is accessed via the
.metrics()method on DistributedRuntime, Namespace, Component, and Endpoint - Metrics
Registry - Structure to hold Prometheus registries and associated callbacks for a given hierarchy.
Traits§
- Metrics
Hierarchy - Prometheus
Metric - ============================== Prometheus section
Functions§
- create_
metric - ============================== Metrics section
Type Aliases§
- Prometheus
Exposition Format Callback - Type alias for exposition text callback functions that return Prometheus text
- Prometheus
Update Callback - Type alias for runtime callback functions to reduce complexity