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

Function NewCombiner

pkg/model/trace/combine.go:37–43  ·  view source on GitHub ↗

It creates a new Trace combiner. If maxSizeBytes is 0, the final trace size is not checked when allowPartialTrace is set to true a partial trace that exceed the max size may be returned

(maxSizeBytes int, allowPartialTrace bool)

Source from the content-addressed store, hash-verified

35// It creates a new Trace combiner. If maxSizeBytes is 0, the final trace size is not checked
36// when allowPartialTrace is set to true a partial trace that exceed the max size may be returned
37func NewCombiner(maxSizeBytes int, allowPartialTrace bool) *Combiner {
38 return &Combiner{
39 mtx: sync.Mutex{},
40 maxSizeBytes: maxSizeBytes,
41 allowPartialTrace: allowPartialTrace,
42 }
43}
44
45// Consume the given trace and destructively combines its contents.
46func (c *Combiner) Consume(tr *tempopb.Trace) (int, error) {

Callers 15

testCompactionRoundtripFunction · 0.92
testSameIDCompactionFunction · 0.92
FindTraceByIDMethod · 0.92
FindTraceByIDMethod · 0.92
FindTraceByIDMethod · 0.92
NewTraceByIDFunction · 0.92
NewTraceByIDV2Function · 0.92
FindByTraceIDMethod · 0.92
FindTraceByIDMethod · 0.92
PrepareForReadMethod · 0.92
CombineMethod · 0.92
PrepareForReadMethod · 0.92

Calls

no outgoing calls

Tested by 7

testCompactionRoundtripFunction · 0.74
testSameIDCompactionFunction · 0.74
TestCombineProtoTotalsFunction · 0.56
TestCombinerParallelFunction · 0.56
BenchmarkCombineFunction · 0.56