Skip to content

[receiver/webhookevent] Allow multiple lines via configuration #38037

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

Closed
mterhar opened this issue Feb 18, 2025 · 1 comment · Fixed by #38042
Closed

[receiver/webhookevent] Allow multiple lines via configuration #38037

mterhar opened this issue Feb 18, 2025 · 1 comment · Fixed by #38042
Labels
enhancement New feature or request needs triage New item requiring triage receiver/webhookevent

Comments

@mterhar
Copy link
Member

mterhar commented Feb 18, 2025

Component(s)

receiver/webhookevent

Is your feature request related to a problem? Please describe.

The fix for multi-line logs from a while back prevents deliberately batching multiple events by using a line break. The specific goal I have here is to support Auth0 web hooks and similarly setup, very concise events that wouldn't have multiple lines.

Prior fix: #3502

Describe the solution you'd like

I agree that the present default is better for most webhook situations, however some use fewer webhooks with batches of events in the body. I'd like to add a configuration such as SplitLogsAtNewLine and when set to True, it would use the default bufio reader.

Describe alternatives you've considered

I've looked into the other approaches within the webhook products, array of JSON, and object full of objects. In either case, the unmarshalling process will create more confusion and rigidity.

With the newline break approach, it will allow a transform processor to be used for further parsing/flattening. It also allows a filter processor to sanity test that the body lines are properly formatted. The current approach of putting them all in one body prevents the other transforms from splitting them back out.

Additional context

I'm happy to submit the PR for this.

@mterhar mterhar added enhancement New feature or request needs triage New item requiring triage labels Feb 18, 2025
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage New item requiring triage receiver/webhookevent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant