-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[prometheusremotewriteexporter] Allow to disable sanitize metric labels #8270
Merged
Merged
Changes from 5 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
93b59d4
[pkg/translator/prometheusremotewrite] Allow to disable sanitize metr…
newly12 ee2d5f3
update CHANGELOG
newly12 57c4158
update CHANGELOG
newly12 8aee10b
export sanitizeLabel in config
newly12 053deb9
Revert "export sanitizeLabel in config"
newly12 ea10855
Merge branch 'main' into label_sanitize
newly12 ad9de72
Merge remote-tracking branch 'origin/main' into label_sanitize
newly12 c135782
Merge remote-tracking branch 'origin/main' into label_sanitize
newly12 1902878
fix deprecated pdata.AttributeValue and issue introduced while fixing…
newly12 5725154
Merge remote-tracking branch 'origin/main' into label_sanitize
newly12 a1470f8
Merge remote-tracking branch 'origin/main' into label_sanitize
newly12 0203fc5
move sanitizeLabel switch to feature gate
newly12 c75b35d
update CHANGELOG
newly12 1fbb965
move feature gate check in sanitize method
newly12 d6c9c3d
Merge branch 'main' into label_sanitize
newly12 3cf41e1
fix CHANGELOG
newly12 99123a2
Merge branch 'main' into label_sanitize
newly12 02e5a9f
fmt and fix UT
newly12 8469afb
Merge branch 'main' into label_sanitize
newly12 3848f57
Update CHANGELOG.md
newly12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be done without changing the exported interface of the PRW translator package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see much options, one is to introduce a feature flag in the translator package, but I was thinking to reuse the same feature flag as basically it's about the same thing as #7112 , thus an additional fields in
prometheusremotewrite.Settings
will be introduced to follow previous behavior by default.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing is that feature gates are intended to be temporary and removed eventually. Changes to the public API of a package are not reversible (assuming a world where we're v1.x, which we need to start planning for) and thus should be avoided in conjunction with feature gates. It is hypothesized that the sanitization of labels starting with
_
(but not__
) is unnecessary, so perhaps we should focus on finding a way to gain confidence in that hypothesis and eliminating the need for this feature gate.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the concern of changing the public API in translator, but it's still the same behavior by default, with regards to gain confidence in the hypothesis, I am not sure how we can move forward on that. could you please elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @Aneurysm9 any thoughts on how we can move forward on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then we should probably eliminate it altogether rather than further propagating it. Changing the public API of this module does not seem like the correct thing to do.
I'm not sure I'm comfortable making this decision by myself. @dashpole @bogdandrutu @jpkrohling @codeboten @gouthamve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that sounds like this will be a breaking change which is going to remove the
key
prefix.If not to change the public API, would it work that introduce a new method similar to
FromMetrics
which does not sanitize label(nokey
prefix)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I share the same opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also agree we should not change the public API. We should either make the change outright, or use a feature-gate to slowly make the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a feature gate for this.