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

Method PushSpans

modules/generator/processor/hostinfo/processor.go:52–67  ·  view source on GitHub ↗
(_ context.Context, req *tempopb.PushSpansRequest)

Source from the content-addressed store, hash-verified

50}
51
52func (p *Processor) PushSpans(_ context.Context, req *tempopb.PushSpansRequest) {
53 for i := range req.Batches {
54 resourceSpans := req.Batches[i]
55 if hostID, hostSource := p.findHostIdentifier(resourceSpans); hostID != "" && hostSource != "" {
56 builder := p.registry.NewInfoMetricLabelBuilder()
57 builder.Add(hostIdentifierAttr, hostID)
58 builder.Add(hostSourceAttr, hostSource)
59 labels, validUTF8 := builder.CloseAndBuildLabels()
60 if !validUTF8 {
61 p.invalidUTF8Counter.Inc()
62 continue
63 }
64 p.gauge.Set(labels, 1)
65 }
66 }
67}
68
69func (p *Processor) Shutdown(_ context.Context) {}
70

Callers

nothing calls this directly

Implementers 3

Processormodules/generator/processor/hostinfo/p
Processormodules/generator/processor/servicegra
Processormodules/generator/processor/spanmetric

Calls 6

findHostIdentifierMethod · 0.95
AddMethod · 0.65
CloseAndBuildLabelsMethod · 0.65
IncMethod · 0.65
SetMethod · 0.65

Tested by

no test coverage detected