Skip to content

Support array-of-string in formatted HEC additional fields #447

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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

javabrett
Copy link
Contributor

Currently the sink cannot handle JSON fields keys/values where the value is an array of string e.g. ["value1", "value2"], when running with splunk.hec.json.event.formatted=true. HEC supports these records but the sink doesn't. This PR fixes that. See issue #444 for details.

Main change is project-wide change of fields map definition from Map<String, String> to Map<String, Object>. Jackson can then parse the array of string.

Added unit test.

Fixes #444 .

@Kawron Kawron self-requested a review August 18, 2025 08:06
Copy link
Collaborator

@Kawron Kawron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @javabrett for your contirbution. The PR looks good to me

@Kawron Kawron self-requested a review August 21, 2025 08:56
Copy link
Collaborator

@Kawron Kawron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@javabrett Could you pease rebase your PR. I've commited new changes, that has to be merged to your PR in order to run the testing pipeline

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.

Unable to parse List type metadata under "fields" key
3 participants