Skip to main content

Module metrics

Module metrics 

Source
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
MetricsRegistry
Structure to hold Prometheus registries and associated callbacks for a given hierarchy.

Traits§

MetricsHierarchy
PrometheusMetric
============================== Prometheus section

Functions§

create_metric
============================== Metrics section

Type Aliases§

PrometheusExpositionFormatCallback
Type alias for exposition text callback functions that return Prometheus text
PrometheusUpdateCallback
Type alias for runtime callback functions to reduce complexity