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

Function exemplarAttribute

pkg/traceql/ast_metrics.go:242–248  ·  view source on GitHub ↗

exemplarAttribute captures a closure around the attribute so it doesn't have to be passed along with every span. should be more efficient.

(a Attribute)

Source from the content-addressed store, hash-verified

240// exemplarAttribute captures a closure around the attribute so it doesn't have to be passed along with every span.
241// should be more efficient.
242func exemplarAttribute(a Attribute) func(Span) (float64, uint64) {
243 return func(s Span) (float64, uint64) {
244 v, _ := FloatizeAttribute(s, a)
245 t := s.StartTimeUnixNanos() / uint64(time.Millisecond)
246 return v, t
247 }
248}
249
250func (a *MetricsAggregate) initSum(q *tempopb.QueryRangeRequest) {
251 // Currently all metrics are summed by job to produce

Callers 1

exemplarFnForFunction · 0.85

Calls 2

FloatizeAttributeFunction · 0.85
StartTimeUnixNanosMethod · 0.65

Tested by

no test coverage detected