We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1ca94b commit a2f5ec2Copy full SHA for a2f5ec2
src/main/java/io/prometheus/cloudwatch/CloudWatchCollector.java
@@ -639,8 +639,12 @@ private void scrape(List<MetricFamilySamples> mfs) {
639
// "tag_" prefix
640
// The AWS tags are case sensitive, so to avoid loosing information and label
641
// collisions, tag keys are not snaked cased
642
- labelNames.add("tag_" + safeLabelName(tag.key()));
643
- labelValues.add(tag.value());
+ String labelName = "tag_" + safeLabelName(tag.key());
+ // If multiple labels end up with the same safe label name, use only the first
644
+ if (!labelNames.contains(labelName)) {
645
+ labelNames.add(labelName);
646
+ labelValues.add(tag.value());
647
+ }
648
}
649
650
infoSamples.add(
0 commit comments