OpenTelemetry Metrics Just Got 25× Faster
summary
OpenTelemetry drops Counter recording cost from about 50 ns (with three attributes) to under 2 nanoseconds by pre-resolving attribute sets into bound instruments so attribute normalization and hashmap lookups move to startup; profiling shows ~48 ns spent on attribute work vs ~2 ns on the numeric update. Gains are largest for high-frequency counters with fixed attribute values; histograms see smaller improvements. Creating all bound instruments but retrieving them from a map negates the speedup. Previews available in multiple languages; measured in OTel Rust SDK.
AI-written summary · about
