2 unstable releases
0.2.0 | Sep 12, 2024 |
---|---|
0.1.0 | Apr 4, 2023 |
#466 in Debugging
1,382 downloads per month
8KB
This is a small utility crate that provides a Prometheus metrics endpoint as a Trillium handler. It responds to GET requests to "/metrics" with metrics from the provided registry, using text-format encoding.
Example:
let registry = prometheus::Registry::new();
let handler = trillium_prometheus::text_format_handler(registry);
trillium_smol::config()
.with_host("0.0.0.0")
.with_port(9464)
.run(handler);
Dependencies
~7–13MB
~211K SLoC