1 unstable release

0.1.0 Apr 4, 2023

#26 in #scrape

Download history 407/week @ 2023-12-18 182/week @ 2023-12-25 852/week @ 2024-01-01 467/week @ 2024-01-08 447/week @ 2024-01-15 725/week @ 2024-01-22 672/week @ 2024-01-29 809/week @ 2024-02-05 666/week @ 2024-02-12 588/week @ 2024-02-19 410/week @ 2024-02-26 482/week @ 2024-03-04 673/week @ 2024-03-11 1040/week @ 2024-03-18 824/week @ 2024-03-25 1072/week @ 2024-04-01

3,612 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–14MB
~210K SLoC