Skip to main content

metric_histogram_buckets

Function metric_histogram_buckets 

Source
pub fn metric_histogram_buckets() -> Vec<HistogramBuckets>
Expand description

Custom histogram bucket boundaries for the utilization metrics this crate emits.

Both outbound_connection_factor_utilization and outbound_connection_global_utilization are recorded on a 0.0..=1.0 scale, so the OTel default boundaries (tuned for millisecond durations, topping out at 10000) would collapse every sample into the lowest bucket. These boundaries sit near typical alerting cutoffs (75%, 90%, 95%, 99%). Pass the result to spin_telemetry::init.

The metric names here must match the identifiers used in the histogram_f64! calls above.