api: provide metadata for a specified metric#6442
Merged
beorn7 merged 2 commits intoprometheus:masterfrom Dec 11, 2019
Merged
Conversation
Signed-off-by: gotjosh <josue@grafana.com>
Contributor
brian-brazil
left a comment
There was a problem hiding this comment.
This should probably be part of the existing api.
Member
Author
Do you prefer the same handler to be reused even if it's a separate endpoint or do you want to include the functionality in the same endpoint but via a query param? I'm not sure about the latter as the proposal described a separate endpoint unless we all agree to deviate from that. |
Contributor
|
It's basically the same code currently, so I'd have it all in one endpoint. It's also what we do elsewhere, we don't want to end up with an endpoint per possible parameter combination. |
gotjosh
commented
Dec 10, 2019
13d9227 to
bfae90c
Compare
This adds support for a new query param on the new `api/v1/metadata` endpoint that provides metadata for a specified metric via the V1 API. It collapses metadata that is equal across all targets, and aggregates under the same metric name the ones that differ. Signed-off-by: gotjosh <josue@grafana.com>
bfae90c to
e1f2da7
Compare
Contributor
|
👍 @beorn7 I believe that comment is what you wanted. |
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.
This adds support for a new query param on the new
api/v1/metadataendpoint that provides metadata for a specified metric via the V1 API. Similarly to theapi/v1/target/metadatathe metadata is only available for the lifecycle of the attached target.An example of a payload looks like:
Follow up from #6420
Closes #6395