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

Method formatMaxMetadataPerMetricError

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

Source from the content-addressed store, hash-verified

199}
200
201func (l *Limiter) formatMaxMetadataPerMetricError(userID string, metric string) error {
202 actualLimit := l.maxMetadataPerMetric(userID)
203 localLimit := l.limits.MaxLocalMetadataPerMetric(userID)
204 globalLimit := l.limits.MaxGlobalMetadataPerMetric(userID)
205
206 return fmt.Errorf("per-metric metadata limit of %d exceeded for metric %s, %s (local limit: %d global limit: %d actual local limit: %d)",
207 minNonZero(localLimit, globalLimit), metric, l.AdminLimitMessage, localLimit, globalLimit, actualLimit)
208}
209
210func (l *Limiter) formatMaxSeriesPerLabelSetError(err errMaxSeriesPerLabelSetLimitExceeded) error {
211 return fmt.Errorf("per-labelset series limit of %d exceeded (labelSet: %s, global limit: %d actual local limit: %d)",

Callers 1

FormatErrorMethod · 0.95

Calls 4

maxMetadataPerMetricMethod · 0.95
minNonZeroFunction · 0.85

Tested by

no test coverage detected