open-telemetry / opentelemetry-specification

Specifications for OpenTelemetry
https://opentelemetry.io
Apache License 2.0
3.71k stars 887 forks source link

[metrics] Allow setting ExemplarFilter via View API #4014

Closed CodeBlanch closed 4 months ago

CodeBlanch commented 5 months ago

Changes

Details

In .NET we have decided to NOT enable Exemplars by default due to performance considerations. If users want Exemplars they can set an ExemplarFilter at the MeterProvider level. This will carry a performance hit for all measurements.

We feel users may only want to pay for the performance hit on critical metrics. With the current specification design, users don't have a lot of options to accomplish this. Really the only thing which may be done is enable Exemplars for the MeterProvider and then use the View API to set an ExemplarReservoir which drops Exemplars for any/all metrics where they aren't desired.

The proposed addition here is seeking to make it easier to selectively enable or disable Exemplars at the instrument-level.

For non-trivial changes, follow the change proposal process.

github-actions[bot] commented 4 months ago

This PR was marked stale due to lack of activity. It will be closed in 7 days.

jsuereth commented 4 months ago

I don't think Views are the right solution for this level of granularity. From the specification call:

Would prefer to see this configuration on MetricReader, similar to temporal aggregation.

github-actions[bot] commented 4 months ago

This PR was marked stale due to lack of activity. It will be closed in 7 days.

github-actions[bot] commented 4 months ago

Closed as inactive. Feel free to reopen if this PR is still being worked on.