Skip to content
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

Prepend JSON [ before encoding events in HttpSink to avoid relocating bytes #11253

Closed
pablosichert opened this issue Feb 8, 2022 · 0 comments · Fixed by #18200
Closed

Prepend JSON [ before encoding events in HttpSink to avoid relocating bytes #11253

pablosichert opened this issue Feb 8, 2022 · 0 comments · Fixed by #18200
Labels
type: task Generic non-code related tasks

Comments

@pablosichert
Copy link
Contributor

When the JSON encoding is selected the http sink prepends [ to the body after encoding events. To prepend to the byte buffer, memory of the whole body needs to be relocated or reallocated.

This could be avoided by introducing e.g. a prepare_body method that writes data to the empty body before encoding events.

Also see discussion in #11232 (comment) where this behavior has been resurfaced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task Generic non-code related tasks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant