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)
| 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. |
| 19 | func 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. |
| 26 | func HashForTraceID(tid []byte) uint64 { |
no test coverage detected