17 releases (breaking)

Uses new Rust 2024

new 0.12.0 May 11, 2026
0.11.0-rc.1 Apr 8, 2026
0.10.0 Jan 24, 2025
0.9.0 Jul 15, 2024
0.1.0 Mar 27, 2023

#592 in HTTP server

Download history 426/week @ 2026-01-17 611/week @ 2026-01-24 595/week @ 2026-01-31 653/week @ 2026-02-07 1043/week @ 2026-02-14 915/week @ 2026-02-21 2221/week @ 2026-02-28 1188/week @ 2026-03-07 963/week @ 2026-03-14 741/week @ 2026-03-21 591/week @ 2026-03-28 517/week @ 2026-04-04 694/week @ 2026-04-11 606/week @ 2026-04-18 299/week @ 2026-04-25 134/week @ 2026-05-02

1,734 downloads per month

MIT/Apache

46KB
896 lines

Trillium Opentelemetry!

This crate provides opentelemetry metrics conforming to semantic conventions for http and tracing semantic conventions.

Usage:

use trillium_opentelemetry::global::{instrument, instrument_handler};
use trillium_router::router;

#[tokio::main]
async fn main() {
    // configure a global meter provider and tracer provider here
    // see examples/with_global.rs for a functional example

    trillium_tokio::run_async((
        instrument().with_route(|conn| conn.route().map(|r| r.to_string().into())),
        instrument_handler(router().get("/some/:path", instrument_handler("ok")),
    ))
    .await;
}




Legal:

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~8.5MB
~204K SLoC