-
Notifications
You must be signed in to change notification settings - Fork 815
Allow passing label values as keyword arguments #87
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
Conversation
This is getting a bit complicated. I think that if we're going to this this then the ability to pass a dict as the first arg should be deprecated. I think there's only one user of that out there. |
I have no objection to that; I find the "raw dict" UX a bit unpleasant myself (hence this PR :-)). Is there a precedent for how deprecations are handled in this library? |
This would be the first deprecation. Probably best to reach out to users and see if they can take a straight breakage. |
Is there a particular place to do that? |
You could hit the mailing list, or ping @korfuri |
Sorry it took me a while, mailing list messaged: https://groups.google.com/forum/#!topic/prometheus-developers/KTAvr3DdVi4 |
@brian-brazil Been about 5 days and only one person has chimed in. Shall I update this PR to remove the dict-passing API? |
Sounds like a plan |
Great; done! |
c.labels(method='post', endpoint='/submit').inc() | ||
``` | ||
|
||
Or as a dict: |
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.
The example here should be removed
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.
You're looking at a previous version of the diff, it's removed on the latest.
Thanks! |
Thank you! |
No description provided.