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

Function MakeReqWithMultipleTraceWithSpanCount

pkg/util/test/req.go:433–447  ·  view source on GitHub ↗
(spanCounts []int, traceIDs [][]byte)

Source from the content-addressed store, hash-verified

431}
432
433func MakeReqWithMultipleTraceWithSpanCount(spanCounts []int, traceIDs [][]byte) *tempopb.Trace {
434 if len(spanCounts) != len(traceIDs) {
435 panic("spanCounts and traceIDs lengths do not match")
436 }
437 trace := &tempopb.Trace{
438 ResourceSpans: make([]*v1_trace.ResourceSpans, 0),
439 }
440
441 for index, traceID := range traceIDs {
442 traceID = ValidTraceID(traceID)
443 trace.ResourceSpans = append(trace.ResourceSpans, MakeBatch(spanCounts[index], traceID))
444 }
445
446 return trace
447}
448
449// MakeDedicatedColumns creates a dedicated column assignment that matches the attributes
450// generated by AddDedicatedAttributes.

Callers 1

TestLimitsPartialSuccessFunction · 0.92

Calls 2

MakeBatchFunction · 0.85
ValidTraceIDFunction · 0.70

Tested by 1

TestLimitsPartialSuccessFunction · 0.74