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
{{ message }}
Repository navigation
Local variables missing when exception originates in node_modules dependency #12588
Sentry.init({
dsn: SENTRY_DSN,
integrations: [
new Sentry.Integrations.Http({ tracing: true }),
new Sentry.Integrations.Express({ app }),
new ProfilingIntegration(),
],
environment: ENV,
tracesSampleRate: 1.0,
profilesSampleRate: 1.0,
includeLocalVariables: true,
});
Steps to Reproduce
We have noticed a number of events in production missing local variables even though local variables are present in other events. We have noticed that it appears local variables are missing when the exception originates in dependency code, as opposed to our code.
Expected Result
Local variables to be present regardless of where the exception originates.
Actual Result
We have noticed a number of events in production missing local variables even though local variables are present in other events. We have noticed that it appears local variables are missing when the exception originates in dependency code, as opposed to our code.
Hey @andy-tazxap thanks for writing in! The current local variables implementation only grabs local variables from in_app frames (errors from direct app code)
Hey @AbhiPrasad thanks for getting back to me! Ahh that explains it, is that specified in the docs anywhere, just wondering if I was reading the wrong thing?
Yeah maybe making this opt-in would make sense me, I could definitely make the PR but I probably won't have the chance to do this for a month or so. I'll update here when I have it ready, if anyone needs this feature more urgently feel free to create the PR ahead of me!
Activity
AbhiPrasad commentedon Jun 20, 2024
Hey @andy-tazxap thanks for writing in! The current local variables implementation only grabs local variables from
in_appframes (errors from direct app code)sentry-javascript/packages/node/src/integrations/local-variables/local-variables-async.ts
Line 60 in dfa863a
We can consider exposing an opt-in option to attach variables to any kind of frame. Would you be interested in making a PR for this change?
andy-tazxap commentedon Jun 21, 2024
Hey @AbhiPrasad thanks for getting back to me! Ahh that explains it, is that specified in the docs anywhere, just wondering if I was reading the wrong thing?
Yeah maybe making this opt-in would make sense me, I could definitely make the PR but I probably won't have the chance to do this for a month or so. I'll update here when I have it ready, if anyone needs this feature more urgently feel free to create the PR ahead of me!
19 remaining items
fix(node-core): Fix local variables capturing for out-of-app frames (g…
JealousGx commentedon Sep 6, 2025
I've tried to fix this issue in #17545
RulaKhaled commentedon Sep 8, 2025
Hello @jelousGx thank you for submitting a PR! we will hopefully review this asap.
fix(node-core): Fix local variables capturing for out-of-app frames (#…
feat(node): Fix local variables capturing for out-of-app frames (#12588)
feat(node): Fix local variables capturing for out-of-app frames (#18245)
feat(node): Fix local variables capturing for out-of-app frames (#18245)
feat(node): Fix local variables capturing for out-of-app frames (#18245)
feat(node): Fix local variables capturing for out-of-app frames (#18245)
github-actions commentedon Nov 24, 2025
A PR closing this issue has just been released 🚀
This issue was referenced by PR #18245, which was included in the 10.27.0 release.