Expand description
Prometheus backend for shared Aster infrastructure metrics.
This module is enabled by the prometheus feature. Product crates can use
init_or_noop to obtain a SharedMetricsRecorder
and export_metrics for their HTTP metrics endpoint without depending on
the prometheus crate directly. Product-specific metric families can be
registered with Forge descriptors and recorded through opaque handles, so
products keep ownership of domain labels without importing Prometheus types.
Structs§
- Product
Counter - Typed handle for a registered product counter.
- Product
Gauge - Typed handle for a registered product gauge.
- Product
Histogram - Typed handle for a registered product histogram.
- Product
Metric Handle - Opaque handle returned after registering a product metric.
- Prometheus
Metrics - Prometheus metric families for product-neutral Aster infrastructure.
- Prometheus
Metrics Recorder - Prometheus recorder for shared infrastructure metrics.
Enums§
- Product
Metric Error - Errors returned by product metric registration or recording.
Functions§
- add_
product_ gauge - Adds to a registered product gauge.
- export_
metrics - Exports the current Prometheus text exposition body.
- inc_
product_ counter - Increments a registered product counter.
- init_
metrics - Initializes the shared Prometheus registry.
- init_
or_ noop - Initializes Prometheus metrics and falls back to a no-op recorder on failure.
- is_
initialized - Returns whether the Prometheus registry has been initialized.
- observe_
product_ histogram - Observes a registered product histogram.
- record_
health_ component - Records one health component into the shared Prometheus registry.
- record_
health_ report - Records an aggregate health report into the shared Prometheus registry.
- register_
product_ counter - Registers a product counter and returns a typed handle.
- register_
product_ gauge - Registers a product gauge and returns a typed handle.
- register_
product_ histogram - Registers a product histogram and returns a typed handle.
- register_
product_ metric - Registers a product-owned metric family in the shared Prometheus registry.
- register_
product_ metrics - Registers multiple product-owned metric families in order.
- set_
product_ gauge - Sets a registered product gauge.
Type Aliases§
- Product
Metric Result - Result type for product metric operations.