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

ProxyMeter must return proxy instruments or users may get stale instruments in the API #2144

Closed
Tracked by #2140
aabmass opened this issue Sep 23, 2021 · 2 comments · Fixed by #2169
Closed
Tracked by #2140
Assignees
Labels
api Affects the API package. metrics

Comments

@aabmass
Copy link
Member

aabmass commented Sep 23, 2021

Currently from #1887, the ProxyMeter will defer to a global MeterProvider once it is set in the API. However, this needs to go all the way down to the instrument level, or users will end up with no-op instruments even after configuring an SDK.

@ocelotl
Copy link
Contributor

ocelotl commented Sep 30, 2021

I think this would be consistent with the general proxy approach, but it would be inconsistent with the current approach that we have implemented in Tracing, for example:

TracerProvider produces Tracers -> MeterProvider produces Meters
Tracer produce Spans -> Meter produce Instruments

We don't have ProxySpans, we have invalid spans.

I see how this approach is problematic as well, users may end up with no-op spans even after configuring an SDK.

I have the feeling that we should allow Tracer/MeterProviders to be changed (again) until we have a more well defined plan, because this seems like will conflict with the upcoming work that should introduce configuration and/or distros.

@aabmass
Copy link
Member Author

aabmass commented Oct 2, 2021

I see how this approach is problematic as well, users may end up with no-op spans even after configuring an SDK.

It isn't quite the same, as spans are generally short lived while instruments are part of the initial application set-up. With this approach, the user will still lose measurements made before the SDK is configured, just how they would lose spans. I think it's OK to lose a little bit of telemetry in this edge case where a user creates tracers/instruments before setting up the SDK.

@aabmass aabmass linked a pull request Oct 2, 2021 that will close this issue
@aabmass aabmass added the api Affects the API package. label Dec 14, 2021
@aabmass aabmass closed this as completed Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Affects the API package. metrics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants