You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hertz has a lot of users currently using sentry, some of them are sensitive to interface latency, we found that sentry-go only supports setting http.Request but not hertz's Request, and we need an additional conversion.
Motivation
If it can be changed to interface, we can remove this conversion, bringing latency and CPU performance gains.
It may not be an interface, or there may be other options that don't require the conversion of http.Request.
li-jin-gou
changed the title
Can http.Request be changed to interface to avoid extra conversion for fasthtttp or hertz.
http.Request be changed to interface to avoid extra conversion for fasthtttp or hertz.
Jan 6, 2024
In essence, this would require us to change Scope.request from *http.Request to sentry.Request as that's what used underneath in the event (we convert *http.Request to sentry.Request to use for event HERE).
This isn't a breaking change because the request isn't exposed.
It would require changes in all integrations that set this request (instead of setting http.Request we'd be setting sentry.Request), but reduce the extra conversion from libraries (including Hertz) that don't use custom requests.
Summary
Hertz has a lot of users currently using sentry, some of them are sensitive to interface latency, we found that sentry-go only supports setting http.Request but not hertz's Request, and we need an additional conversion.
Motivation
If it can be changed to interface, we can remove this conversion, bringing latency and CPU performance gains.
It may not be an interface, or there may be other options that don't require the conversion of http.Request.
Additional Context
The text was updated successfully, but these errors were encountered: