2 unstable releases

0.2.0 Sep 12, 2024
0.1.0 Apr 4, 2023

#547 in Debugging

Download history 202/week @ 2024-09-24 213/week @ 2024-10-01 93/week @ 2024-10-08 302/week @ 2024-10-15 359/week @ 2024-10-22 235/week @ 2024-10-29 189/week @ 2024-11-05 501/week @ 2024-11-12 315/week @ 2024-11-19 477/week @ 2024-11-26 638/week @ 2024-12-03 309/week @ 2024-12-10 211/week @ 2024-12-17 68/week @ 2024-12-24 102/week @ 2024-12-31 461/week @ 2025-01-07

1,017 downloads per month

MPL-2.0 license

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
~212K SLoC