Skip to content

ref(v9): Remove v9 todos #12740

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 3 commits into from
Feb 17, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -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? */}

<PlatformSection notSupported={["javacript.cordova", "javascript.capacitor", "javascript.electron"]}>

<Alert title="Deprecation 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, autoSessionTracking is no longer available but we still mention it above. I'm not 100% familiar with the replacement but my guess is we should document the httpIntegration option mentioned in the deprecation notice?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I updated the docs according to the migration guide.


</Alert>

</PlatformSection>
A session is automatically created for every node process by the `processSessionIntegration` which is configured by default.
8 changes: 0 additions & 8 deletions platform-includes/getting-started-use/javascript.nestjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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}
Expand Down