MCPcopy Create free account
hub / github.com/cortexproject/cortex / tokenForMetadata

Method tokenForMetadata

pkg/distributor/distributor.go:568–574  ·  view source on GitHub ↗
(userID string, metricName string)

Source from the content-addressed store, hash-verified

566}
567
568func (d *Distributor) tokenForMetadata(userID string, metricName string) uint32 {
569 if d.cfg.ShardByAllLabels {
570 return shardByMetricName(userID, metricName)
571 }
572
573 return shardByUser(userID)
574}
575
576// shardByMetricName returns the token for the given metric. The provided metricName
577// is guaranteed to not be retained.

Callers 1

prepareMetadataKeysMethod · 0.95

Calls 2

shardByMetricNameFunction · 0.85
shardByUserFunction · 0.85

Tested by

no test coverage detected