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

Method AssertMaxNativeHistogramSeriesPerUser

pkg/ingester/limiter.go:101–107  ·  view source on GitHub ↗

AssertMaxNativeHistogramSeriesPerUser limit has not been reached compared to the current number of native histogram series in input and returns an error if so.

(userID string, series int)

Source from the content-addressed store, hash-verified

99// AssertMaxNativeHistogramSeriesPerUser limit has not been reached compared to the current
100// number of native histogram series in input and returns an error if so.
101func (l *Limiter) AssertMaxNativeHistogramSeriesPerUser(userID string, series int) error {
102 if actualLimit := l.maxNativeHistogramSeriesPerUser(userID); series < actualLimit {
103 return nil
104 }
105
106 return errMaxNativeHistogramSeriesPerUserLimitExceeded
107}
108
109// AssertMaxMetricsWithMetadataPerUser limit has not been reached compared to the current
110// number of metrics with metadata in input and returns an error if so.

Calls 1