3 releases (breaking)

0.3.0 Mar 31, 2025
0.2.0 Sep 12, 2024
0.1.0 Apr 4, 2023

#10 in #respond

Download history 367/week @ 2025-09-19 408/week @ 2025-09-26 113/week @ 2025-10-03 415/week @ 2025-10-10 750/week @ 2025-10-17 246/week @ 2025-10-24 527/week @ 2025-10-31 555/week @ 2025-11-07 241/week @ 2025-11-14 558/week @ 2025-11-21 451/week @ 2025-11-28 187/week @ 2025-12-05 487/week @ 2025-12-12 343/week @ 2025-12-19 133/week @ 2025-12-26 317/week @ 2026-01-02

1,280 downloads per month

MPL-2.0 license

15KB

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

~15MB
~253K SLoC