-
Notifications
You must be signed in to change notification settings - Fork 638
Description
Related Problems?
Performance of Metrics SDK is not good enough to be used in critical services.
Describe the solution you'd like:
Majority of the time is spent in locating the time-series to aggregate to. If the key and value are known ahead of time, we can avoid this lookup. This used to exist in the spec as "bound instrument". but was removed from initial stable spec, due to lack of demand for such a feature.
Considered Alternatives
I am not aware of any other solution. Based on SDK benchmarks in OTel Rust and other languages (.NET in particular was used for comparison), the only way to really get blazing fast perf is by avoiding the manipulation/massaging of attributes+lookup of timeseries.
https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-sdk/benches/metric.rs#L82-L87 shows that highest perf is achieved for no attributes, and perf decreases significantly with each attribute.
Additional Context
No response