Registry / observability / metrics-exporter-prometheus

metrics-exporter-prometheus

JSON →
library0.18.1rscratesunverified

A metrics-compatible exporter for sending metrics to Prometheus.

# Cargo.toml [dependencies] metrics-exporter-prometheus = "0.18.1"
INSTALL
IMPORT
SIG · METRICS-EXPORTER-P
M
metrics-exporter-prometheus
observabilityrustv0.18.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PrometheusBuilder
use metrics_exporter_prometheus::PrometheusBuilder;

Set up a Prometheus exporter and record a metric.

use metrics_exporter_prometheus::PrometheusBuilder; fn main() { let builder = PrometheusBuilder::new(); builder.install().unwrap(); metrics::counter!("requests", 1); }
Debug
Known issues
gotchaRequires the 'metrics' crate to be present for recording metrics.
fix
Add metrics = "0.23" to your Cargo.toml.
affects: >=0.18.0
Upgrade
Version history
0.18.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
12
OpenAI (training)
2
Resources
metrics-exporter-prometheus — cargo add metrics-exporter-prometheus · libregistry