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

Method pushSpans

modules/generator/instance.go:382–397  ·  view source on GitHub ↗
(ctx context.Context, req *tempopb.PushSpansRequest)

Source from the content-addressed store, hash-verified

380}
381
382func (i *instance) pushSpans(ctx context.Context, req *tempopb.PushSpansRequest) {
383 i.preprocessSpans(req)
384 i.processorsMtx.RLock()
385 defer i.processorsMtx.RUnlock()
386
387 for _, proc := range i.processors {
388 switch proc.Name() {
389 case processor.SpanMetricsName, processor.ServiceGraphsName, processor.HostInfoName:
390 if req.SkipMetricsGeneration {
391 metricSkippedProcessorPushes.WithLabelValues(i.instanceID).Inc()
392 break
393 }
394 proc.PushSpans(ctx, req)
395 }
396 }
397}
398
399func (i *instance) pushSpansFromQueue(ctx context.Context, _ time.Time, req *tempopb.PushSpansRequest) {
400 i.preprocessSpans(req)

Callers 5

PushSpansMethod · 0.80
BenchmarkPushSpansFunction · 0.80
BenchmarkCollectFunction · 0.80

Calls 4

preprocessSpansMethod · 0.95
NameMethod · 0.65
IncMethod · 0.65
PushSpansMethod · 0.65

Tested by 4

BenchmarkPushSpansFunction · 0.64
BenchmarkCollectFunction · 0.64