honeycombio / libhoney-go

Go library for sending data to Honeycomb
Apache License 2.0
58 stars 40 forks source link

bug: log spam with GOAWAY errors; txmit not retried on GOAWAY #158

Closed lizthegrey closed 2 years ago

lizthegrey commented 2 years ago

error sending libhoney event: Post \"https://api-kibble.honeycomb.io/1/batch/retriever-traces\": http2: Transport: cannot retry err [http2: Transport received Server's graceful shutdown GOAWAY] after Request.Body was written; define Request.GetBody to avoid this error

this is related to the work I did to fix content-length; GetBody is defined if you pass in a raw bytes.Buffer but not if you pass a subclass or embed of bytes.Buffer. https://github.com/honeycombio/libhoney-go/pull/156#issuecomment-1004630525

lizthegrey commented 2 years ago

More specifically on this bug: while it prints a warning, we do have our external retry, but GOAWAY should be retried internally to http rather than needing us to externally retry. So it's better to support handling this directly by passing the bytes.Buffer directly into http.Request

MikeGoldsmith commented 2 years ago

Closed by #159