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
Add generics to metric instruments & instrument provider #3406
Conversation
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3406 +/- ##
=====================================
Coverage 77.9% 77.9%
=====================================
Files 164 164
Lines 11361 11361
=====================================
+ Hits 8855 8859 +4
+ Misses 2307 2303 -4
Partials 199 199
|
Can you please justify this statement? |
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.
This will not support users using Go < 1.18.
@MrAlias The simplication could occur in the way that you don't need to define same function twice, when it comes to handling both int64 and float64 types. Thanks! p.s. |
The SDK is a separate module from the API, it does not impose a limitation on the API. This is by design: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/overview.md. Please see the existing discussion on the topic and the ultimate SIG decision: #2494 (comment) |
@MrAlias |
There are no differences between float64 and int64 in each async instrument and sync instrument.
it would immensely help on simplifying the implementation of further features in go-contrib, avoiding many boilerplates.