Skip to content

Commit f15e28a

Browse files
andreiborzas1gr1dLms24AbhiPrasad
authored
feat(js): Add v10 migration guide (#14506)
> [!IMPORTANT] > This is opened as a draft PR to ensure it's only merged after we release v10. Reviews can already happen. --------- Co-authored-by: Sigrid Huemer <[email protected]> Co-authored-by: Lukas Stracke <[email protected]> Co-authored-by: Abhijeet Prasad <[email protected]>
1 parent 393834c commit f15e28a

File tree

1 file changed

+99
-0
lines changed

1 file changed

+99
-0
lines changed
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
title: Migrate from 9.x to 10.x
3+
sidebar_order: 8880
4+
description: "Learn about migrating from Sentry JavaScript SDK 9.x to 10.x"
5+
notSupported:
6+
- javascript.capacitor
7+
- javascript.cordova
8+
- javascript.electron
9+
---
10+
11+
<PlatformSection supported={["javascript"]}>
12+
<Alert title="Using a framework?" level="info">
13+
14+
Make sure to select your framework in the dropdown in the top left corner of the page.
15+
16+
</Alert>
17+
</PlatformSection>
18+
19+
Version 10 of the Sentry JavaScript SDK primarily focuses on upgrading underlying OpenTelemetry dependencies to v2 with minimal breaking changes.
20+
21+
Version 10 of the SDK is compatible with Sentry self-hosted versions 24.4.2 or higher (unchanged from v9).
22+
Lower versions may continue to work, but may not support all features.
23+
24+
## Version Support Changes:
25+
26+
Version 10 of the Sentry SDK has new compatibility ranges for runtimes and frameworks.
27+
28+
### Node.js
29+
30+
All OpenTelemetry dependencies have been bumped to `2.x.x` / `0.20x.x` respectively, and all OpenTelemetry instrumentations have been upgraded to their latest version.
31+
32+
If you cannot run with OpenTelemetry v2 versions, consider either staying on Version 9 of our SDKs or using [@sentry/node-core](https://www.npmjs.com/package/@sentry/node-core) instead, which ships with widened OpenTelemetry peer dependencies.
33+
34+
### AWS Lambda Layer Changes
35+
36+
A new AWS Lambda Layer for version 10 will be published as `SentryNodeServerlessSDKv10`.
37+
38+
Updates and fixes for version 9 will be published as `SentryNodeServerlessSDKv9`.
39+
40+
<PlatformCategorySection supported={['browser']}>
41+
42+
## Removed FID Web Vital reporting
43+
44+
**The SDKs no longer report the First Input Delay (FID) web vital**.
45+
46+
This was done because FID has been replaced by Interaction to Next Paint (INP) and is therefore no longer relevant for assessing and tracking a website's performance.
47+
For reference, FID has long been deprecated by Google's official `web-vitals` library and was eventually removed in version `5.0.0`.
48+
Sentry now follows Google's lead by also removing it.
49+
50+
The removal entails **no breaking API changes**. However, in rare cases, you might need to adjust some of your Sentry SDK and product setup:
51+
52+
- Remove any logic in `beforeSend` or other filtering/event processing logic that depends on FID or replace it with INP logic.
53+
- If you set up Sentry Alerts that depend on FID, be aware that these could trigger once you upgrade the SDK, due to a lack of new values.
54+
To replace them, adjust your alerts (or dashboards) to use INP.
55+
56+
## Removed `_experiments.autoFlushOnFeedback` for Session Replays
57+
58+
The `_experiments.autoFlushOnFeedback` option was removed and is now the default behavior.
59+
60+
</PlatformCategorySection>
61+
62+
## Removed APIs
63+
64+
The changes outlined in this section detail deprecated APIs that are now removed.
65+
66+
- `BaseClient` was removed, use `Client` as a direct replacement.
67+
- `hasTracingEnabled` was removed, use `hasSpansEnabled` as a direct replacement.
68+
- The internal `logger` and type `Logger` exports in `@sentry/core` were removed, use `debug` and type `SentryDebugLogger` instead. This does not affect the `logger` export used for [Sentry Logging](https://docs.sentry.io/product/explore/logs/getting-started/)
69+
- The `_experiments.enableLogs` and `_experiments.beforeSendLog` options were removed, use the top-level `enableLogs` and `beforeSendLog` options instead.
70+
71+
```js
72+
// before
73+
Sentry.init({
74+
_experiments: {
75+
enableLogs: true,
76+
beforeSendLog: (log) => {
77+
return log;
78+
},
79+
},
80+
});
81+
82+
// after
83+
Sentry.init({
84+
enableLogs: true,
85+
beforeSendLog: (log) => {
86+
return log;
87+
},
88+
});
89+
```
90+
91+
## Version Support Timeline
92+
93+
Version support timelines can be stressful for everybody using the SDK, so we won't be defining one.
94+
Instead, we will be applying bug fixes and features to older versions as long as there is demand.
95+
96+
Additionally, we hold ourselves accountable for any security issues, meaning that if any vulnerabilities are found, we will, in almost all, cases backport them.
97+
98+
Note, that backporting decisions are made on a case-by-case basis.
99+
If you need a fix or feature in a previous version of the SDK, please reach out via a [GitHub Issue](https://github.com/getsentry/sentry-javascript/issues).

0 commit comments

Comments
 (0)