Skip to content

prometheus

Crate: prometheus (workspace package name) · Path: crates/observability/prometheus

From crates/observability/prometheus/Cargo.toml:

FeaturePurpose
defaultstructured-logging
prometheus-federationprometheus crate, reqwest, uuid, serde_json
pushgateway-clientprometheus-federation
cardinality-reductionprometheus-federation, url
recording-rulesprometheus-federation, serde_yaml
structured-loggingserde_json, observability_core/structured-logging

Items below are #[cfg(feature = "prometheus-federation")] (or other gates) as indicated in lib.rs:

  • Prometheus, PrometheusConfig, PrometheusExtensionConfig, PrometheusManager
  • create_prometheus_manager, create_prometheus_manager_from_config
  • With cardinality-reduction: CardinalityReducer, CardinalityStats, MetricStats
  • With prometheus-federation: FederationConfig, HierarchicalFederation
  • With recording-rules: recording rule types and RecordingRulesManager
  • With pushgateway-client: PushGatewayClient, BatchPushClient

Constants: VERSION, DEFAULT_PUSHGATEWAY_ENDPOINT, DEFAULT_METRICS_PORT, DEFAULT_PUSH_INTERVAL_SECS.

Full API reference: cargo doc -p prometheus --no-deps --features prometheus-federation (enable other features as needed).