opentelemetry-go-contrib
opentelemetry-go-contrib copied to clipboard
otelslog: Limit the size of kvBuffer returned to the pool
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, I am removing it from Go: Logs (GA) as I do not see it as a GA blocker.