(userID, metric string)
| 68 | } |
| 69 | |
| 70 | func (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 | |
| 82 | func (m *metricCounter) increaseSeriesForMetric(metric string) { |
| 83 | shard := m.getShard(metric) |