-
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
prometheus: check return value from CheckpointSet.ForEach #622
Conversation
This PR modifies prometheus.Collect to reflect the change introduced by open-telemetry#557. The `export{Counter,Histogram,LastValue,Summary}` methods now all return an error instead of calling the error callback directly. The callback is now only called on the returned error from `ForEach`. fixes open-telemetry#563
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.
For a next step I would love to see us using the go 1.13 error wrapping, I think Josh already mentioned this somewhere.
@paivagustavo I would be happy to pick that up. (In a separate PR, I guess)
would turn into something like:
|
Exactly like that @oncilla and indeed in another PR :) |
This PR adds error wrapping to the prometheus exporter. The added context should make it easier to follow the error path. This is a follow-up to open-telemetry#622
* prometheus: add error wrapping This PR adds error wrapping to the prometheus exporter. The added context should make it easier to follow the error path. This is a follow-up to #622 * feedback
This PR modifies prometheus.Collect to reflect the change introduced
by #557.
The
export{Counter,Histogram,LastValue,Summary}
methods now all returnan error instead of calling the error callback directly.
The callback is now only called on the returned error from
ForEach
.fixes #563
This change is