chore: Improve error message for `maximum of series (%d) reached` (#18176)

pull/18181/head
Ivana Huckova 11 months ago committed by GitHub
parent 21c92149c6
commit 013067266d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      pkg/logqlmodel/error.go
  2. 2
      pkg/querier/queryrange/limits.go

@ -93,7 +93,7 @@ type LimitError struct {
func NewSeriesLimitError(limit int) *LimitError {
return &LimitError{
error: fmt.Errorf("maximum of series (%d) reached for a single query", limit),
error: fmt.Errorf("maximum number of series (%d) reached for a single query; consider reducing query cardinality by adding more specific stream selectors, reducing the time range, or aggregating results with functions like sum(), count() or topk()", limit),
}
}

@ -41,7 +41,7 @@ import (
)
const (
limitErrTmpl = "maximum of series (%d) reached for a single query"
limitErrTmpl = "maximum number of series (%d) reached for a single query; consider reducing query cardinality by adding more specific stream selectors, reducing the time range, or aggregating results with functions like sum(), count() or topk()"
maxSeriesErrTmpl = "max entries limit per query exceeded, limit > max_entries_limit_per_query (%d > %d)"
requiredLabelsErrTmpl = "stream selector is missing required matchers [%s], labels present in the query were [%s]"
requiredNumberLabelsErrTmpl = "stream selector has less label matchers than required: (present: [%s], number_present: %d, required_number_label_matchers: %d)"

Loading…
Cancel
Save