diff --git a/platform-includes/configuration/auto-session-tracking/javascript.node.mdx b/platform-includes/configuration/auto-session-tracking/javascript.node.mdx index c873abdc882f0..7ed83295e2e2e 100644 --- a/platform-includes/configuration/auto-session-tracking/javascript.node.mdx +++ b/platform-includes/configuration/auto-session-tracking/javascript.node.mdx @@ -7,24 +7,14 @@ We mark the session as crashed if an _unhandled error_ reached our `errorHandler We mark the session as an error if the SDK captures an event that contains an exception (this includes manually captured exceptions). -By default, the JavaScript SDKs are sending sessions, to disable this toggle the flag `autoSessionTracking` to `false`: +By default, the SDK is sending sessions, to disable this configure the `httpIntegration` with the `trackIncomingRequestsAsSessions` option set to `false`. ```javascript Sentry.init({ - autoSessionTracking: false, // default: true + integrations: [Sentry.httpIntegration({ + trackIncomingRequestsAsSessions: false, // default: true + })] }); ``` -{/* TODO(v9): Remove this notice? */} - - - - - -{/* We don't use platform links here because we always have to link to node and browser here and doing a conditional just for that feels overkill. */} - -Starting with SDK version 8.43.0 and up, the `autoSessionTracking` option has been deprecated. You can use the [BrowserSession integration](/platforms/javascript/configuration/integrations/browsersession/) in browser environments and the [Http integration](/platforms/javascript/guides/node/configuration/integrations/http/) (via the `trackIncomingRequestsAsSessions` option) in Node.js runtime. - - - - +A session is automatically created for every node process by the `processSessionIntegration` which is configured by default. diff --git a/platform-includes/getting-started-use/javascript.nestjs.mdx b/platform-includes/getting-started-use/javascript.nestjs.mdx index dc5fe5d560f3d..dff137e0dd33b 100644 --- a/platform-includes/getting-started-use/javascript.nestjs.mdx +++ b/platform-includes/getting-started-use/javascript.nestjs.mdx @@ -52,9 +52,6 @@ export class YourCatchAllExceptionFilter implements ExceptionFilter { By default, only unhandled exceptions that are not caught by an error filter are reported to Sentry. `HttpException`s (including [derivatives](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)) are also not captured by default because they mostly act as control flow vehicles. -{/* TODO(v9): Remove this note */} -_Note that `@SentryExceptionCaptured()` was called `@WithSentry` in SDK versions `8.38.0` and prior._ - If you don't have a global catch-all exception filter, add the `SentryGlobalFilter` to the providers of your main module. This filter will report any unhandled errors that aren't caught by other error filters to Sentry. **Important:** The `SentryGlobalFilter` needs to be registered before any other exception filters. @@ -76,11 +73,6 @@ import { SentryGlobalFilter } from "@sentry/nestjs/setup"; export class AppModule {} ``` -{/* TODO(v9): Remove this note. */} - -**Note:** If you have a NestJS + GraphQL application and you are using the `@sentry/nestjs` SDK version `8.38.0` or earlier, replace the `SentryGlobalFilter` with the `SentryGlobalGenericFilter`. -In SDK versions `8.39.0` and above, the `SentryGlobalGenericFilter` is deprecated because the `SentryGlobalFilter` will handle GraphQL contexts automatically. - If you have error filters for specific types of exceptions (for example `@Catch(HttpException)`, or any other `@Catch(...)` with arguments) and you want to capture errors caught by these filters, capture the errors in the `catch()` handler with `Sentry.captureException()`: ```javascript {9}