Migrate from 9.x to 10.x
Learn about migrating from Sentry JavaScript SDK 9.x to 10.x
Version 10 of the Sentry JavaScript SDK primarily focuses on upgrading underlying OpenTelemetry dependencies to v2 with minimal breaking changes.
Version 10 of the SDK is compatible with Sentry self-hosted versions 24.4.2 or higher (unchanged from v9). Lower versions may continue to work, but may not support all features.
Version 10 of the Sentry SDK has new compatibility ranges for runtimes and frameworks.
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.
If you cannot run with OpenTelemetry v2 versions, consider either staying on Version 9 of our SDKs or using @sentry/node-core instead, which ships with widened OpenTelemetry peer dependencies.
A new AWS Lambda Layer for version 10 will be published as SentryNodeServerlessSDKv10
.
Updates and fixes for version 9 will be published as SentryNodeServerlessSDKv9
.
The changes outlined in this section detail deprecated APIs that are now removed.
BaseClient
was removed, useClient
as a direct replacement.hasTracingEnabled
was removed, usehasSpansEnabled
as a direct replacement.- The internal
logger
and typeLogger
exports in@sentry/core
were removed, usedebug
and typeSentryDebugLogger
instead. This does not affect thelogger
export used for Sentry Logging - The
_experiments.enableLogs
and_experiments.beforeSendLog
options were removed, use the top-levelenableLogs
andbeforeSendLog
options instead.
// before
Sentry.init({
_experiments: {
enableLogs: true,
beforeSendLog: (log) => {
return log;
},
},
});
// after
Sentry.init({
enableLogs: true,
beforeSendLog: (log) => {
return log;
},
});
Version support timelines can be stressful for everybody using the SDK, so we won't be defining one. Instead, we will be applying bug fixes and features to older versions as long as there is demand.
Additionally, we hold ourselves accountable for any security issues, meaning that if any vulnerabilities are found, we will, in almost all, cases backport them.
Note, that backporting decisions are made on a case-by-case basis. If you need a fix or feature in a previous version of the SDK, please reach out via a GitHub Issue.
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").