-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
sdk/metric: Add experimental Enabled method to synchronous instruments #6016
sdk/metric: Add experimental Enabled method to synchronous instruments #6016
Conversation
Opening this to get feedback on whether or not I'm headed in the right direction based on the details listed in open-telemetry#6002. This is a replacement for open-telemetry#5768 Fixes open-telemetry#6002 There are still some tests I would add, but overall I'm mostly looking to reviewers to let me know if this is the correct approach (defining an interface in `x` and using that interface in the SDK) Signed-off-by: Alex Boten <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6016 +/- ##
=====================================
Coverage 82.1% 82.2%
=====================================
Files 273 273
Lines 23643 23647 +4
=====================================
+ Hits 19433 19448 +15
+ Misses 3865 3852 -13
- Partials 345 347 +2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 👍 Overall, I think this is the direction we agreed on during the SIG meetings.
I think it would be good to also add an example in sdk/metric/example_test.go
and add some benchmarks.
You can look at #5692 for reference.
Co-authored-by: Robert Pająk <[email protected]>
Signed-off-by: Alex Boten <[email protected]>
Signed-off-by: Alex Boten <[email protected]>
Co-authored-by: Robert Pająk <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one refactoring request from my side. The rest LGTM👍
After a second thought, I do not think it is really necessary.
Is the PR description up to date? Looks like a pretty complete PR unless I am missing something 😉 |
Signed-off-by: Alex Boten <[email protected]>
Updated the description, thanks for all the reviews/suggestions! |
Fixes #6002