(userID string, metricName string)
| 566 | } |
| 567 | |
| 568 | func (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. |
no test coverage detected