1 unstable release

0.1.0 Apr 4, 2023

#5 in #responds

Download history 1007/week @ 2024-03-15 874/week @ 2024-03-22 1040/week @ 2024-03-29 1002/week @ 2024-04-05 513/week @ 2024-04-12 524/week @ 2024-04-19 333/week @ 2024-04-26 613/week @ 2024-05-03 401/week @ 2024-05-10 393/week @ 2024-05-17 463/week @ 2024-05-24 438/week @ 2024-05-31 661/week @ 2024-06-07 659/week @ 2024-06-14 432/week @ 2024-06-21 162/week @ 2024-06-28

1,922 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