Prepend JSON
[
before encoding events in HttpSink
to avoid relocating bytes
#11253
Labels
type: task
Generic non-code related tasks
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.
The text was updated successfully, but these errors were encountered: