-
Notifications
You must be signed in to change notification settings - Fork 476
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
Implement tenant federation for metadata querier endpoint #2467
Conversation
1217a0a
to
72bc1f4
Compare
Allow multiple tenant IDs to be passed to the `/api/v1/metadata` endpoint in the same way we support for query and exemplar endpoints. For other endpoints, the tenant ID is included as a generated label (query results or exemplars). We don't have the option here because metadata doesn't include any labels. Because of this we simply merge metadata for all tenants. The `http.Handler` will group all metadata under each metric name. Fixes #2410 Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
72bc1f4
to
44579de
Compare
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.
Good job!
I would suggest to remove testing multitenant configuration from tsdb-blocks-storage-s3
, as it may be confusing for people who use it regularly.
Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
Actually, I missed this part of the Prometheus docs that specifies that metadata has to be unique. I'll push a commit that fixes this shortly:
From https://prometheus.io/docs/prometheus/latest/querying/api/#querying-metric-metadata |
Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
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.
Looks great, thanks!
I added one non-blocking comment
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.
Good catch.
Signed-off-by: Nick Pillitteri nick.pillitteri@grafana.com
What this PR does
Allow multiple tenant IDs to be passed to the
/api/v1/metadata
endpoint in the same way we support for query and exemplar endpoints.
For other endpoints, the tenant ID is included as a generated label
(query results or exemplars). We don't have the option here because
metadata doesn't include any labels. Because of this we simply merge
and de-duplicate metadata for all tenants. The
http.Handler
will groupall metadata under each metric name.
Which issue(s) this PR fixes or relates to
Fixes #2410
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]