(name string, lifecycler Limiter, externalLabels map[string]string, staleDuration time.Duration)
| 49 | } |
| 50 | |
| 51 | func newCounter(name string, lifecycler Limiter, externalLabels map[string]string, staleDuration time.Duration) *counter { |
| 52 | return &counter{ |
| 53 | metricName: name, |
| 54 | series: make(map[uint64]*counterSeries), |
| 55 | seriesDemand: NewCardinality(staleDuration, removeStaleSeriesInterval), |
| 56 | lifecycler: lifecycler, |
| 57 | externalLabels: externalLabels, |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | func (c *counter) Inc(lbls labels.Labels, value float64) { |
| 62 | if value < 0 { |