-
Notifications
You must be signed in to change notification settings - Fork 138
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
Use the correct instrument type while creating aysnchronous instruments #475
Use the correct instrument type while creating aysnchronous instruments #475
Conversation
registerDoubleAsynchronousInstrument(type: .counter, updater: callback) | ||
public func buildWithCallback(_ callback: @escaping (OpenTelemetryApi.ObservableDoubleMeasurement) -> Void) | ||
-> OpenTelemetryApi.ObservableDoubleCounter { | ||
registerDoubleAsynchronousInstrument(type: .observableCounter, updater: callback) |
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.
Main change: .counter
-> .observableCounter
registerDoubleAsynchronousInstrument(type: type, updater: callback) | ||
public func buildWithCallback(_ callback: @escaping (OpenTelemetryApi.ObservableDoubleMeasurement) -> Void) | ||
-> OpenTelemetryApi.ObservableDoubleUpDownCounter { | ||
registerDoubleAsynchronousInstrument(type: .observableUpDownCounter, updater: callback) |
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.
Main change: type
-> . observableUpDownCounter
registerLongAsynchronousInstrument(type: type, updater: callback) | ||
public func buildWithCallback(_ callback: @escaping (OpenTelemetryApi.ObservableLongMeasurement) -> Void) | ||
-> OpenTelemetryApi.ObservableLongCounter { | ||
registerLongAsynchronousInstrument(type: .observableCounter, updater: callback) |
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.
Main change: type
-> . observableCounter
registerLongAsynchronousInstrument(type: type, updater: callback) | ||
public func buildWithCallback(_ callback: @escaping (OpenTelemetryApi.ObservableLongMeasurement) -> Void) | ||
-> OpenTelemetryApi.ObservableLongUpDownCounter { | ||
registerLongAsynchronousInstrument(type: .observableUpDownCounter, updater: callback) |
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.
Main change: type
-> . observableUpDownCounter
Codecov ReportAttention:
📢 Thoughts on this report? Let us know!. |
The fix is for #471
While creating asynchronous instrument from synchronous one, we need to pass the correct
InstrumentType
instead of using the value of synchronous instance.