Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[metrics] Allow setting ExemplarFilter via View API #4014

Closed

Conversation

CodeBlanch
Copy link
Member

Changes

  • Allow setting ExemplarFilter via the View API

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.

Copy link

github-actions bot commented May 4, 2024

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

@github-actions github-actions bot added the Stale label May 4, 2024
@jsuereth
Copy link
Contributor

jsuereth commented May 7, 2024

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

  • Views are a bit of a foot-gun in that they don't compose. If you tried to enable exemplars on all histograms view a view AND any other view exists on histograms, you wind up with two metrics, not one.
  • We want to limit the control of exemplars in views to ONE comprehensive single.
  • We have preexisting solutions where you can configure something per-instrument via MetricReader. Adding exemplar filter here fits the same pattern we arleady have.

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

@github-actions github-actions bot removed the Stale label May 8, 2024
Copy link

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

@github-actions github-actions bot added the Stale label May 15, 2024
Copy link

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

@github-actions github-actions bot closed this May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants