-
Notifications
You must be signed in to change notification settings - Fork 812
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 support for matchers in labels API #3658
Comments
Change in Thanos: thanos-io/thanos#3566 |
+1, Would greatly appreciate this functionality |
The current situation is that the label names API supports matchers by using a That Issue: that Ironically, if we do a So, I see two approaches here: One goes through adding matchers to the I also see an easier one, which consists in pushing the hints down to the ingesters. Instead of checking the hints in distributor queryable we can add hints to the |
I think we should be sending the matchers down to each ingester then unioning the sets that come back, which will likely be tiny compared to bringing back all the series then stripping the labels out in the querier. |
The matchers are already being sent to each ingester, and each ingester in the OTOH, adding a |
Yes, and calling that from querier. |
To be clearer, we don't want to use the Prometheus implementation https://github.com/prometheus/prometheus/blob/263847e64a0581eba34bd907bd8d1b169be15b95/web/api/v1/api.go#L536 which assumes it's free to pass millions of series around; we want one that knows it's calling ingesters. |
We would still need to change that api implementation to actually call the LabelValues method with matchers, right? (because we're using that API implementation for Cortex API too) So we need to make the change in Prometheus first, and then upgrade the Prometheus here and support it. |
Well, what I meant is Cortex would replace that implementation, but I haven't looked closely into whether it would be reasonable to change it upstream. |
|
My previous comment was wrong. Actually |
I think so and I've seen you've already opened a PR prometheus/prometheus#9083. In my opinion, this is the best solution. A pure Cortex solution to the max grpc frame size could be implementing |
Still valid. |
Since prometheus/prometheus#9083 prometheus now provides matchers to the LabelNames method on the LabelQuerier interface, so in order to upgrade Prometheus we need to support that. This partially solves cortexproject#3658 as now the block store queryable uses the LabelNames method with matchers. However, we're still using the ingesters' MetricsForLabelMatchers method to perform the LabelNames w/matchers call on the distributor. That change will be tackled separately as it breaks ingester's contracts and needs to be released with a feature flag to perform a backwards compatible release. Signed-off-by: Oleg Zaytsev <[email protected]>
* Upgrade Prometheus to LabelNames with matchers Since prometheus/prometheus#9083 prometheus now provides matchers to the LabelNames method on the LabelQuerier interface, so in order to upgrade Prometheus we need to support that. This partially solves #3658 as now the block store queryable uses the LabelNames method with matchers. However, we're still using the ingesters' MetricsForLabelMatchers method to perform the LabelNames w/matchers call on the distributor. That change will be tackled separately as it breaks ingester's contracts and needs to be released with a feature flag to perform a backwards compatible release. Signed-off-by: Oleg Zaytsev <[email protected]> * Updated CHANGELOG.md Signed-off-by: Oleg Zaytsev <[email protected]>
This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions. |
* Upgrade Prometheus to LabelNames with matchers Since prometheus/prometheus#9083 prometheus now provides matchers to the LabelNames method on the LabelQuerier interface, so in order to upgrade Prometheus we need to support that. This partially solves cortexproject#3658 as now the block store queryable uses the LabelNames method with matchers. However, we're still using the ingesters' MetricsForLabelMatchers method to perform the LabelNames w/matchers call on the distributor. That change will be tackled separately as it breaks ingester's contracts and needs to be released with a feature flag to perform a backwards compatible release. Signed-off-by: Oleg Zaytsev <[email protected]> * Updated CHANGELOG.md Signed-off-by: Oleg Zaytsev <[email protected]> Signed-off-by: Alvin Lin <[email protected]>
Prometheus has recently added support for matchers in labels API (
/api/v1/labels
and/api/v1/label/<label_name>/values
) in prometheus/prometheus#8301.Cortex needs to do the same to stay compatible.
The text was updated successfully, but these errors were encountered: