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

Function MakeSpan

pkg/util/test/req.go:33–38  ·  view source on GitHub ↗
(traceID []byte)

Source from the content-addressed store, hash-verified

31}
32
33func MakeSpan(traceID []byte) *v1_trace.Span {
34 now := time.Now()
35 startTime := uint64(now.UnixNano())
36 endTime := uint64(now.Add(time.Second).UnixNano())
37 return makeSpanWithAttributeCount(traceID, rand.Int()%10+1, startTime, endTime) // nolint:gosec // G404: Use of weak random number generator
38}
39
40func MakeSpanWithTimeWindow(traceID []byte, startTime uint64, endTime uint64) *v1_trace.Span {
41 return makeSpanWithAttributeCount(traceID, rand.Int()%10+1, startTime, endTime) // nolint:gosec // G404: Use of weak random number generator

Callers 3

TestTempoDBQueryRangeFunction · 0.92
TestLiveStoreQueryRangeFunction · 0.92
makeBatchWithTimeRangeFunction · 0.85

Calls 4

IntMethod · 0.80
NowMethod · 0.65
AddMethod · 0.65

Tested by 2

TestTempoDBQueryRangeFunction · 0.74
TestLiveStoreQueryRangeFunction · 0.74