You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When finding the counter, the method use "hash" as the key to search the counter. However, it put the counter into the map with "key", which make bug in double calling for IncrCounterWithLabels or any other XXXWithLabels.
The text was updated successfully, but these errors were encountered:
p.mu.Lock() defer p.mu.Unlock() key, hash := p.flattenKey(parts, labels) **g, ok := p.counters[hash]** if !ok { g = prometheus.NewCounter(prometheus.CounterOpts{ Name: key, Help: key, ConstLabels: prometheusLabels(labels), }) prometheus.MustRegister(g) **p.counters[key] = g** } g.Add(float64(val))
When finding the counter, the method use "hash" as the key to search the counter. However, it put the counter into the map with "key", which make bug in double calling for IncrCounterWithLabels or any other XXXWithLabels.
The text was updated successfully, but these errors were encountered: