@sentry/browser
@sentry/node
raven-js
raven-node
_(raven for node)_5.13.2
I noticed that my Node stack traces appear very short in Sentry, which makes errors hard to debug.
IIUC, raven-node
used to set Error.stackTraceLimit = Infinity
. https://github.com/getsentry/raven-node/blob/6dbb5ef37ccd536360d5f73b601a42faee23b2f4/index.js#L10
@sentry/browser
still sets this, but @sentry/node
does not. Is there a reason for that?
We just didn't want to enforce it, as this change can be applied by everyone manually.
Error.stackTraceLimit = 50;
Sentry.init({ ... });
This will work just fine.
Makes sense, thank you. It might be worth adding a note about this to the docs, as the default stack trace size is pretty useless IMO.
the default stack trace size is pretty useless IMO.
I'd argue about that, as default is 10
, and having to go any further without a lot of additional framework layers shouldn't be necessary 馃槄
Can you elaborate? I'm not quite sure what you mean. Are you saying to blackbox framework scripts so they don't appear in the stack trace?
No, no. I mean, that the limit will show top, not bottom frames. And if top 10 bottom frames are not coming from your own code then there's something with the code itself imo. It should be enough to determine where the issue comes from. Although I agree that there are _some_ cases where it might not be enough.