New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PM2 does not work with Raven #3063
Comments
Also note that "working" (as mentioned above) means that Sentry receives the user's ID parameter. If you run |
Furthermore, DSN is a token available through a free account at https://sentry.io. |
Does it works with |
Yes it does work @vmarchaud |
Maybe try with the vanilla nodejs implementation ? EDIT : Since we are just using the nodejs cluster, i want to know if the problem is inside our code or just with nodejs directly |
I have the same problem. However, even fork-mode does not work for me. I have tried pretty much everything (see https://forum.sentry.io/t/sourcemaps-for-node-app-behind-pm2-not-working/9536 and https://twitter.com/mbrochh/status/1252778718478491649?s=20) Really no idea what else to try, and I can't figure out if this is a PM2 issue or a Sentry issue. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hey everyone, you should NOT be using Raven. You should be using https://cabinjs.com instead. Sentry and Raven have some very core security related issues, and I built Cabin out of frustration with it and services like Timber, Airbrake, etc. |
Not sure how to resolve this - I think it is the usage of
domain
in the context of Raven.See getsentry/raven-node#355.
Basically
raven
(a package that supports logging for Sentry.io) provides a middleware for Express apps (as documented here). There is a middleware for handling requests and errors (so metadata like logged in user ID's, browser user-agent, IP address of user, and email address of user get sent along with logs).The script below works properly (it sends along the user's ID to Sentry for logging). However as soon as I run the script with
pm2
, e.g.pm2 start app.js -i 0
(with clustering enabled), the script stops working. I think this is due todomain
and clustering somehow, but I've not gone too deep here just yet. I was hoping someone here could take a look at theraven-node
lib/client.js
file available at https://github.com/getsentry/raven-node/blob/master/lib/client.js#L449-L459 and help debug this issue:.The text was updated successfully, but these errors were encountered: