-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat(agent): Allow separators for namepass and namedrop filters #14361
Conversation
Thanks so much for the pull request! |
!signed-cla |
@srebhan can you help review 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.
Thanks for the nice and comprehensive PR @akash-rubrik! Especially for the unit-test!!! Just have two minor comments...
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.
Thanks for the update @akash-rubik! This was exactly what I meant. I have two small formatting comments and a request to leave existing tests as-is to also test backward-compatibility. We are very close IMO...
config/testdata/single_plugin.toml
Outdated
namepass = ["metricname1"] | ||
namepass_separator = "." | ||
namedrop = ["metricname2"] | ||
namedrop_separator = "." | ||
fieldpass = ["some", "strings"] |
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 you please leave existing tests as they were!? We usually use them as a guarantee for backward-compatibility... Same for the other toml files below. If you want to test something, just add a new config or test.
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.
makes sense, done
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.
Thanks for this feature. The only thing I'm wondering is if there is any scenario you would have a different separator for Pass or for Drop? It looks a bit too much to have 2 separate config items for that..
9a851dc
to
c9e341e
Compare
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
Fair point, I just didn't want to make it confusing and cause any unintended effects. So providing more customizability seemed the best option. |
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.
Awesome! Thanks for your contribution @akash-rubrik!
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.
Thank you!
Required for all PRs
resolves #14056