push and pushAdd logic reversed. #137, #138. - #138
Merged
brian-brazil merged 1 commit intoAug 21, 2016
Conversation
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
force-pushed
the
push-pushAdd-logic-reversed
branch
from
August 18, 2016 23:26
4c39748 to
13ed0d8
Compare
|
|
||
| /** | ||
| * Pushes all metrics in a registry, replacing all those with the same job as the grouping key. | ||
| * Pushes all metrics in a registry, replacing all those with the same job and no grouping key. |
Contributor
There was a problem hiding this comment.
The comment was correct, the job is part of the grouping key.
Contributor
Author
There was a problem hiding this comment.
There are three other methods down below with similar signature that say "same job and no grouping key". I think this is to differentiate with the methods which take groupingKey map as argument.
Contributor
There was a problem hiding this comment.
That's just offering them as optional parameters. The grouping key comprises the job label plus whatever other optional labels you add.
Contributor
Author
There was a problem hiding this comment.
I know that.
There are eight methods:
1. push(CollectorRegistry registry, String job)
2. push(Collector collector, String job)
3. push(CollectorRegistry registry, String job, Map<String, String> groupingKey)
4. push(Collector collector, String job, Map<String, String> groupingKey)
5. pushAdd(CollectorRegistry registry, String job)
6. pushAdd(Collector collector, String job)
7. pushAdd(CollectorRegistry registry, String job, Map<String, String> groupingKey)
8. pushAdd(Collector collector, String job, Map<String, String> groupingKey)
Methods 1,2,5,6 should have similar documentation. I made the documentation for method 1 similar to what was there for methods 2,5,6.
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
According to https://github.com/prometheus/pushgateway/blob/0.3.0/README.md#post-method