MCPcopy Create free account
hub / github.com/cortexproject/cortex / formatMaxSeriesPerMetricError

Method formatMaxSeriesPerMetricError

pkg/ingester/limiter.go:183–190  ·  view source on GitHub ↗
(userID string, metric string)

Source from the content-addressed store, hash-verified

181}
182
183func (l *Limiter) formatMaxSeriesPerMetricError(userID string, metric string) error {
184 actualLimit := l.maxSeriesPerMetric(userID)
185 localLimit := l.limits.MaxLocalSeriesPerMetric(userID)
186 globalLimit := l.limits.MaxGlobalSeriesPerMetric(userID)
187
188 return fmt.Errorf("per-metric series limit of %d exceeded for metric %s, %s (local limit: %d global limit: %d actual local limit: %d)",
189 minNonZero(localLimit, globalLimit), metric, l.AdminLimitMessage, localLimit, globalLimit, actualLimit)
190}
191
192func (l *Limiter) formatMaxMetadataPerUserError(userID string) error {
193 actualLimit := l.maxMetadataPerUser(userID)

Callers 1

FormatErrorMethod · 0.95

Calls 4

maxSeriesPerMetricMethod · 0.95
minNonZeroFunction · 0.85

Tested by

no test coverage detected