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

Function TokenForTraceID

pkg/util/hash.go:19–23  ·  view source on GitHub ↗

TokenForTraceID generates a hashed value for a trace id. Used for bloom lookups. Do not change because it will break lookups on existing bloom filters.

(b []byte)

Source from the content-addressed store, hash-verified

17// TokenForTraceID generates a hashed value for a trace id. Used for bloom lookups.
18// Do not change because it will break lookups on existing bloom filters.
19func TokenForTraceID(b []byte) uint32 {
20 h := fnv.New32()
21 _, _ = h.Write(b)
22 return h.Sum32()
23}
24
25// HashForTraceID generates a generic hash for the trace ID, suitable for mapping and deduping.
26func HashForTraceID(tid []byte) uint64 {

Callers 1

ShardKeyForTraceIDFunction · 0.92

Calls 1

WriteMethod · 0.65

Tested by

no test coverage detected