Skip to content

Allow passing label values as keyword arguments - #87

Merged
brian-brazil merged 2 commits into
prometheus:masterfrom
alex:labels-as-kwargs
Jul 23, 2016
Merged

brian-brazil merged 2 commits into
prometheus:masterfrom
alex:labels-as-kwargs

Conversation

@alex

@alex alex commented Jul 3, 2016

Copy link
Copy Markdown
Contributor

No description provided.

@brian-brazil

Copy link
Copy Markdown
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

alex commented Jul 3, 2016

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor

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

@alex

alex commented Jul 3, 2016

Copy link
Copy Markdown
Contributor Author

Is there a particular place to do that?

@brian-brazil

Copy link
Copy Markdown
Contributor

You could hit the mailing list, or ping @korfuri

@alex

alex commented Jul 18, 2016

Copy link
Copy Markdown
Contributor Author

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

@alex

alex commented Jul 22, 2016

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
Contributor

Sounds like a plan

@alex

alex commented Jul 22, 2016

Copy link
Copy Markdown
Contributor Author

Great; done!

Comment thread README.md Outdated
c.labels(method='post', endpoint='/submit').inc()
```

Or as a dict:

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

Thanks!

@alex

alex commented Jul 23, 2016

Copy link
Copy Markdown
Contributor Author

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