Skip to content

Support something like M3's "M3-Restrict-By-Tags-JSON" header #7030

@alvinlin123

Description

@alvinlin123

Is your feature request related to a problem? Please describe.
Enterprise users may have uses cases to have different teams to only query metrics with specific label key-value pair (e.g. through a proxy or through Grafana data source configuration)

Allowing a dynamic "pre-defined labelset" to be passed in through query API will unlock such use case.

Describe the solution you'd like
Being able to add in additional labelsets on top of what is defined in the "query" parameter.

Describe alternatives you've considered
In Grafana we can leverage dashboard variable, but it's not as powerful as if we can enforce the pre-defined labelsets at Grafana's Data Source config level.

Set up a policy with individual teams that "you must include these label sets when you query cortex", but this is best intention that would not work. Would be better if I can setup a proxy-per-team on top of Cortex to enfore the pre-defined label sets.

Additional context
M3 does this through HTTP header https://github.com/m3db/m3/blob/027294a7cd9226e195550b781b7907046649ad27/site/content/includes/headers_optional_read_all.md?plain=1#L2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions