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

Function countSpans

modules/livestore/instance.go:326–334  ·  view source on GitHub ↗
(trace *tempopb.Trace)

Source from the content-addressed store, hash-verified

324}
325
326func countSpans(trace *tempopb.Trace) int {
327 count := 0
328 for _, b := range trace.ResourceSpans {
329 for _, ss := range b.ScopeSpans {
330 count += len(ss.Spans)
331 }
332 }
333 return count
334}
335
336func (i *instance) cutIdleTraces(ctx context.Context, immediate bool) (bool, error) {
337 _, span := tracer.Start(ctx, "instance.cutIdleTraces",

Callers 1

pushBytesMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected