Skip to content

Commit

Permalink
Add shard label in collstats metrics (#942)
Browse files Browse the repository at this point in the history
  • Loading branch information
steveteuber authored Nov 4, 2024
1 parent a4a57db commit c99ea6e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions exporter/collstats_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ func (d *collstatsCollector) collect(ch chan<- prometheus.Metric) {
labels["collection"] = collection

for _, metrics := range stats {
if shard, ok := metrics["shard"].(string); ok {
labels["shard"] = shard
}

for _, metric := range makeMetrics(prefix, metrics, labels, d.compatibleMode) {
ch <- metric
}
Expand Down

0 comments on commit c99ea6e

Please sign in to comment.