8000 Allow passing label values as keyword arguments by alex · Pull Request #87 · prometheus/client_python · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 2 commits into from
Jul 23, 2016

Conversation

alex
Copy link
Contributor
@alex alex commented Jul 3, 2016

No description provided.

@brian-brazil
Copy link
Contributor

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.

@alex
Copy link
Contributor Author
alex commented Jul 3, 2016

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?

@brian-brazil
Copy link
Contributor

This would be the first deprecation. Probably best to reach out to users and see if they can take a straight breakage.

@alex
Copy link
Contributor Author
alex commented Jul 3, 2016

Is there a particular place to do that?

@brian-brazil
Copy link
Contributor

You could hit the mailing list, or ping @korfuri

@alex
Copy link
Contributor Author
alex commented Jul 18, 2016

Sorry it took me a while, mailing list messaged: https://groups.google.com/forum/#!topic/prometheus-developers/KTAvr3DdVi4

@alex
Copy link
Contributor Author
alex commented Jul 22, 2016

@brian-brazil Been about 5 days and only one person has chimed in. Shall I update this PR to remove the dict-passing API?

@brian-brazil
Copy link
Contributor

Sounds like a plan

@alex
Copy link
Contributor Author
alex commented Jul 22, 2016

Great; done!

c.labels(method='post', endpoint='/submit').inc()
```

Or as a dict:
Copy link
Contributor

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

Copy link
Contributor Author

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.

@brian-brazil brian-brazil merged commit bda36bf into prometheus:master Jul 23, 2016
@brian-brazil
Copy link
Contributor

Thanks!

@alex
Copy link
Contributor Author
alex commented Jul 23, 2016

Thank you!

@alex alex deleted the labels-as-kwargs branch July 23, 2016 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0