Skip to content

Commit eb92127

Browse files
Lms24AbhiPrasad
andauthored
Apply suggestions from code review
Co-authored-by: Abhijeet Prasad <[email protected]>
1 parent 69ade06 commit eb92127

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

CHANGELOG.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@
88

99
### Important Changes
1010

11-
- **feat(core)**: Make `runWithAsyncContext` public API (#7817)
12-
- **feat(node)**: Auto-select best `AsyncContextStrategy` for Node.js version (#7804)
1311

14-
This release introduces an new API to the Node SDK: `runWithAsyncContext` can be used to isolate Sentry scope and breadcrumbs to a single request if you are finding that breadcrumbs and scope are leaking across requests.
15-
With this new API, the SDK will use `AsyncLocalStorage` in favour of domains if you're using Node 14 or newer. It still falls back to using domains on older Node versions.
12+
- **feat(node): Add `AsyncLocalStorage` implementation of `AsyncContextStrategy` (#7800)**
13+
- feat(core): Extend `AsyncContextStrategy` to allow reuse of existing context (#7778)
14+
- feat(core): Make `runWithAsyncContext` public API (#7817)
15+
- feat(core): Add async context abstraction (#7753)
16+
- feat(node): Adds `domain` implementation of `AsyncContextStrategy` (#7767)
17+
- feat(node): Auto-select best `AsyncContextStrategy` for Node.js version (#7804)
18+
- feat(node): Migrate to domains used through `AsyncContextStrategy` (#7779)
1619

17-
Here's a usage example for [using Sentry in a Koa project](https://docs.sentry.io/platforms/node/guides/koa/#monitor-performance), where previously, you needed to use domains:
20+
This release switches the SDK to use [`AsyncLocalStorage`](https://nodejs.org/api/async_context.html#class-asynclocalstorage) as the async context isolation mechanism in the SDK for Node 14+. For Node 10 - 13, we continue to use the Node [`domain`](https://nodejs.org/api/domain.html) standard library, since `AsyncLocalStorage` is not supported there. **Preliminary testing showed [a 30% improvement in latency and rps](https://github.com/getsentry/sentry-javascript/issues/7691#issuecomment-1504009089) when making the switch from domains to `AsyncLocalStorage` on Node 16.**
21+
22+
If you want to manually add async context isolation to your application, you can use the new `runWithAsyncContext` API.
1823

1924
```js
2025
const requestHandler = (ctx, next) => {

0 commit comments

Comments
 (0)