Skip to content

Commit

Permalink
Add shard label in collstats metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
steveteuber committed Nov 4, 2024
1 parent deaf106 commit da221fb
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 da221fb

Please sign in to comment.