-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fixed promhttp Instrument* handlers. #1253
Conversation
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.
Besides coding style nit.
And one more thought: Perhaps add do the doc comment of WithExemplarFromContext
that using that option with a observer implementation that doesn't support exemplars will panic.
Could we expedite this and cut a 1.15.1 with it soon? See prometheus/pushgateway#550 as an example for the fallout. |
Yup, will do, thanks for ping! |
Signed-off-by: bwplotka <bwplotka@gmail.com>
I decided to switch direction and revert 3ce88f3 commit & add quick commentary. Might be better to avoid panics even in cost of confusion for people "why their exemplars don't work" |
Sorry @dimonl for bad suggestion on this one 🙈 |
Merging, since it's a revert and tests are passing |
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 🚀
Unfortunately optionality is important as not every e.g. ObserverVec implements exemplar (e.g. summary).
For counters this is not that needed - but changed for consistency and readability.