2 unstable releases

0.2.0 Sep 12, 2024
0.1.0 Apr 4, 2023

#483 in Debugging

Download history 391/week @ 2024-07-05 263/week @ 2024-07-12 412/week @ 2024-07-19 335/week @ 2024-07-26 303/week @ 2024-08-02 251/week @ 2024-08-09 213/week @ 2024-08-16 218/week @ 2024-08-23 226/week @ 2024-08-30 465/week @ 2024-09-06 231/week @ 2024-09-13 141/week @ 2024-09-20 191/week @ 2024-09-27 190/week @ 2024-10-04 179/week @ 2024-10-11 238/week @ 2024-10-18

801 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