open-telemetry / opentelemetry-cpp

The OpenTelemetry C++ Client
https://opentelemetry.io/
Apache License 2.0
811 stars 391 forks source link

[Performance] Avoid duplication of metric exporters. #2710

Open marcalff opened 1 week ago

marcalff commented 1 week ago

When exporting metrics at different frequencies, the only possible setup according to the current spec is to:

When all the exporters points to the same endpoint, this creates overhead:

To fix this, it should be possible to setup the SDK so that multiple metric readers can share a common metric exporter.

The spec however mentions that each reader owns one exporter, preventing sharing.

This performance improvement is blocked by the following spec change: