prometheus_exporter

crates.io docs.rs

Helper libary to export prometheus metrics using hyper. It's intended to help writing prometheus exporters without the need to setup and maintain a http webserver. If the program also uses a http server for other purposes this package is probably not the best way and rust-prometheus should be used directly.

It uses rust-prometheus for collecting and rendering the prometheus metrics and hyper for exposing the metrics through http.

Usage

Add this to your Cargo.toml:

toml [dependencies] prometheus_exporter = "0.3"

There are three ways on how to use the exporter:

For examples on how to use prometheus_exporter see the examples folder.