[integrations][CrowdStrike] - Fixed event tag handling for the falcon data-stream #7625
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.
Type of change
What does this PR do?
It was noted by many users that often falcon data-stream logs get dropped due to a tag parsing issue. The field in question here is the crowdstrike.event.Tags. It was observed from client feedback from SDHs and also personal testing that the value of this field can sometimes be an array of objects, a comma separated string or a normal string.
What existed in the pipeline:
The pipeline defined the field Tags as of type nested. This obviously caused issues when the value would be a string or a comma separated string as they would result in mapping errors when pushed to elasticsearch.
What was the solution:
having different tag fields for different type of Tags.
attributes per object into a string format "Key:ValueString" and append it to ctx.tags.
element of the list to ctx.tags
This ensures consistent tag handling across the data-stream for all type of logs.
Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Related issues
Screenshots