nerdswords / yet-another-cloudwatch-exporter

Prometheus exporter for AWS CloudWatch - Discovers services through AWS tags, gets CloudWatch metrics data and provides them as Prometheus metrics with AWS tags as labels
Apache License 2.0
959 stars 330 forks source link

promutil: clean up prom metric names that duplicate parts of the namespace #1380

Closed tristanburgess closed 5 months ago

tristanburgess commented 5 months ago

See https://github.com/grafana/cloud-onboarding/pull/6490#issuecomment-2047563725

This PR makes it so that Prom metric names look more clean in the case that a cloudwatch metric name duplicates part of the namespace as a prefix. For example, Glue namespace metrics are all prefaced with glue.. Therefore, without this change, the prom metrics would appear as aws_glue_glue as a prefix of the name.