Skip to content

Fix when multiple label names normalize to the same string#824

Open
frh-td wants to merge 2 commits into
prometheus:masterfrom
frh-td:duplicate-label-names
Open

Fix when multiple label names normalize to the same string#824
frh-td wants to merge 2 commits into
prometheus:masterfrom
frh-td:duplicate-label-names

Conversation

@frh-td

@frh-td frh-td commented Sep 25, 2025

Copy link
Copy Markdown

Fixes #774.

I am not a Java programmer, so apologies for any mistakes. From my testing, this works well and fixes the issue.

Signed-off-by: frh-td <73470898+frh-td@users.noreply.github.com>
@frh-td frh-td force-pushed the duplicate-label-names branch from a2f5ec2 to 24be9d9 Compare September 25, 2025 10:45

@SuperQ SuperQ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the issue it says "take the last value", but I think this will only take the first matched value.

But I think this is also fine.

It would be nice to document this somewhere.

@hiSandog

hiSandog commented Jul 4, 2026

Copy link
Copy Markdown

The duplicate-normalized-label case should probably test both collision detection and deterministic naming. A fixture with two CloudWatch dimensions that normalize to the same Prometheus label name would prove the exporter either rejects the metric with a clear error or applies a stable disambiguation rule. That is important because silently overwriting one label value would produce valid-looking but misleading time series.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: Tags that normalize to the same label name causes error

3 participants