netdata/netdata · error

%w: quantile count mismatch

Error message

%w: quantile count mismatch

What it means

Error "%w: quantile count mismatch" thrown in netdata/netdata.

Source

Thrown at src/go/pkg/metrix/summary.go:216

}

func normalizeSummaryPoint(point SummaryPoint, schema *summarySchema) (SampleValue, SampleValue, []SampleValue) {
	mustFiniteSample(point.Count)
	mustFiniteSample(point.Sum)

	if point.Count < 0 {
		panic(fmt.Errorf("%w: negative count", errSummaryPoint))
	}

	if schema == nil || len(schema.quantiles) == 0 {
		if len(point.Quantiles) > 0 {
			panic(fmt.Errorf("%w: quantiles are not configured for this instrument", errSummaryPoint))
		}
		return point.Count, point.Sum, nil
	}

	if len(point.Quantiles) != len(schema.quantiles) {
		panic(fmt.Errorf("%w: quantile count mismatch", errSummaryPoint))
	}

	values := make([]SampleValue, len(schema.quantiles))
	seen := make(map[float64]struct{}, len(schema.quantiles))
	for _, q := range point.Quantiles {
		if math.IsNaN(q.Quantile) || q.Quantile < 0 || q.Quantile > 1 {
			panic(fmt.Errorf("%w: invalid quantile %v", errSummaryPoint, q.Quantile))
		}
		if _, ok := seen[q.Quantile]; ok {
			panic(fmt.Errorf("%w: duplicate quantile %v", errSummaryPoint, q.Quantile))
		}
		seen[q.Quantile] = struct{}{}

		idx := summaryQuantileIndex(schema.quantiles, q.Quantile)
		if idx == -1 {
			panic(fmt.Errorf("%w: quantile %v is not declared", errSummaryPoint, q.Quantile))
		}
		// A summary may report a NaN quantile value (e.g. an empty observation window). Store it;

View on GitHub (pinned to 4864de85e2)

Solutions

  1. The number of quantile values in the point does not match the declared quantiles.
  2. Provide exactly one value per declared quantile.

When it happens

Trigger: Thrown at src/go/pkg/metrix/summary.go:216 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of netdata/netdata@4864de85e2 (2026-08-15). Data as JSON: /api/errors/e36eb228a4ff25a0. Report an issue: GitHub.