open-telemetry / opentelemetry-cpp

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

[Feature] Metrics SDK: allow metric readers to filter Meters during Collect() #2709

Open marcalff opened 1 week ago

marcalff commented 1 week ago

When metrics are exported to different endpoints by different exporters, it is necessary to express somehow which metric goes to which exporter.

Currently this is not possible, because a metric reader exports all the meters and metrics defined on a meter provider.

This is a new feature to improve usefulness and expressiveness of which data is exported, and where to.

Desired filtering is on a meter by meter basis, for efficiency at runtime, and ease of configuration.

This feature depends on the following spec change: