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

Method ObserveWithExemplar

modules/generator/registry/histogram.go:98–112  ·  view source on GitHub ↗
(lbls labels.Labels, value float64, traceID string, multiplier float64)

Source from the content-addressed store, hash-verified

96}
97
98func (h *histogram) ObserveWithExemplar(lbls labels.Labels, value float64, traceID string, multiplier float64) {
99 hash := lbls.Hash()
100
101 h.seriesDemand.Insert(hash)
102
103 h.seriesMtx.Lock()
104 defer h.seriesMtx.Unlock()
105
106 s, lbls, hash := resolveSeries(h.series, hash, lbls, h.lifecycler, h.activeSeriesPerHistogramSerie())
107 if s != nil {
108 h.updateSeries(hash, s, value, traceID, multiplier)
109 return
110 }
111 h.series[hash] = h.newSeries(lbls, value, traceID, multiplier)
112}
113
114func (h *histogram) newSeries(lbls labels.Labels, value float64, traceID string, multiplier float64) *histogramSeries {
115 newSeries := &histogramSeries{

Callers

nothing calls this directly

Calls 6

updateSeriesMethod · 0.95
newSeriesMethod · 0.95
resolveSeriesFunction · 0.85
HashMethod · 0.80
InsertMethod · 0.80

Tested by

no test coverage detected