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

Function HashForTraceID

pkg/util/hash.go:26–30  ·  view source on GitHub ↗

HashForTraceID generates a generic hash for the trace ID, suitable for mapping and deduping.

(tid []byte)

Source from the content-addressed store, hash-verified

24
25// HashForTraceID generates a generic hash for the trace ID, suitable for mapping and deduping.
26func HashForTraceID(tid []byte) uint64 {
27 h := fnv.New64()
28 _, _ = h.Write(tid)
29 return h.Sum64()
30}

Callers 4

requestsByTraceIDFunction · 0.92
FindByTraceIDMethod · 0.92
TestHashForNoCollisionsFunction · 0.85
TestHashForCollisionRateFunction · 0.85

Calls 1

WriteMethod · 0.65

Tested by 2

TestHashForNoCollisionsFunction · 0.68
TestHashForCollisionRateFunction · 0.68