Allow passing label values as keyword arguments#87
Allow passing label values as keyword arguments#87brian-brazil merged 2 commits intoprometheus:masterprometheus/client_python:masterfrom
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! |
README.md
Outdated
| c.labels(method='post', endpoint='/submit').inc() | ||
| ``` | ||
|
|
||
| Or as a dict: |
There was a problem hiding this comment.
The example here should be removed
There was a problem hiding this comment.
You're looking at a previous version of the diff, it's removed on the latest.
|
Thanks! |
|
Thank you! |
No description provided.