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

Method getSeries

pkg/traceql/engine_metrics.go:782–798  ·  view source on GitHub ↗

getSeries gets the series for the current span. It will reuse the last series if possible.

()

Source from the content-addressed store, hash-verified

780// getSeries gets the series for the current span.
781// It will reuse the last series if possible.
782func (g *GroupingAggregator[F, S]) getSeries() aggregatorWitValues[S] {
783 // Fast path
784 if g.lastSeries.agg != nil && g.lastBuf.fast == g.buf.fast {
785 return g.lastSeries
786 }
787
788 s, ok := g.series[g.buf.fast]
789 if !ok {
790 s.agg = g.innerAgg()
791 s.vals = g.buf.vals
792 g.series[g.buf.fast] = s
793 }
794
795 g.lastBuf = g.buf
796 g.lastSeries = s
797 return s
798}
799
800// Observe the span by looking up its group-by attributes, mapping to the series,
801// and passing to the inner aggregate. This is a critical hot path.

Callers 2

ObserveMethod · 0.95
ObserveExemplarMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected