Reputation: 73
How can I automatically capture local variables from Nodejs for sending to Sentry, like in the Python client?
I'm using Nodejs v12 and Express framework.
And how can I automatically capture local variables from Front-End, React.js?
Upvotes: 2
Views: 1083
Reputation: 129
19 Feb 2024 update
As simple as:
Sentry.init({
dsn: '...',
includeLocalVariables: true
})
Source: https://blog.sentry.io/local-variables-for-nodejs-in-sentry/
Upvotes: 1
Reputation: 3454
Sentry has a ticket on this, https://github.com/getsentry/sentry-javascript/issues/990. They made no progress on it because getting names and values of local variables in JS is barely possible. Getting All Variables In Scope
Upvotes: 1