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

Function NewTraceInfo

pkg/util/trace_info.go:50–61  ·  view source on GitHub ↗

NewTraceInfo is used to produce a new TraceInfo.

(timestamp time.Time, tempoOrgID string)

Source from the content-addressed store, hash-verified

48
49// NewTraceInfo is used to produce a new TraceInfo.
50func NewTraceInfo(timestamp time.Time, tempoOrgID string) *TraceInfo {
51 r := newRand(timestamp)
52
53 return &TraceInfo{
54 timestamp: timestamp,
55 r: r,
56 traceIDHigh: r.Int63(),
57 traceIDLow: r.Int63(),
58 longWritesRemaining: r.Int63n(maxLongWritesPerTrace),
59 tempoOrgID: tempoOrgID,
60 }
61}
62
63// NewTraceInfos creates multiple trace infos with slightly different timestamps to ensure
64// different trace seeds are used.

Callers 15

TestRunValidationFunction · 0.92
RunValidationMethod · 0.92
TestResponseFixtureFunction · 0.92
TestEqualTracesFunction · 0.92
TestTraceIsReadyFunction · 0.92
doQueryTraceFunction · 0.92
TestDoReadForAnOkReadFunction · 0.92
TestSearchTraceqlFunction · 0.92
TestSearchTagFunction · 0.92
TestDoSearchFunction · 0.92

Calls 1

newRandFunction · 0.85

Tested by 15

TestRunValidationFunction · 0.74
TestResponseFixtureFunction · 0.74
TestEqualTracesFunction · 0.74
TestTraceIsReadyFunction · 0.74
doQueryTraceFunction · 0.74
TestDoReadForAnOkReadFunction · 0.74
TestSearchTraceqlFunction · 0.74
TestSearchTagFunction · 0.74
TestDoSearchFunction · 0.74
TestDoSearchErrorFunction · 0.74