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

Function ShardKeyForTraceID

tempodb/encoding/common/bloom.go:83–85  ·  view source on GitHub ↗
(traceID []byte, shardCount int)

Source from the content-addressed store, hash-verified

81}
82
83func ShardKeyForTraceID(traceID []byte, shardCount int) int {
84 return int(util.TokenForTraceID(traceID)) % ValidateShardCount(shardCount)
85}
86
87// For backward compatibility
88func ValidateShardCount(shardCount int) int {

Callers 7

checkBloomMethod · 0.92
checkBloomMethod · 0.92
checkBloomMethod · 0.92
AddMethod · 0.85
TestMethod · 0.85
TestShardedBloomFunction · 0.85

Calls 2

TokenForTraceIDFunction · 0.92
ValidateShardCountFunction · 0.85

Tested by 2

TestShardedBloomFunction · 0.68