opentelemetry-go-contrib icon indicating copy to clipboard operation
opentelemetry-go-contrib copied to clipboard

otelslog: Limit the size of kvBuffer returned to the pool

Open MrAlias opened this issue 1 year ago • 1 comments

Limit the returned size so the pool doesn't hold on to very large buffers. Similar to https://cs.opensource.google/go/x/exp/+/814bf88c:slog/internal/buffer/buffer.go;l=27-34

Integration benchmark testing needs to be added along with the change to validate the performance improvement. Or this issue can be closed when that validation fails.

https://github.com/open-telemetry/opentelemetry-go-contrib/blob/59ebbee5c207bb6034462a75da61b79668fe9232/bridges/otelslog/handler.go#L357-L359

MrAlias avatar Mar 29 '24 19:03 MrAlias

@MrAlias, I am removing it from Go: Logs (GA) as I do not see it as a GA blocker.

pellared avatar Jul 11 '24 11:07 pellared