MCPcopy
hub / github.com/grafana/tempo / newCounter

Function newCounter

modules/generator/registry/counter.go:51–59  ·  view source on GitHub ↗
(name string, lifecycler Limiter, externalLabels map[string]string, staleDuration time.Duration)

Source from the content-addressed store, hash-verified

49}
50
51func 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
61func (c *counter) Inc(lbls labels.Labels, value float64) {
62 if value < 0 {

Callers 12

Test_counterFunction · 0.85
Test_counter_cantAddFunction · 0.85
Test_counter_demandDecayFunction · 0.85
Test_counter_onUpdateFunction · 0.85
NewCounterMethod · 0.85

Calls 1

NewCardinalityFunction · 0.85