Rust

telemetry

Module

The HTTP server metrics crate::Http::run records, following the OpenTelemetry semantic conventions, and the instrument traits an exporter implements to receive them.

Contents

use utopia_http::telemetry::NoTelemetry;
Rust
pub struct NoTelemetry

An exporter that records nothing: the default of an application.

use utopia_http::telemetry::Attribute;
Rust
pub enum Attribute

A measurement attribute value.

use utopia_http::telemetry::Histogram;
Rust
pub trait Histogram: Send + Sync

An instrument that records a distribution of values, such as request durations or body sizes.

Implemented byNothing
use utopia_http::telemetry::Telemetry;
Rust
pub trait Telemetry: Send + Sync

A metrics exporter: creates the instruments the server records into.

Implemented byNoTelemetry
use utopia_http::telemetry::UpDownCounter;
Rust
pub trait UpDownCounter: Send + Sync

An instrument that counts up and down, such as requests in flight.

Implemented byNothing
Rust
pub type Attributes = [(&'static str, Attribute)]

Attributes of a measurement: name and value pairs.

Rust
pub const DURATION_BUCKETS: [f64; 14] = [0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1.0, 2.5, 5.0, 7.5, 10.0]

http.server.request.duration bucket boundaries, in seconds.