sentry-javascript: Node Local Variables does not seem to work with ESM
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
SDK Version
7.32.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
import * as Sentry from '@sentry/node';
Sentry.init({
debug: true,
beforeSend: (event) => {
console.log(event.exception.values[0].stacktrace.frames[7]);
return null;
},
dsn: "https://00000000000000000000000000000000@o000000.ingest.sentry.io/0000000",
includeLocalVariables: true,
});
class Some {
two(name) {
throw new Error("Error with local variables");
}
}
function one(name) {
const arr = [1, "2", null];
const obj = {
name,
num: 5,
};
const ty = new Some();
ty.two(name);
}
one("some name");
Steps to Reproduce
https://discord.com/channels/621778831602221064/621786575591702529/1070801390223503502
Raised by @lbogdan (thanks!)
Expected Result
It works
Actual Result
ESM seems to be working with the inspector module differently.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (5 by maintainers)
What could maybe help as a first step is to add some tests for esm!