Closed usamaejaz closed 2 years ago
Any update? Just because of this, I am not able to use Sentry fully in our node server.
Hi @usamaejaz, have you tried updating to the newest version of @sentry/node
? v4 is quite old already, as the newest version currently (at the time of writing this) is v6.19.6 and we're actively working on v7.
Package + Version
@sentry/browser
@sentry/node
=^4.1.1
raven-js
raven-node
(raven for node)Version:
Description
Sentry patches HTTP modules for request tracking. In doing so, it builds URL from
host
header: https://github.com/getsentry/sentry-javascript/blob/master/packages/node/src/integrations/utils/http.ts#L28On the other hand, a private library we use removes host and connection from request headers in the case of http2. The http2 request is made by
got
module (I assume it uses the modules that sentry patches).So, sentry constructs request url from host or hostname and it ends up building urls like: http://:80 or http://:443 which go to localhost.
This was very hard to track down and Sentry (gave us a lot of trouble and buggy behavior - ironic, we do love sentry though).