2 unstable releases

0.2.0 Sep 12, 2024
0.1.0 Apr 4, 2023

#466 in Debugging

Download history 323/week @ 2024-08-03 225/week @ 2024-08-10 216/week @ 2024-08-17 217/week @ 2024-08-24 223/week @ 2024-08-31 485/week @ 2024-09-07 215/week @ 2024-09-14 142/week @ 2024-09-21 316/week @ 2024-09-28 78/week @ 2024-10-05 175/week @ 2024-10-12 231/week @ 2024-10-19 359/week @ 2024-10-26 231/week @ 2024-11-02 347/week @ 2024-11-09 439/week @ 2024-11-16

1,382 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
~211K SLoC