Skip to content

Commit 9e690af

Browse files
committed
meta: Update CHANGELOG for 7.48.0
Apply suggestions from code review Co-authored-by: Abhijeet Prasad <[email protected]> links links links update SvelteKit section add remaining entries
1 parent 21a975e commit 9e690af

File tree

1 file changed

+91
-0
lines changed

1 file changed

+91
-0
lines changed

CHANGELOG.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,97 @@
44

55
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
66

7+
## 7.48.0
8+
9+
### Important Changes
10+
11+
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)
19+
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.
23+
24+
```js
25+
const requestHandler = (ctx, next) => {
26+
return new Promise((resolve, reject) => {
27+
Sentry.runWithAsyncContext(
28+
async hub => {
29+
hub.configureScope(scope =>
30+
scope.addEventProcessor(event =>
31+
Sentry.addRequestDataToEvent(event, ctx.request, {
32+
include: {
33+
user: false,
34+
},
35+
})
36+
)
37+
);
38+
39+
await next();
40+
resolve();
41+
},
42+
{ emitters: [ctx] }
43+
);
44+
});
45+
};
46+
```
47+
48+
If you're manually using domains to isolate Sentry data, we strongly recommend switching to this API!
49+
50+
In addition to exporting `runWithAsyncContext` publicly, the SDK also uses it internally where we previously used domains.
51+
52+
- **feat(sveltekit): Remove `withSentryViteConfig` (#7789)**
53+
- feat(sveltekit): Remove SDK initialization via dedicated files (#7791)
54+
55+
This release removes our `withSentryViteConfig` wrapper we previously instructed you to add to your `vite.config.js` file. It is replaced Vite plugins which you simply add to your Vite config, just like the `sveltekit()` Vite plugins. We believe this is a more transparent and Vite/SvelteKit-native way of applying build time modifications. Here's how to use the plugins:
56+
57+
```js
58+
// vite.config.js
59+
import { sveltekit } from '@sveltejs/kit/vite';
60+
import { sentrySvelteKit } from '@sentry/sveltekit';
61+
62+
export default {
63+
plugins: [sentrySvelteKit(), sveltekit()],
64+
// ... rest of your Vite config
65+
};
66+
```
67+
68+
Take a look at the [`README`](https://github.com/getsentry/sentry-javascript/blob/develop/packages/sveltekit/README.md) for updated instructions!
69+
70+
Furthermore, with this transition, we removed the possibility to intialize the SDK in dedicated `sentry.(client|server).config.js` files. Please use SvelteKit's [hooks files](https://github.com/getsentry/sentry-javascript/blob/develop/packages/sveltekit/README.md#2-client-side-setup) to initialize the SDK.
71+
72+
Please note that these are **breaking changes**! We're sorry for the inconvenience but the SvelteKit SDK is still in alpha stage and we want to establish a clean and SvelteKit-friendly API before making the SDK stable. You have been [warned](https://github.com/getsentry/sentry-javascript/blob/eb921275f9c572e72c2348a91cb39fcbb8275b8d/packages/sveltekit/README.md#L20-L24) ;)
73+
74+
- **feat(sveltekit): Add Sentry Vite Plugin to upload source maps (#7811)**
75+
76+
This release adds automatic upload of source maps to the SvelteKit SDK. No need to configure anything other than adding our Vite plugins to your SDK. The example above shows you how to do this.
77+
78+
Please make sure to follow the [`README`](https://github.com/getsentry/sentry-javascript/blob/develop/packages/sveltekit/README.md#uploading-source-maps) to specify your Sentry auth token, as well as org and project slugs.
79+
80+
### Additional Features and Fixes
81+
82+
- feat(browser): Export request instrumentation options (#7818)
83+
- feat(core): Add async context abstraction (#7753)
84+
- feat(core): Add DSC to all outgoing envelopes (#7820)
85+
- feat(node): Add checkin envelope types (#7777)
86+
- feat(replay): Add `getReplayId()` method (#7822)
87+
- fix(browser): Adjust `BrowserTransportOptions` to support offline transport options (#7775)
88+
- fix(browser): DOMException SecurityError stacktrace parsing bug (#7821)
89+
- fix(core): Log warning when tracing extensions are missing (#7601)
90+
- fix(core): Only call `applyDebugMetadata` for error events (#7824)
91+
- fix(integrations): Ensure httpclient integration works with Request (#7786)
92+
- fix(node): `reuseExisting` does not need to call bind on domain (#7780)
93+
- fix(node): Fix domain scope inheritance (#7799)
94+
- fix(node): Make `trpcMiddleware` factory synchronous (#7802)
95+
- fix(serverless): Account when transaction undefined (#7829)
96+
- fix(utils): Make xhr instrumentation independent of parallel running SDK versions (#7836)
97+
798
## 7.47.0
899

9100
### Important Changes

0 commit comments

Comments
 (0)