Open cijothomas opened 3 months ago
Metrics hot path now involves copying the incoming ReadOnlySpan into a Thread-Local array to do the dictionary lookup. With the new capability to lookup Dictionary with just ReadOnlySpan, we can avoid the thread-local copy cost. Opening an issue to track this.
Unrelated/Related : Rust's Dictionary(hashmap) already allowed such lookups, and I leveraged that in OTel Rust metrics and avoided entire copy costs and got good per gains (https://github.com/open-telemetry/opentelemetry-rust/pull/1989).
Metrics hot path now involves copying the incoming ReadOnlySpan into a Thread-Local array to do the dictionary lookup. With the new capability to lookup Dictionary with just ReadOnlySpan, we can avoid the thread-local copy cost. Opening an issue to track this.
Unrelated/Related : Rust's Dictionary(hashmap) already allowed such lookups, and I leveraged that in OTel Rust metrics and avoided entire copy costs and got good per gains (https://github.com/open-telemetry/opentelemetry-rust/pull/1989).