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

Method canAddSeriesFor

pkg/ingester/user_state.go:70–80  ·  view source on GitHub ↗
(userID, metric string)

Source from the content-addressed store, hash-verified

68}
69
70func (m *metricCounter) canAddSeriesFor(userID, metric string) error {
71 if _, ok := m.ignoredMetrics[metric]; ok {
72 return nil
73 }
74
75 shard := m.getShard(metric)
76 shard.mtx.Lock()
77 defer shard.mtx.Unlock()
78
79 return m.limiter.AssertMaxSeriesPerMetric(userID, shard.m[metric])
80}
81
82func (m *metricCounter) increaseSeriesForMetric(metric string) {
83 shard := m.getShard(metric)

Callers 2

TestMetricCounterFunction · 0.80
PreCreationMethod · 0.80

Calls 2

getShardMethod · 0.95

Tested by 1

TestMetricCounterFunction · 0.64