Skip to content

feat(node): Update Node LocalVariables integration for new option #6134

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

Merged
merged 1 commit into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions src/platforms/common/configuration/options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -533,21 +533,9 @@ _(New in version 7.30.0)_

</ConfigKey>

<ConfigKey name="\_experiments.include-stack-locals" supported={["node"]}>
<ConfigKey name="include-local-variables" supported={["node"]}>

Enables the `LocalVariables` integration, which adds stack local variables to
stack traces.

```javascript
import * as Sentry from "@sentry/node";

Sentry.init({
dsn: "___PUBLIC_DSN___",
_experiments: {
includeStackLocals: true,
},
});
```
Adds stack local variables to stack traces.

</ConfigKey>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,22 @@ Available options:

_Import name: `Sentry.Integrations.LocalVariables`_

_(Available in version 7.30.0 and above)_
_(Available in version 7.32.0 and above)_

This integration adds stack local variables to stack frames for uncaught exceptions.

It's currently enabled via the <PlatformLink to="/configuration/options/#_experiments.include-stack-locals">_experiments.includeStackLocals</PlatformLink>
`init` option.
To enable this integration, set the <PlatformLink to="/configuration/options/#include-local-variables">includeLocalVariables</PlatformLink>
`init` option to `true`.

Available options:

```ts
{
// Capture local variables for both handled and unhandled exceptions.
// Default: false - Only captures local variables for uncaught exceptions.
captureAllExceptions?: boolean;
}
```

### Modules

Expand Down