Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exporter/prometheusremotewrite] only append colliding attributes values if they are different #2

Conversation

avanish-vaghela
Copy link
Owner

@avanish-vaghela avanish-vaghela commented Dec 21, 2024

Description

While translating two OTel attributes into Prometheus Label, if two attributes being the same with the same value, this change avoids the situation of duplicate values separated by semicolon.

Example:

  • "bar.one": "foo"
  • "bar/one": "foo"

The above two attributes when translated to Prometheus label would become

  • Before this change
    • "bar_one": "foo;foo"
  • After the change
    • "bar_one": "foo"

Link to tracking issue

Fixes open-telemetry#35896

Testing

  • unit test added

Documentation

@avanish-vaghela avanish-vaghela force-pushed the avanish-vaghela/handle-identical-values-in-duplicate-labels branch from 81a6426 to 1d4cf32 Compare December 23, 2024 13:31
@avanish-vaghela avanish-vaghela deleted the avanish-vaghela/handle-identical-values-in-duplicate-labels branch December 23, 2024 16:42
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.

Prom rw translation, handle identical values in duplicate labels.
1 participant