-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
API Client: Support new metadata endpoint in v1 #718
API Client: Support new metadata endpoint in v1 #718
Conversation
77dc78b
to
81fed67
Compare
Introduces support for the new metadata endpoint from Prometheus. The new endpoint provides information independent of targets and collapses the unique combinations of HELP, TYPE and UNIT. Fixes prometheus#705 Signed-off-by: gotjosh <josue@grafana.com>
81fed67
to
7f509dc
Compare
@@ -366,6 +369,13 @@ type MetricMetadata struct { | |||
Unit string `json:"unit"` | |||
} | |||
|
|||
// Metadata models the metadata of a metric. | |||
type Metadata struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially, I tried to re-use the MetricMetadata
struct above. However, it felt misleading to return a type that will always have two empty fields (target, metric).
On my review queue. Help would be appreciated. @slrtbtfs or @joe-elliott perhaps? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments, otherwise LGTM.
Co-Authored-By: Tobias Guggenmos <tguggenm@redhat.com> Signed-off-by: gotjosh <josue@grafana.com>
Co-Authored-By: Tobias Guggenmos <tguggenm@redhat.com> Signed-off-by: gotjosh <josue@grafana.com>
e321596
to
6c9cb08
Compare
Signed-off-by: gotjosh <josue@grafana.com>
6c9cb08
to
2463b8e
Compare
One last 👀 @joe-elliott / @slrtbtfs ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks everyone, authors and reviewers alike.
Introduces support for the new metadata endpoint from Prometheus. The new endpoint provides information independent of targets and collapses the unique combinations of HELP, TYPE and UNIT.
Fixes #705
Signed-off-by: gotjosh josue@grafana.com