@sentry/tracing
7.120.4 · 29 Jul 2025MIT1.8M / weekRepositoryHomepagenpmAtom feed
7.120.4 is the newest release of 7.x.
In short
1 breaking9 new10 fixed
- breaking
Please note that these are breaking changes!
Release note
Important Changes
node: Add
AsyncLocalStorageimplementation ofAsyncContextStrategyfeat(core): Extend
AsyncContextStrategyto allow reuse of existing contextfeat(core): Make
runWithAsyncContextpublic APIfeat(core): Add async context abstraction
feat(node): Adds
domainimplementation ofAsyncContextStrategyfeat(node): Auto-select best
AsyncContextStrategyfor Node.js versionfeat(node): Migrate to domains used through
AsyncContextStrategy
This release switches the SDK to use AsyncLocalStorage as the async context isolation mechanism in the SDK for Node 14+. For Node 10 - 13, we continue to use the Node domain standard library, since AsyncLocalStorage is not supported there. Preliminary testing showed a 30% improvement in latency and rps when making the switch from domains to AsyncLocalStorage on Node 16.
If you want to manually add async context isolation to your application, you can use the new runWithAsyncContext API.
import * as Sentry from '@sentry/node';
const requestHandler = (ctx, next) => {
return new Promise((resolve) => {
Sentry.runWithAsyncContext(async () => {
const hub = Sentry.getCurrentHub();
hub.configureScope(scope =>
scope.addEventProcessor(event =>
Sentry.addRequestDataToEvent(event, ctx.request, {
include: {
user: false,
},
})
)
);
await next();
resolve();
});
});
};If you're manually using domains to isolate Sentry data, we strongly recommend switching to this API!
In addition to exporting runWithAsyncContext publicly, the SDK also uses it internally where we previously used domains.
sveltekit: Remove
withSentryViteConfigfeat(sveltekit): Remove SDK initialization via dedicated files
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:
// vite.config.js
import { sveltekit } from '@sveltejs/kit/vite';
import { sentrySvelteKit } from '@sentry/sveltekit';
export default {
plugins: [sentrySvelteKit(), sveltekit()],
// ... rest of your Vite config
};Take a look at the README for updated instructions!
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 to initialize the SDK.
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 ;)
sveltekit: Add Sentry Vite Plugin to upload source maps
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.
Please make sure to follow the README to specify your Sentry auth token, as well as org and project slugs.
- feat(replay): Capture request & response headers (#7816)
Replay now captures the content-length, content-type, and accept headers from requests and responses automatically.
Additional Features and Fixes
browser: Export request instrumentation options
core: Add async context abstraction
core: Add DSC to all outgoing envelopes
core: Cache processed stacks for debug IDs
node: Add checkin envelope types
replay: Add
getReplayId()methodbrowser: Adjust
BrowserTransportOptionsto support offline transport optionsbrowser: DOMException SecurityError stacktrace parsing bug
core: Log warning when tracing extensions are missing
core: Only call
applyDebugMetadatafor error eventsintegrations: Ensure httpclient integration works with Request
node:
reuseExistingdoes not need to call bind on domainnode: Fix domain scope inheritance
node: Make
trpcMiddlewarefactory synchronousserverless: Account when transaction undefined
utils: Make xhr instrumentation independent of parallel running SDK versions
Bundle size
| Path | Size |
|---|---|
| @sentry/browser - ES5 CDN Bundle (gzipped + minified) | 21.04 KB |
| @sentry/browser - ES5 CDN Bundle (minified) | 65.66 KB |
| @sentry/browser - ES6 CDN Bundle (gzipped + minified) | 19.59 KB |
| @sentry/browser - ES6 CDN Bundle (minified) | 58.12 KB |
| @sentry/browser - Webpack (gzipped + minified) | 21.19 KB |
| @sentry/browser - Webpack (minified) | 69.07 KB |
| @sentry/react - Webpack (gzipped + minified) | 21.21 KB |
| @sentry/nextjs Client - Webpack (gzipped + minified) | 49.06 KB |
| @sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) | 28.61 KB |
| @sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) | 26.85 KB |
| @sentry/replay ES6 CDN Bundle (gzipped + minified) | 45.35 KB |
| @sentry/replay - Webpack (gzipped + minified) | 39.28 KB |
| @sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) | 64.28 KB |
| @sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) | 57.26 KB |