Skip to content

doc(migration): Add entry for runWithAsyncContext #12153

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
May 22, 2024
Merged
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
19 changes: 18 additions & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -706,10 +706,11 @@ You can import from `@sentry/browser` (or from a respective SDK package like `@s

### Server-side SDKs (Node, Deno, Bun, etc.)

Removed top-level exports: `enableAnrDetection`, `Anr`, `deepReadDirSync`
Removed top-level exports: `enableAnrDetection`, `Anr`, `deepReadDirSync`, `runWithAsyncContext`

- [Removal of `enableAnrDetection` and `Anr` class](./MIGRATION.md#removal-of-enableanrdetection-and-anr-class)
- [Removal of `deepReadDirSync` method](./MIGRATION.md#removal-of-deepreaddirsync-method)
- [Removal of `runWithAsyncContext` method](./MIGRATION.md#removal-of-runwithasynccontext-method)

#### Removal of `enableAnrDetection` and `Anr` class

Expand All @@ -720,6 +721,22 @@ The `enableAnrDetection` and `Anr` class have been removed. See the

The `deepReadDirSync` method has been removed. There is no replacement API.

#### Removal of `runWithAsyncContext` method

The `runWithAsyncContext` method has been removed in favour of `Sentry.withIsolationScope`.

```js
// before (v7)
Sentry.runWithAsyncContext(() => {
// Your code here...
});

// after (v8)
Sentry.withIsolationScope(() => {
// Your code here...
});
```

### Next.js SDK

Removed top-level exports: `withSentryApi`, `withSentryAPI`, `withSentryGetServerSideProps`, `withSentryGetStaticProps`,
Expand Down
Loading