Expand description
Internal metrics support.
Includes the MetricsStream broadcast of internally emitted metrics events and the
Reflector-based AggregatedMetricsState view that downstream callers query for
Prometheus exposition.
Structs§
- Aggregated
Histogram - An aggregated histogram with fixed buckets, suitable for Prometheus exposition.
- Aggregated
Metrics Processor - Aggregated metrics processor.
- Aggregated
Metrics State - Aggregated metrics state.
- Filter
Handle - Handle to the metrics filter.
- Metrics
Flusher Worker - A worker that periodically flushes the internal metrics registry to broadcast subscribers.
- Metrics
Snapshot - A batch of metric updates produced by a single flush.
- Metrics
Stream - Internal metrics stream
- Reflector
Reflectorcomposes a source of data with a processor that’s used to transform the data, and then stores the results and allows for shared access by multiple callers.- Reflector
Worker - A worker that drives a
Reflector’s data source. - Remapped
Metric - A metric that has been remapped by a
RemapperRule. - Remapper
Rule - A metric remapping rule.
- Telemetry
Processor - Processes an
AggregatedMetricsStateinto a Prometheus text exposition payload.
Enums§
- Aggregated
Metric Value - Aggregated metric value.
Traits§
- Processor
- Processes input data and modifies shared state based on the result.
Functions§
- delete_
counter - Deletes an internal counter from the metrics registry.
- get_
shared_ metrics_ state - Gets the shared metrics state, which provides unified access to internal metrics in a simplified interface.
- initialize_
metrics - Initializes the metrics subsystem with the given metrics prefix and default filter level.
- initialize_
shared_ metrics_ state - Initializes the shared metrics state, returning the worker that drives it.
Type Aliases§
- Shared
Metrics Snapshot - A
MetricsSnapshotthat can be cheaply cloned and shared between multiple consumers. - Shared
Metrics Worker - The worker that drives the shared metrics reflector. See
initialize_shared_metrics_state.