Skip to content

Fix documentation for push and pushAdd methods. - #137

Closed
rohitagarwal003 wants to merge 1 commit into
prometheus:masterfrom
rohitagarwal003:push-pushAdd-documentation
Closed

Fix documentation for push and pushAdd methods.#137
rohitagarwal003 wants to merge 1 commit into
prometheus:masterfrom
rohitagarwal003:push-pushAdd-documentation

Conversation

@rohitagarwal003

Copy link
Copy Markdown
Contributor

According to https://github.com/prometheus/pushgateway/blob/0.3.0/README.md#post-method

POST works exactly like the PUT method but only metrics with the same name as
the newly pushed metrics are replaced (among those with the same grouping
key).

push uses POST and pushAdd uses PUT.
push replaces only metrics with the same name under a job and grouping key.
pushAdd replaces all metrics under a job and grouping key.

The method names are unfortunate.

@rohitagarwal003
rohitagarwal003 force-pushed the push-pushAdd-documentation branch from 9843dc8 to bab2aa4 Compare August 18, 2016 06:38
@brian-brazil

Copy link
Copy Markdown
Contributor

Thanks for finding this. It's actually the implementation that's wrong, could you switch it around?

@rohitagarwal003

Copy link
Copy Markdown
Contributor Author

I thought so too. But I didn't because it would change the behavior for existing users. But if you are okay with doing that, I can update the PR.

@rohitagarwal003
rohitagarwal003 force-pushed the push-pushAdd-documentation branch from bab2aa4 to f3e8aea Compare August 18, 2016 23:17
According to https://github.com/prometheus/pushgateway/blob/0.3.0/README.md#post-method
> POST works exactly like the PUT method but only metrics with the same name as
> the newly pushed metrics are replaced (among those with the same grouping
> key).

push uses POST and pushAdd uses PUT.
push replaces only metrics with the same name under a job and grouping key.
pushAdd replaces all metrics under a job and grouping key.

The method names are unfortunate.
@rohitagarwal003
rohitagarwal003 force-pushed the push-pushAdd-documentation branch from f3e8aea to b30d9e8 Compare August 18, 2016 23:18
rohitagarwal003 added a commit to rohitagarwal003/client_java that referenced this pull request Aug 18, 2016
According to https://github.com/prometheus/pushgateway/blob/0.3.0/README.md#post-method

> POST works exactly like the PUT method but only metrics with the same name
as the newly pushed metrics are replaced (among those with the same grouping
key).
@rohitagarwal003

Copy link
Copy Markdown
Contributor Author

Created #138 in case we want to do that.

brian-brazil added a commit that referenced this pull request Aug 21, 2016
@brian-brazil

Copy link
Copy Markdown
Contributor

Closing in lieu of #138

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