sentry-go icon indicating copy to clipboard operation
sentry-go copied to clipboard

scope.RequestBody empty while being set to event.Data in fasthttp/fiber integration

Open ribice opened this issue 1 year ago • 0 comments

I was debugging why fasthttp and fiber integration invoke SetRequest and then SetRequestBody immediately after, even though SetRequest sets the requestBody (same as SetRequestBody).

The issue is that for these two integrations, the Body has to be copied. Since the requestBody is lazily read (when Body is read), for these two integrations it never happens because we copied the Body and that copied Body is never read.

ribice avatar Mar 29 '24 23:03 ribice