-
Notifications
You must be signed in to change notification settings - Fork 821
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
fix: observers should not expose bind/unbind method #1001
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1001 +/- ##
==========================================
+ Coverage 95.00% 95.04% +0.04%
==========================================
Files 212 212
Lines 8813 8806 -7
Branches 796 796
==========================================
- Hits 8373 8370 -3
+ Misses 440 436 -4
|
0b4c2c6
to
317db95
Compare
clear(): void; | ||
} | ||
|
||
export interface UnboundMetric<T> extends Metric { |
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.
minor: pls add JSDoc comment.
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.
Updated, PTAL :)
1851d3c
to
ccff588
Compare
ccff588
to
6965c9a
Compare
6965c9a
to
bfc2fb1
Compare
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.
lgtm
b8823a2
to
bfc2fb1
Compare
Which problem is this PR solving?
Short description of the changes
@opentelemetry/api
: Add new interface UnboundMetric, with bind/unbind method, which extends Metric.@opentelemetry/metrics
: Removed problematic setCallback method from BoundObserver. BoundObsever now acts as merely an instrument hold values, should not be exposed as public API.