Skip to content

Commit c99ea6e

Browse files
authored
Add shard label in collstats metrics (#942)
1 parent a4a57db commit c99ea6e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

exporter/collstats_collector.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ func (d *collstatsCollector) collect(ch chan<- prometheus.Metric) {
138138
labels["collection"] = collection
139139

140140
for _, metrics := range stats {
141+
if shard, ok := metrics["shard"].(string); ok {
142+
labels["shard"] = shard
143+
}
144+
141145
for _, metric := range makeMetrics(prefix, metrics, labels, d.compatibleMode) {
142146
ch <- metric
143147
}

0 commit comments

Comments
 (0)