Registry / observability / prometheus-exporter-base

prometheus-exporter-base

JSON →
library1.4.0rscratesunverified

Prometheus Rust exporters base crate with optional boilerplate.

# Cargo.toml [dependencies] prometheus_exporter_base = "1.4.0"
INSTALL
IMPORT
SIG · PROMETHEUS-EXPORTE
P
prometheus-exporter-base
observabilityrustv1.4.0
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.

PrometheusExporter
use prometheus_exporter_base::PrometheusExporter;

Starts a Prometheus exporter on the given address.

use prometheus_exporter_base::PrometheusExporter; fn main() { let exporter = PrometheusExporter::new("0.0.0.0:9184"); println!("Prometheus exporter started"); }
Debug
Known issues
gotchaRequires tokio runtime for async operation.
fix
Use #[tokio::main] or run within an async context.
affects: >=1.4.0
Upgrade
Version history
1.4.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
17
OpenAI (training)
2
Resources
prometheus-exporter-base — cargo add prometheus-exporter-base · libregistry