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

Function ValidTraceID

pkg/validation/validate.go:6–8  ·  view source on GitHub ↗

ValidTraceID confirms that trace ids are 128 bits

(id []byte)

Source from the content-addressed store, hash-verified

4
5// ValidTraceID confirms that trace ids are 128 bits
6func ValidTraceID(id []byte) bool {
7 return len(id) == 16
8}
9
10func ValidSpanID(id []byte) bool {
11 return len(id) == 8 && !bytes.Equal(id, []byte{0, 0, 0, 0, 0, 0, 0, 0})

Callers 2

requestsByTraceIDFunction · 0.92
FindTraceByIDMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected