Skip to content

Commit 612b149

Browse files
authored
feat(node): Update Node LocalVariables integration for new option (#6134)
1 parent fb347b2 commit 612b149

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

src/platforms/common/configuration/options.mdx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -533,21 +533,9 @@ _(New in version 7.30.0)_
533533

534534
</ConfigKey>
535535

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

538-
Enables the `LocalVariables` integration, which adds stack local variables to
539-
stack traces.
540-
541-
```javascript
542-
import * as Sentry from "@sentry/node";
543-
544-
Sentry.init({
545-
dsn: "___PUBLIC_DSN___",
546-
_experiments: {
547-
includeStackLocals: true,
548-
},
549-
});
550-
```
538+
Adds stack local variables to stack traces.
551539

552540
</ConfigKey>
553541

src/platforms/node/common/configuration/integrations/default-integrations.mdx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,22 @@ Available options:
143143

144144
_Import name: `Sentry.Integrations.LocalVariables`_
145145

146-
_(Available in version 7.30.0 and above)_
146+
_(Available in version 7.32.0 and above)_
147147

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

150-
It's currently enabled via the <PlatformLink to="/configuration/options/#_experiments.include-stack-locals">_experiments.includeStackLocals</PlatformLink>
151-
`init` option.
150+
To enable this integration, set the <PlatformLink to="/configuration/options/#include-local-variables">includeLocalVariables</PlatformLink>
151+
`init` option to `true`.
152+
153+
Available options:
154+
155+
```ts
156+
{
157+
// Capture local variables for both handled and unhandled exceptions.
158+
// Default: false - Only captures local variables for uncaught exceptions.
159+
captureAllExceptions?: boolean;
160+
}
161+
```
152162

153163
### Modules
154164

0 commit comments

Comments
 (0)