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

Method updateSeries

modules/generator/registry/native_histogram.go:193–206  ·  view source on GitHub ↗
(hash uint64, s *nativeHistogramSeries, value float64, traceID string, multiplier float64)

Source from the content-addressed store, hash-verified

191}
192
193func (h *nativeHistogram) updateSeries(hash uint64, s *nativeHistogramSeries, value float64, traceID string, multiplier float64) {
194 // Use Prometheus native exemplar handling
195 exemplarObserver := s.promHistogram.(prometheus.ExemplarObserver)
196
197 labels := prometheus.Labels{h.traceIDLabelName: traceID}
198
199 for i := 0.0; i < multiplier; i++ {
200 // Let Prometheus handle exemplars natively
201 exemplarObserver.ObserveWithExemplar(value, labels)
202 }
203
204 s.lastUpdated = time.Now().UnixMilli()
205 h.lifecycler.OnUpdate(hash, h.activeSeriesPerHistogramSerie())
206}
207
208func (h *nativeHistogram) name() string {
209 return h.metricName

Callers 2

ObserveWithExemplarMethod · 0.95
newSeriesMethod · 0.95

Calls 4

ObserveWithExemplarMethod · 0.65
NowMethod · 0.65
OnUpdateMethod · 0.65

Tested by

no test coverage detected