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

Method ObserveExemplar

pkg/traceql/engine_metrics.go:811–825  ·  view source on GitHub ↗
(span Span, value float64, ts uint64)

Source from the content-addressed store, hash-verified

809}
810
811func (g *GroupingAggregator[F, S]) ObserveExemplar(span Span, value float64, ts uint64) {
812 if !g.getGroupingValues(span) {
813 return
814 }
815
816 s := g.getSeries()
817
818 // Observe exemplar
819 all := span.AllAttributes()
820 lbls := make(Labels, 0, len(all))
821 for k, v := range span.AllAttributes() {
822 lbls = append(lbls, Label{k.String(), v})
823 }
824 s.agg.ObserveExemplar(value, ts, lbls)
825}
826
827func (g *GroupingAggregator[F, S]) Length() int {
828 return len(g.series)

Callers

nothing calls this directly

Calls 5

getGroupingValuesMethod · 0.95
getSeriesMethod · 0.95
AllAttributesMethod · 0.65
ObserveExemplarMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected