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

Function NewTraceInfoWithMaxLongWrites

pkg/util/trace_info.go:74–85  ·  view source on GitHub ↗
(timestamp time.Time, maxLongWrites int64, tempoOrgID string)

Source from the content-addressed store, hash-verified

72}
73
74func NewTraceInfoWithMaxLongWrites(timestamp time.Time, maxLongWrites int64, tempoOrgID string) *TraceInfo {
75 r := newRand(timestamp)
76
77 return &TraceInfo{
78 timestamp: timestamp,
79 r: r,
80 traceIDHigh: r.Int63(),
81 traceIDLow: r.Int63(),
82 longWritesRemaining: maxLongWrites,
83 tempoOrgID: tempoOrgID,
84 }
85}
86
87func (t *TraceInfo) Ready(now time.Time, writeBackoff, longWriteBackoff time.Duration) bool {
88 // Don't use the last time interval to allow the write loop to finish before

Callers 2

writeValidationTraceMethod · 0.92
TestQueueFutureBatchesFunction · 0.92

Calls 1

newRandFunction · 0.85

Tested by 1

TestQueueFutureBatchesFunction · 0.74