SigNoz/signoz · error

limit must be less than 1000

Error message

limit must be less than 1000

What it means

FilterAttributeValueRequest.Validate() rejects limit values over 1000 (and defaults limit to 100 when unset). This caps the number of distinct attribute values returned to protect ClickHouse from huge result sets.

Source

Thrown at pkg/query-service/model/v3/v3.go:340

func (f *FilterAttributeValueRequest) Validate() error {
	if f.FilterAttributeKey == "" {
		return fmt.Errorf("filterAttributeKey is required")
	}

	if f.StartTimeMillis == 0 {
		return fmt.Errorf("startTimeMillis is required")
	}

	if f.EndTimeMillis == 0 {
		return fmt.Errorf("endTimeMillis is required")
	}

	if f.Limit == 0 {
		f.Limit = 100
	}

	if f.Limit > 1000 {
		return fmt.Errorf("limit must be less than 1000")
	}

	if f.ExistingFilterItems != nil {
		for _, value := range f.ExistingFilterItems {
			if value.Key.Key == "" {
				return fmt.Errorf("existingFilterItems must contain a valid key")
			}
		}
	}

	if err := f.DataSource.Validate(); err != nil {
		return fmt.Errorf("invalid data source: %w", err)
	}

	if f.DataSource != DataSourceMetrics {
		if err := f.AggregateOperator.Validate(); err != nil {
			return fmt.Errorf("invalid aggregate operator: %w", err)
		}

View on GitHub (pinned to 5069bf80b0)

Solutions

  1. Set limit to 1000 or less (omit it entirely to get the default 100)
  2. If you need more values, page through results by narrowing filters or time windows rather than raising limit
  3. Cache common value lookups client-side instead of requesting large lists

Example fix

// before
{"filterAttributeKey":"http.url","limit":5000,...}

// after
{"filterAttributeKey":"http.url","limit":1000,...}
Defensive patterns

Strategy: validation

Validate before calling

if req.Limit > 1000 { req.Limit = 1000 }

Type guard

func limitWithinCap(l int64) bool { return l == 0 || (l > 0 && l <= 1000) }

Prevention

When it happens

Trigger: Calling the attribute_value autocomplete endpoint with limit: 5000 (or any value > 1000) in the JSON body — often from a client that wants 'all values' and guesses a big number.

Common situations: Copying a limit from another API without the cap, UI dropdown 'show all' features passing total row counts, or hardcoded large defaults.

Related errors


AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28). Data as JSON: /api/errors/bde3128cc4fa13ae. Report an issue: GitHub.