Skip to content

Commit 85158c5

Browse files
authored
doc(migration): Add entry for runWithAsyncContext (#12153)
Adds #10780 to the migration guide.
1 parent 4786a83 commit 85158c5

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

MIGRATION.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,10 +706,11 @@ You can import from `@sentry/browser` (or from a respective SDK package like `@s
706706
707707
### Server-side SDKs (Node, Deno, Bun, etc.)
708708
709-
Removed top-level exports: `enableAnrDetection`, `Anr`, `deepReadDirSync`
709+
Removed top-level exports: `enableAnrDetection`, `Anr`, `deepReadDirSync`, `runWithAsyncContext`
710710
711711
- [Removal of `enableAnrDetection` and `Anr` class](./MIGRATION.md#removal-of-enableanrdetection-and-anr-class)
712712
- [Removal of `deepReadDirSync` method](./MIGRATION.md#removal-of-deepreaddirsync-method)
713+
- [Removal of `runWithAsyncContext` method](./MIGRATION.md#removal-of-runwithasynccontext-method)
713714
714715
#### Removal of `enableAnrDetection` and `Anr` class
715716
@@ -720,6 +721,22 @@ The `enableAnrDetection` and `Anr` class have been removed. See the
720721
721722
The `deepReadDirSync` method has been removed. There is no replacement API.
722723
724+
#### Removal of `runWithAsyncContext` method
725+
726+
The `runWithAsyncContext` method has been removed in favour of `Sentry.withIsolationScope`.
727+
728+
```js
729+
// before (v7)
730+
Sentry.runWithAsyncContext(() => {
731+
// Your code here...
732+
});
733+
734+
// after (v8)
735+
Sentry.withIsolationScope(() => {
736+
// Your code here...
737+
});
738+
```
739+
723740
### Next.js SDK
724741
725742
Removed top-level exports: `withSentryApi`, `withSentryAPI`, `withSentryGetServerSideProps`, `withSentryGetStaticProps`,

0 commit comments

Comments
 (0)