-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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(processors.parser): Add base64 decode option #15130
Comments
@RodrigoDornelles I think if we do this it should be a property of the |
After talking to the team, we decided we would be cool with adding an option to the parser processor to be able to base64 decode values. We would take a list of fields to decode, which must be a subset of the parse_fields option. Happy to see a PR. |
@powersj I can try to create a PR, I'm still learning Golang, can you give an example of how you would like the configuration to be? |
Sure, here is a breakdown of what needs to happen: First, add the config options to the ## Fields to base64 decode
## This list of fields must be a subset of parse_fields. Fields specified
## here will have base64 decode applied to them.
# base64_fields = [] Then run Second, add the new option to the parser processors' struct with toml tags. Base64Fields []string toml:"base64_fields"` Third, you would want to verify in the parser's Finally, add some tests that cover both decoding some fields, as well as a negative test were the Hope that helps! |
Use Case
can be used to decode in specific fields, remove old fields parsed and add preffix/suffix.
actual
proposal
Expected behavior
which base-64 decodes before reading the json string.
Actual behavior
Additional info
It is interesting because when using a cross data format, it can end up shortening the work. such as a jsonbase64 field in my line protocol (influx).
The text was updated successfully, but these errors were encountered: