-
Notifications
You must be signed in to change notification settings - Fork 405
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
Remove Context from sync instruments #1076
Remove Context from sync instruments #1076
Conversation
I believe @jtescher added it last year. |
I think the main use here would be for exemplars, but it's not being used yet. Could work that through first and see if we can delete it after that, or I suppose alternatively we could remove it now and re-add it if needed for exemplars. |
It seems the specs lets the language implementation decide whether to pass the Context parameter explicitly, or else use the current active Context. C++ and Java provides overload methods with Context parameter, Rust has this parameter as mandatory, while other languages use the currently active Context. |
Would you agree to the following plan:
|
Title should be renamed to only address sync counters |
Yeah I think that's fine, we have both options when creating traces, I think long term having both is reasonable. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1076 +/- ##
=======================================
- Coverage 50.7% 50.7% -0.1%
=======================================
Files 165 165
Lines 19808 19808
=======================================
- Hits 10059 10058 -1
- Misses 9749 9750 +1
☔ View full report in Codecov by Sentry. |
BREAKING CHANGE: otel api has context removed Refs: open-telemetry/opentelemetry-rust#1076
Opening a PR which removes
Context
as part of the parameters to the measurement reporting API for Counter.If this is agreed, I can remove it for other sync instruments as well.(Updated to remove for all sync instruments) I am not sure if this was intentionally kept, as the Metrics API spec removed this long ago(?) or it never existed in the spec. The SDK could infer the current implicit context OR we could introduce a new ctr.AddWithContext() accepting explicit context if there is a need for passing non-implicit context..Merge requirement checklist
CHANGELOG.md
files updated for non-trivial, user-facing changes