diff --git a/docs/api/_index.md b/docs/api/_index.md index 824a67736b..3cbdaee76c 100644 --- a/docs/api/_index.md +++ b/docs/api/_index.md @@ -355,9 +355,7 @@ GET,POST /api/v1/series GET,POST /api/v1/series ``` -Find series by label matchers. Differently than Prometheus and due to scalability and performances reasons, if `-querier.query-store-for-labels-enabled` is not set or if `start` param is not specified, Cortex currently always fetches series from data stored in the ingesters. - -If `-querier.query-store-for-labels-enabled` is configured, Cortex also queries the long-term store with the *blocks* storage engine. +Find series by label matchers. Starting from release v1.18.0, Cortex by default honors the `start` and `end` request parameters and fetches series from either ingester, store gateway or both. The special case is that if `start` param is not specified, Cortex currently fetches series from data stored in the ingesters. _For more information, please check out the Prometheus [series endpoint](https://prometheus.io/docs/prometheus/latest/querying/api/#finding-series-by-label-matchers) documentation._ @@ -372,7 +370,7 @@ GET,POST /api/v1/labels GET,POST /api/v1/labels ``` -Get label names of ingested series. Differently than Prometheus and due to scalability and performances reasons, Cortex currently ignores the `start` and `end` request parameters and always fetches the label names from in-memory data stored in the ingesters. There is experimental support to query the long-term store with the *blocks* storage engine when `-querier.query-store-for-labels-enabled` is set. +Get label names of ingested series. Starting from release v1.18.0, Cortex by default honors the `start` and `end` request parameters and fetches label names from either ingester, store gateway or both. _For more information, please check out the Prometheus [get label names](https://prometheus.io/docs/prometheus/latest/querying/api/#getting-label-names) documentation._ @@ -387,7 +385,7 @@ GET /api/v1/label/{name}/values GET /api/v1/label/{name}/values ``` -Get label values for a given label name. Differently than Prometheus and due to scalability and performances reasons, Cortex currently ignores the `start` and `end` request parameters and always fetches the label values from in-memory data stored in the ingesters. There is experimental support to query the long-term store with the *blocks* storage engine when `-querier.query-store-for-labels-enabled` is set. +Get label values for a given label name. Starting from release v1.18.0, Cortex by default honors the `start` and `end` request parameters and fetches label values from either ingester, store gateway or both. _For more information, please check out the Prometheus [get label values](https://prometheus.io/docs/prometheus/latest/querying/api/#querying-label-values) documentation._ diff --git a/docs/configuration/v1-guarantees.md b/docs/configuration/v1-guarantees.md index 7c3691d99d..238b04e300 100644 --- a/docs/configuration/v1-guarantees.md +++ b/docs/configuration/v1-guarantees.md @@ -23,7 +23,6 @@ The Cortex maintainers commit to ensuring future version of Cortex can read data Cortex strives to be 100% API compatible with Prometheus (under `/prometheus/*` and `/api/prom/*`); any deviation from this is considered a bug, except: -- For queries to the `/api/v1/series`, `/api/v1/labels` and `/api/v1/label/{name}/values` endpoints, query's time range is ignored and the data is always fetched from ingesters. There is experimental support to query the long-term store with the *blocks* storage engine when `-querier.query-store-for-labels-enabled` is set. - Additional API endpoints for creating, removing and modifying alerts and recording rules. - Additional API around pushing metrics (under `/api/push`). - Additional API endpoints for management of Cortex itself, such as the ring. These APIs are not part of the any compatibility guarantees. @@ -53,7 +52,6 @@ Currently experimental features are: - OpenStack Swift storage support. - Metric relabeling in the distributor. - Scalable query-frontend (when using query-scheduler) -- Querying store for series, labels APIs (`-querier.query-store-for-labels-enabled`) - Ingester: do not unregister from ring on shutdown (`-ingester.unregister-on-shutdown=false`) - Distributor: do not extend writes on unhealthy ingesters (`-distributor.extend-writes=false`) - Tenant Deletion in Purger, for blocks storage. diff --git a/docs/guides/limitations.md b/docs/guides/limitations.md index 7376866161..5951371f74 100644 --- a/docs/guides/limitations.md +++ b/docs/guides/limitations.md @@ -35,7 +35,3 @@ All other characters are not safe to use. In particular, slashes `/` and whitesp ### Length The tenant ID length should not exceed 150 bytes/characters. - -## Query series and labels - -When running queries to the `/api/v1/series`, `/api/v1/labels` and `/api/v1/label/{name}/values` endpoints, query's time range is ignored and the data is always fetched from ingesters. There is experimental support to query the long-term store with the *blocks* storage engine when `-querier.query-store-for-labels-enabled` is set. diff --git a/pkg/ingester/ingester_test.go b/pkg/ingester/ingester_test.go index bdfe6dcd3d..c889339bcb 100644 --- a/pkg/ingester/ingester_test.go +++ b/pkg/ingester/ingester_test.go @@ -2731,7 +2731,7 @@ func Test_Ingester_MetricsForLabelMatchers(t *testing.T) { {Labels: cortexpb.FromLabelsToLabelAdapters(fixtures[1].lbls)}, }, }, - "should filter metrics by time range if queryStoreForLabels and queryIngestersWithin is enabled": { + "should filter metrics by time range if queryIngestersWithin is enabled": { from: 99999, to: 100001, matchers: []*client.LabelMatchers{{ diff --git a/pkg/querier/querier_test.go b/pkg/querier/querier_test.go index f5e3e222da..17b4be651d 100644 --- a/pkg/querier/querier_test.go +++ b/pkg/querier/querier_test.go @@ -1411,7 +1411,6 @@ type mockStoreQuerier struct { // Select implements storage.Querier interface. // The bool passed is ignored because the series is always sorted. func (q *mockStoreQuerier) Select(ctx context.Context, _ bool, sp *storage.SelectHints, matchers ...*labels.Matcher) storage.SeriesSet { - // We will hit this for /series lookup when -querier.query-store-for-labels-enabled is set. // If we don't skip here, it'll make /series lookups extremely slow as all the chunks will be loaded. // That flag is only to be set with blocks storage engine, and this is a protective measure. if sp != nil && sp.Func == "series" {