Skip to content
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

LocalVariables integration - fails to capture local variables properly when stack has a sync/async boundary #13417

Closed
3 tasks done
Bruno-DaSilva opened this issue Aug 18, 2024 · 5 comments
Assignees
Labels
Package: node Issues related to the Sentry Node SDK Stale

Comments

@Bruno-DaSilva
Copy link

Bruno-DaSilva commented Aug 18, 2024

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

8.26.0

Framework Version

Node v20.12.2

Link to Sentry event

https://clearbanc.sentry.io/issues/5724968061/events/74e0a0947fb8464fa4a326fa2ea48576/

Reproduction Example/SDK Setup

SDK setup:

Sentry.init({
  dsn: process.env.SENTRY_DSN,
  includeLocalVariables: true,
});

Steps to Reproduce

Basically what this issue found: #11194

  1. Init sentry with includeLocalVariables: true
  2. call an async function
  3. throw an exception within that async function
  4. capture the thrown error

Expected Result

Errors in the sentry UI should show the local variables for the entire callstack, async and sync, based on this comment #11194 (comment)

Actual Result

You'll only see variables for the most recent sync calls up until the async barrier, and then no additional variables before that. This appears to be behaviour seen in multiple git issues, as a limitation of the v8 engine, for example in dart and the vscode js debugger microsoft/vscode-js-debug#353 (comment).

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Aug 18, 2024
@github-actions github-actions bot added the Package: node Issues related to the Sentry Node SDK label Aug 18, 2024
@Bruno-DaSilva
Copy link
Author

I'm hoping with the digging I've done to root cause these it shouldn't require a high effort repro example -- but if it's needed I can create one (it'll just take me some time that I don't immediately have).

@Lms24
Copy link
Member

Lms24 commented Aug 19, 2024

Hey @Bruno-DaSilva thanks for writing in!

We'll look into your issue Next week as this week is Hackweek at Sentry (see #13421).

@timfish
Copy link
Collaborator

timfish commented Sep 10, 2024

@Bruno-DaSilva do you have an example that replicates this?

I've tried adding some async into our existing integration tests and still get local variables.

@Bruno-DaSilva
Copy link
Author

@timfish I'll try and find some time to put together a somewhat minimal reproducible example. I've only tested this bit in our actual full apps so far.

@getsantry
Copy link

getsantry bot commented Jan 1, 2025

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label Jan 1, 2025
@getsantry getsantry bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: node Issues related to the Sentry Node SDK Stale
Projects
Archived in project
Development

No branches or pull requests

6 participants