2 unstable releases

0.2.0 Sep 12, 2024
0.1.0 Apr 4, 2023

#535 in Debugging

Download history 167/week @ 2024-09-19 182/week @ 2024-09-26 200/week @ 2024-10-03 150/week @ 2024-10-10 261/week @ 2024-10-17 344/week @ 2024-10-24 225/week @ 2024-10-31 318/week @ 2024-11-07 399/week @ 2024-11-14 329/week @ 2024-11-21 434/week @ 2024-11-28 723/week @ 2024-12-05 226/week @ 2024-12-12 205/week @ 2024-12-19 68/week @ 2024-12-26 120/week @ 2025-01-02

671 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