Description
Is your feature request related to a problem? Please describe.
We don't have a good metric to track user query throttling.
Right now, we can look at metrics for the corresponding status code like 422 and 429. But 422 status code doesn't tell which the query was throttled by which limit.
Describe the solution you'd like
We already have some metrics for ingestion about throttling https://github.com/cortexproject/cortex/blob/master/pkg/util/validation/validate.go#L72. A counter metric with label user
and reason
.
We can have the same for query metric as well in query frontend.
Query frontend can parse limit error message and convert those errors into metric labels.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.