docs/changelog/v8.md
Support for Sentry SDK v8 will be dropped soon. We recommend migrating to the latest version of the SDK. You can migrate
from v8 of the SDK to v9 by following the migration guide.
SentryNodeServerlessSDKv8 (#15351)The SentryNodeServerlessSDK AWS Lambda Layer will stop receiving updates.
If you intend to stay on v8 and receive updates use SentryNodeServerlessSDKv8 instead.
vercelAIIntegration export (#15339)enabled to disable Sentry module (#15337) (#15381)registerEsmLoaderHooks (#15352)beforeUpdate call (#15262)Work in this release was contributed by @aryanvdesh. Thank you for your contribution!
Work in this release was contributed by @nwalters512. Thank you for your contribution!
url to SourcemapsUploadOptions (#15202)fromLocation can be undefined in Tanstack Router Instrumentation (#15237)Work in this release was contributed by @tannerlinsley. Thank you for your contribution!
this.name to new.target.prototype.constructor.name (#15222)Work in this release was contributed by @Zen-cronic. Thank you for your contribution!
withSentry wrapper for SolidStart config (#15135)To enable the SolidStart SDK, wrap your SolidStart Config with withSentry. The sentrySolidStartVite plugin is now automatically
added by withSentry and you can pass the Sentry build-time options like this:
import { defineConfig } from '@solidjs/start/config';
import { withSentry } from '@sentry/solidstart';
export default defineConfig(
withSentry(
{
/* Your SolidStart config options... */
},
{
// Options for setting up source maps
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
},
),
);
With the withSentry wrapper, the Sentry server config should not be added to the public directory anymore.
Add the Sentry server config in src/instrument.server.ts. Then, the server config will be placed inside the server build output as instrument.server.mjs.
Now, there are two options to set up the SDK:
--import CLI flag to the start command like this (path depends on your server setup):
node --import ./.output/server/instrument.server.mjs .output/server/index.mjsautoInjectServerSentry: 'top-level-import' and the Sentry config will be imported at the top of the server entry (comes with tracing limitations)
withSentry(
{
/* Your SolidStart config options... */
},
{
// Optional: Install Sentry with a top-level import
autoInjectServerSentry: 'top-level-import',
},
);
Bun.serve survives a server reload (#15157)module into loadModule (#15139) (#15166)Work in this release was contributed by @jahands, @jrandolf, and @nathankleyn. Thank you for your contributions!
feat(v8/node): Add prismaInstrumentation option to Prisma integration as escape hatch for all Prisma versions (#15128)
This release adds a compatibility API to add support for Prisma version 6. To capture performance data for Prisma version 6:
Install the @prisma/instrumentation package on version 6.
Pass a new PrismaInstrumentation() instance as exported from @prisma/instrumentation to the prismaInstrumentation option:
import { PrismaInstrumentation } from '@prisma/instrumentation';
Sentry.init({
integrations: [
prismaIntegration({
// Override the default instrumentation that Sentry uses
prismaInstrumentation: new PrismaInstrumentation(),
}),
],
});
The passed instrumentation instance will override the default instrumentation instance the integration would use, while the prismaIntegration will still ensure data compatibility for the various Prisma versions.
Remove the previewFeatures = ["tracing"] option from the client generator block of your Prisma schema.
multiplexedtransport.js CDN bundle (#15046)fetchProxyScriptNonce option (#15011)fatal events should set session as crashed (#15073)Work in this release was contributed by @tjhiggins, and @nwalters512. Thank you for your contributions!
createMemoryRouter (#14985)handled prop to ErrorBoundary (#14978)require, __filename and __dirname on global object (#14952)Work in this release was contributed by @HHK1 and @mstrokin. Thank you for your contributions!
feat(v8/core): Deprecate getDomElement method (#14799)
Deprecates getDomElement. There is no replacement.
continueTrace implementation in core (#14819)NODE_OPTIONS is not passed to worker threads (#14825)tagName when name is not provided to TraceDirective (#14828)openTelemetrySpanProcessors option (#14853)Set as the allRoutes container. (#14878) (#14884)normalizedRequest to samplingContext (#14903)syncFeedbackIntegration (#14918)Work in this release was contributed by @arturovt. Thank you for your contribution!
updateSpanName helper function (#14736)db.system in newer Prisma versions (#14772)Work in this release was contributed by @aloisklink and @benjick. Thank you for your contributions!
Work in this release was contributed by @conor-ob. Thank you for your contribution!
sendFeedback promise resolves (#14683)Work in this release was contributed by @antonis. Thank you for your contribution!
handled option to captureConsoleIntegration (#14664)HttpClient events (#14515)captureMessage with attachStacktrace: true as synthetic (#14668)captureMessage with attatchStackTrace: true as synthetic (#14670)level in server runtime captureException (#10587)Work in this release was contributed by @anonrig and @Zih0. Thank you for your contributions!
feat: Deprecate autoSessionTracking (#14640)
Deprecates autoSessionTracking.
To enable session tracking, it is recommended to unset autoSessionTracking and ensure that either, in browser environments
the browserSessionIntegration is added, or in server environments the httpIntegration is added.
To disable session tracking, it is recommended to unset autoSessionTracking and to remove the browserSessionIntegration in
browser environments, or in server environments configure the httpIntegration with the trackIncomingRequestsAsSessions option set to false.
response context for http.server spans (#14634)Work in this release was contributed by @robinvw1. Thank you for your contribution!
feat(nuxt): Add option autoInjectServerSentry (no default import()) (#14553)
Using the dynamic import() as the default behavior for initializing the SDK on the server-side did not work for every project.
The default behavior of the SDK has been changed, and you now need to use the --import flag to initialize Sentry on the server-side to leverage full functionality.
Example with --import:
node --import ./.output/server/sentry.server.config.mjs .output/server/index.mjs
In case you are not able to use the --import flag, you can enable auto-injecting Sentry in the nuxt.config.ts (comes with limitations):
sentry: {
autoInjectServerSentry: 'top-level-import', // or 'experimental_dynamic-import'
},
feat(browser): Adds LaunchDarkly and OpenFeature integrations (#14207)
Adds browser SDK integrations for tracking feature flag evaluations through the LaunchDarkly JS SDK and OpenFeature Web SDK:
import * as Sentry from '@sentry/browser';
Sentry.init({
integrations: [
// Track LaunchDarkly feature flags
Sentry.launchDarklyIntegration(),
// Track OpenFeature feature flags
Sentry.openFeatureIntegration(),
],
});
feat(browser): Add featureFlagsIntegration for custom tracking of flag evaluations (#14582)
Adds a browser integration to manually track feature flags with an API. Feature flags are attached to subsequent error events:
import * as Sentry from '@sentry/browser';
const featureFlagsIntegrationInstance = Sentry.featureFlagsIntegration();
Sentry.init({
// Initialize the SDK with the feature flag integration
integrations: [featureFlagsIntegrationInstance],
});
// Manually track a feature flag
featureFlagsIntegrationInstance.addFeatureFlag('my-feature', true);
feat(astro): Add Astro 5 support (#14613)
With this release, the Sentry Astro SDK officially supports Astro 5.
feat(nextjs): Deprecate typedef for hideSourceMaps (#14594)
The functionality of hideSourceMaps was removed in version 8 but was forgotten to be deprecated and removed.
It will be completely removed in the next major version.
feat(core): Deprecate APIs around RequestSessions (#14566)
The APIs around RequestSessions are mostly used internally.
Going forward the SDK will not expose concepts around RequestSessions.
Instead, functionality around server-side Release Health will be managed in integrations.
browserSessionIntegration (#14551)raw_security envelope types (#14562)disableAnrDetectionForCallback function (#14359)trackIncomingRequestsAsSessions option to http integration (#14567)autoInjectServerSentry (no default import()) (#14553)^1.29.0 (#14590)1.28.0 (#14547)filename and module stack frame properties in Node stack parser (#14544)maxSpanWaitDuration values (#14632)parseSearch option in TanStack Router instrumentation (#14328)Work in this release was contributed by @lsmurray. Thank you for your contribution!
feat(react): React Router v7 support (library) (#14513)
This release adds support for React Router v7 (library mode). Check out the docs on how to set up the integration: Sentry React Router v7 Integration Docs
feat: Warn about source-map generation (#14533)
In the next major version of the SDK we will change how source maps are generated when the SDK is added to an application. Currently, the implementation varies a lot between different SDKs and can be difficult to understand. Moving forward, our goal is to turn on source maps for every framework, unless we detect that they are explicitly turned off. Additionally, if we end up enabling source maps, we will emit a log message that we did so.
With this particular release, we are emitting warnings that source map generation will change in the future and we print instructions on how to prepare for the next major.
feat(nuxt): Deprecate tracingOptions in favor of vueIntegration (#14530)
Currently it is possible to configure tracing options in two places in the Sentry Nuxt SDK:
Sentry.init()tracingOptions in Sentry.init()For tree-shaking purposes and alignment with the Vue SDK, it is now recommended to instead use the newly exported vueIntegration() and its tracingOptions option to configure tracing options in the Nuxt SDK:
// sentry.client.config.ts
import * as Sentry from '@sentry/nuxt';
Sentry.init({
// ...
integrations: [
Sentry.vueIntegration({
tracingOptions: {
trackComponents: true,
},
}),
],
});
web-vitals to v4.2.4 (#14439)vueIntegration (#14526)meta(nuxt): Require minimum Nuxt v3.7.0 (#14473)
We formalized that the Nuxt SDK is at minimum compatible with Nuxt version 3.7.0 and above.
Additionally, the SDK requires the implicit nitropack dependency to satisfy version ^2.10.0 and ofetch to satisfy ^1.4.0.
It is recommended to check your lock-files and manually upgrade these dependencies if they don't match the version ranges.
We are deprecating a few APIs which will be removed in the next major.
The following deprecations will potentially affect you:
feat(core): Update & deprecate undefined option handling (#14450)
In the next major version we will change how passing undefined to tracesSampleRate / tracesSampler / enableTracing will behave.
Currently, doing the following:
Sentry.init({
tracesSampleRate: undefined,
});
Will result in tracing being enabled (although no spans will be generated) because the tracesSampleRate key is present in the options object.
In the next major version, this behavior will be changed so that passing undefined (or rather having a tracesSampleRate key) will result in tracing being disabled, the same as not passing the option at all.
If you are currently relying on undefined being passed, and and thus have tracing enabled, it is recommended to update your config to set e.g. tracesSampleRate: 0 instead, which will also enable tracing in v9.
The same applies to tracesSampler and enableTracing.
feat(core): Log warnings when returning null in beforeSendSpan (#14433)
Currently, the beforeSendSpan option in Sentry.init() allows you to drop individual spans from a trace by returning null from the hook.
Since this API lends itself to creating "gaps" inside traces, we decided to change how this API will work in the next major version.
With the next major version the beforeSendSpan API can only be used to mutate spans, but no longer to drop them.
With this release the SDK will warn you if you are using this API to drop spans.
Instead, it is recommended to configure instrumentation (i.e. integrations) directly to control what spans are created.
Additionally, with the next major version, root spans will also be passed to beforeSendSpan.
feat(utils): Deprecate @sentry/utils (#14431)
With the next major version the @sentry/utils package will be merged into the @sentry/core package.
It is therefore no longer recommended to use the @sentry/utils package.
feat(vue): Deprecate configuring Vue tracing options anywhere else other than through the vueIntegration's tracingOptions option (#14385)
Currently it is possible to configure tracing options in various places in the Sentry Vue SDK:
Sentry.init()tracingOptions in Sentry.init()vueIntegration() optionstracingOptions in the vueIntegration() optionsBecause this is a bit messy and confusing to document, the only recommended way to configure tracing options going forward is through the tracingOptions in the vueIntegration().
The other means of configuration will be removed in the next major version of the SDK.
feat: Deprecate registerEsmLoaderHooks.include and registerEsmLoaderHooks.exclude (#14486)
Currently it is possible to define registerEsmLoaderHooks.include and registerEsmLoaderHooks.exclude options in Sentry.init() to only apply ESM loader hooks to a subset of modules.
This API served as an escape hatch in case certain modules are incompatible with ESM loader hooks.
Since this API was introduced, a way was found to only wrap modules that there exists instrumentation for (meaning a vetted list).
To only wrap modules that have instrumentation, it is recommended to instead set registerEsmLoaderHooks.onlyIncludeInstrumentedModules to true.
Note that onlyIncludeInstrumentedModules: true will become the default behavior in the next major version and the registerEsmLoaderHooks will no longer accept fine-grained options.
The following deprecations will most likely not affect you unless you are building an SDK yourself:
arrayify (#14405)flatten (#14454)urlEncode (#14406)validSeverityLevels (#14407)getNumberOfUrlSegments (#14458)memoBuilder, BAGGAGE_HEADER_NAME, and makeFifoCache (#14434)addRequestDataToEvent and extractRequestData (#14430)sentry-trace, baggage and DSC handling (#14364)openTelemetryInstrumentations option (#14484)NEXT_REDIRECT from browser (#14440)Work in this release was contributed by @NEKOYASAN and @fmorett. Thank you for your contributions!
feat(angular): Support Angular 19 (#14398)
The @sentry/angular SDK can now be used with Angular 19. If you're upgrading to the new Angular version, you might want to migrate from the now deprecated APP_INITIALIZER token to provideAppInitializer.
In this case, change the Sentry TraceService initialization in app.config.ts:
// Angular 18
export const appConfig: ApplicationConfig = {
providers: [
// other providers
{
provide: TraceService,
deps: [Router],
},
{
provide: APP_INITIALIZER,
useFactory: () => () => {},
deps: [TraceService],
multi: true,
},
],
};
// Angular 19
export const appConfig: ApplicationConfig = {
providers: [
// other providers
{
provide: TraceService,
deps: [Router],
},
provideAppInitializer(() => {
inject(TraceService);
}),
],
};
feat(core): Deprecate debugIntegration and sessionTimingIntegration (#14363)
The debugIntegration was deprecated and will be removed in the next major version of the SDK.
To log outgoing events, use Hook Options (beforeSend, beforeSendTransaction, ...).
The sessionTimingIntegration was deprecated and will be removed in the next major version of the SDK.
To capture session durations alongside events, use Context (Sentry.setContext()).
feat(nestjs): Deprecate @WithSentry in favor of @SentryExceptionCaptured (#14323)
The @WithSentry decorator was deprecated. Use @SentryExceptionCaptured instead. This is a simple renaming and functionality stays identical.
feat(nestjs): Deprecate SentryTracingInterceptor, SentryService, SentryGlobalGenericFilter, SentryGlobalGraphQLFilter (#14371)
The SentryTracingInterceptor was deprecated. If you are using @sentry/nestjs you can safely remove any references to the SentryTracingInterceptor. If you are using another package migrate to @sentry/nestjs and remove the SentryTracingInterceptor afterwards.
The SentryService was deprecated and its functionality was added to Sentry.init. If you are using @sentry/nestjs you can safely remove any references to the SentryService. If you are using another package migrate to @sentry/nestjs and remove the SentryService afterwards.
The SentryGlobalGenericFilter was deprecated. Use the SentryGlobalFilter instead which is a drop-in replacement.
The SentryGlobalGraphQLFilter was deprecated. Use the SentryGlobalFilter instead which is a drop-in replacement.
feat(node): Deprecate nestIntegration and setupNestErrorHandler in favor of using @sentry/nestjs (#14374)
The nestIntegration and setupNestErrorHandler functions from @sentry/node were deprecated and will be removed in the next major version of the SDK. If you're using @sentry/node in a NestJS application, we recommend switching to our new dedicated @sentry/nestjs package.
normalizedRequest on sdkProcessingMetadata is merged (#14315)@sentry/utils into @sentry/core (#14382)__self and __source attributes on feedback nodes (#14356)The @sentry/nestjs SDK will now capture performance data for NestJS Events (@nestjs/event-emitter)
@SentryExceptionCaptured for @WithSentry (#14322)SentryService behaviour into @sentry/nestjs SDK init() (#14321)SentryGlobalFilter (#14320)childProcessIntegration for processThreadBreadcrumbIntegration and deprecate it (#14334)_sentryModuleMetadata is not mangled (#14344)sentry.source attribute to custom when calling span.updateName on SentrySpan (#14251)Request type in favor of RequestEventData (#14317)transaction in requestDataIntegration (#14306)knex integration (#13526)tedious integration (#13486)debug_meta with ANR events (#14203)Work in this release was contributed by @grahamhency, @Zen-cronic, @gilisho and @phuctm97. Thank you for your contributions!
piniaIntegration (#14138)The Nuxt SDK now allows you to track Pinia state for captured errors. To enable the Pinia plugin, add the piniaIntegration to your client config:
// sentry.client.config.ts
import { usePinia } from '#imports';
Sentry.init({
integrations: [
Sentry.piniaIntegration(usePinia(), {
/* optional Pinia plugin options */
}),
],
});
The Sentry Metrics beta has ended in favour of revisiting metrics in another form at a later date.
This new approach will include different APIs, making the current metrics API unnecessary. This release deprecates the metrics API with the plan to remove in the next SDK major version. If you currently use the metrics API in your code, you can safely continue to do so but sent data will no longer be processed by Sentry.
Learn more about the end of the Metrics beta.
http.response_delivery_type attribute to resource spans (#14056)skipBrowserExtensionCheck escape hatch option (#14147)asyncFunctionReExports to define re-exported server functions (#14104)piniaIntegration (#14138)maybeInstrument (#14140)modulesIntegration does not crash esm apps (#14169)Work in this release was contributed by @rexxars. Thank you for your contribution!
With this release, the Sentry Next.js, and Cloudflare SDKs will now capture performance data based on OpenTelemetry. Some exceptions apply in cases where Next.js captures inaccurate data itself.
NOTE: You may experience minor differences in transaction names in Sentry.
Most importantly transactions for serverside pages router invocations will now be named GET /[param]/my/route instead of /[param]/my/route.
This means that those transactions are now better aligned with the OpenTelemetry semantic conventions.
child_process and worker_thread (#13896).mjs entry files in rollup (#14060)onError callback (#14002)This release marks the beta release of the @sentry/nuxt Sentry SDK. For details on how to use it, check out the
Sentry Nuxt SDK README. Please reach out on
GitHub if you have any feedback or concerns.
import()
(#13945)It is no longer required to add a Node --import flag. Please update your start command to avoid initializing Sentry
twice (BREAKING CHANGE). The SDK will now apply modifications during the build of your application to allow for
patching of libraries during runtime. If run into issues with this change, you can disable this behavior in your
nuxt.config.ts and use the --import flag instead:
sentry: {
dynamicImportForServerEntry: false;
}
We now require you to explicitly enable sourcemaps for the clientside so that Sentry can un-minify your errors. We made this change so source maps aren't accidentally leaked to the public. Enable source maps on the client as follows:
export default defineNuxtConfig({
sourcemap: {
client: true,
},
});
responseHook with waitUntil
(#13986)Support for Pinia is added in this release for @sentry/vue. To capture Pinia state data,
add createSentryPiniaPlugin() to your Pinia store:
import { createPinia } from 'pinia';
import { createSentryPiniaPlugin } from '@sentry/vue';
const pinia = createPinia();
pinia.use(createSentryPiniaPlugin());
This change introduces a new SentryHttpInstrumentation to handle non-span related HTTP instrumentation, allowing it to
run side-by-side with OTel's HttpInstrumentation. This improves support for custom OTel setups and avoids conflicts
with Sentry's instrumentation. Additionally, the spans: false option is reintroduced for httpIntegration to disable
span emission while still allowing custom HttpInstrumentation instances (httpIntegration({ spans: false })).
This change adds a new option trackFetchStreamPerformance to the browser tracing integration. Only when set to true,
Sentry will instrument streams via fetch.
suppressTracing API (#13875)@opentelemetry/instrumentation-express to 0.43.0
(#13948)@opentelemetry/instrumentation-fastify to 0.40.0
(#13983)init is correct in meta frameworks
(#13938).set the sentry-trace header instead of .appending in fetch instrumentation
(#13907)ignoreOutgoingRequests of httpIntegration applies to breadcrumbs
(#13970)Work in this release was contributed by @ZakrepaShe and @zhiyan114. Thank you for your contributions!
Relevant for users of the @sentry/nextjs package: If you have previously configured a
SENTRY_IGNORE_API_RESOLUTION_ERROR environment variable, it is now safe to unset it.
getReplay in replay CDN bundles
(#13881)globalThis
(#13788)requestAsyncStorageShim.js template file
(#13928)_not-found spans for all HTTP methods
(#13906)dataloader instrumentation from default integrations
(#13873)replay_id is removed from frozen DSC when stopped
(#13893)sendBufferedReplayOrFlush to prevent cycles
(#13900)wrapServerRouteWithSentry to respect ParamMatchers
(#13390)vercelWaitUntil to utils (#13891)Work in this release was contributed by @trzeciak, @gurpreetatwal, @ykzts and @lizhiyao. Thank you for your contributions!
Work in this release was contributed by @soapproject. Thank you for your contribution!
headers(), params, searchParams)
(#13828)Adds support for new dynamic Next.js APIs.
lru-memoizer instrumentation
(#13796)Adds integration for lru-memoizer using @opentelemetry/instrumentation-lru-memoizer.
unstable_sentryBundlerPluginOptions to module options
(#13811)Allows passing other options from the bundler plugins (vite and rollup) to Nuxt module options.
wrap() only returns functions
(#13838)getTraceData and getTraceMetaTags if SDK is disabled
(#13760)Work in this release was contributed by @joshuajaco. Thank you for your contribution!
Moves the description of navigation related browser spans into the op, e.g. browser - cache -> browser.cache and sets the description to the performanceEntry objects' names (in this context it is the URL of the page).
feat(node): Add amqplibIntegration (#13714)
feat(nestjs): Add SentryGlobalGenericFilter and allow specifying application ref in global filter
(#13673)
Adds a SentryGlobalGenericFilter that filters both graphql and http exceptions depending on the context.
Sets log levels in breadcrumbs for 5xx to error and 4xx to warning.
sampled flag from dynamic sampling context in Tracing without Performance mode
(#13753)Work in this release was contributed by @Zen-cronic and @Sjoertjuh. Thank you for your contributions!
dataloader integration (#13664)This release adds a new integration for the dataloader package. The Node
SDK (and all SDKs that depend on it) will now automatically instrument dataloader instances. You can also add it
manually:
Sentry.init({
integrations: [Sentry.dataloaderIntegration()],
});
activationStart timestamp to pageload span (#13658)deleteSourcemapsAfterUpload (#13610)http.server.prefetch op (#13600)disableInstrumentationWarnings option (#13693)experimental_basicServerTracing option to Nuxt module (#13643)onError callback + other small improvements to debugging (#13721)consoleSandbox (#13690)lazyLoadIntegration script parent element lookup (#13717)SentryTraced functions (#13684)Propagator.inject (#13381)Work in this release was contributed by @KyGuy2002, @artzhookov, and @julianCast. Thank you for your contributions!
kafkajs integration (#13528)This release adds a new integration that instruments kafkajs library with spans and traces. This integration is
automatically enabled by default, but can be included with the Sentry.kafkaIntegration() import.
Sentry.init({
integrations: [Sentry.kafkaIntegration()],
});
@opentelemetry/instrumentation-undici for fetch tracing (#13485)trackComponents list matches components with or without <> (#13543)Work in this release was contributed by @Zen-cronic and @odanado. Thank you for your contributions!
This release marks the beta releases of the @sentry/solid and @sentry/solidstart Sentry SDKs. For details on how to
use them, check out the
Sentry Solid SDK README and the
Sentry SolidStart SDK README
respectively. Please reach out on GitHub if you have
any feedback or concerns.
Adds the SDK option to only wrap ES modules with import-in-the-middle that specifically need to be instrumented.
import * as Sentry from '@sentry/node';
Sentry.init({
dsn: '__PUBLIC_DSN__',
registerEsmLoaderHooks: { onlyIncludeInstrumentedModules: true },
});
All internal OpenTelemetry instrumentation was updated to their latest version. This adds support for Mongoose v7 and v8 and fixes various bugs related to ESM mode.
generic-pool integration (#13465)browserTracingIntegration by default (#13561)sentrySolidStartVite plugin to simplify source maps upload (#13493)context.waitUntil call in request handler (#13549)generic-pool span origins with underscores (#13579)Work in this release was contributed by @Zen-cronic. Thank you for your contribution!
This release contains the beta version of @sentry/nestjs! For details on how to use it, check out the
README. Any feedback/bug reports
are greatly appreciated, please reach out on GitHub.
This release fixes a bug in the @sentry/browser package and all SDKs depending on this package (e.g. @sentry/react
or @sentry/nextjs) that caused the SDK to send incorrect web vital values for the LCP, FCP and FP vitals. The SDK
previously incorrectly processed the original values as they were reported from the browser. When updating your SDK to
this version, you might experience an increase in LCP, FCP and FP values, which potentially leads to a decrease in your
performance score in the Web Vitals Insights module in Sentry. This is because the previously reported values were
smaller than the actually measured values. We apologize for the inconvenience!
SentryGlobalGraphQLFilter (#13545)bundleSizeOptimizations to build options (#13323)captureRequestError (#13550)@Injectable (#13544)Work in this release was contributed by @leopoldkristjansson, @mhuggins and @filips123. Thank you for your contributions!
fix(nestjs): Exception filters in main app module are not being executed (#13278)
With this release nestjs error monitoring is no longer automatically set up after adding the SentryModule to your
application, which led to issues in certain scenarios. You will now have to either add the SentryGlobalFilter to
your main module providers or decorate the catch() method in your existing global exception filters with the newly
released @WithSentry() decorator. See the docs for
more details.
Deno.permissions.querySync (#13378)Work in this release was contributed by @charpeni. Thank you for your contribution!
feat(node): Add fsInstrumentation (#13291)
This release adds fsIntegration, an integration that instruments the fs API to the Sentry Node SDK. The
integration creates spans with naming patterns of fs.readFile, fs.unlink, and so on.
This integration is not enabled by default and needs to be registered in your Sentry.init call. You can configure
via options whether to include path arguments or error messages as span attributes when an fs call fails:
Sentry.init({
integrations: [
Sentry.fsIntegration({
recordFilePaths: true,
recordErrorMessagesAsSpanAttributes: true,
}),
],
});
WARNING: This integration may add significant overhead to your application. Especially in scenarios with a lot of file I/O, like for example when running a framework dev server, including this integration can massively slow down your application.
feat(browser): Add spotlightBrowser integration (#13263)
feat(browser): Allow sentry in safari extension background page (#13209)
feat(browser): Send CLS as standalone span (experimental) (#13056)
feat(core): Add OpenTelemetry-specific getTraceData implementation (#13281)
feat(nextjs): Always add browserTracingIntegration (#13324)
feat(nextjs): Always transmit trace data to the client (#13337)
feat(nextjs): export SentryBuildOptions (#13296)
feat(nextjs): Update experimental_captureRequestError to reflect RequestInfo.path change in Next.js canary
(#13344)
feat(nuxt): Always add tracing meta tags (#13273)
feat(nuxt): Set transaction name for server error (#13292)
feat(replay): Add a replay-specific logger (#13256)
feat(sveltekit): Add bundle size optimizations to plugin options (#13318)
feat(sveltekit): Always add browserTracingIntegration (#13322)
feat(tracing): Make long animation frames opt-out (#13255)
fix(astro): Correctly extract request data (#13315)
fix(astro): Only track access request headers in dynamic page requests (#13306)
fix(nuxt): Add import line for disabled autoImport (#13342)
fix(nuxt): Add vue to excludeEsmLoaderHooks array (#13346)
fix(opentelemetry): Do not overwrite http span name if kind is internal (#13282)
fix(remix): Ensure origin is correctly set for remix server spans (#13305)
Work in this release was contributed by @MonstraG, @undead-voron and @Zen-cronic. Thank you for your contributions!
This release contains the alpha version of @sentry/solidstart, our SDK for Solid Start!
For details on how to use it, please see the README. Any feedback/bug reports are
greatly appreciated, please reach out on GitHub.
bundleSizeOptimizations vite options to integration (#13250)getTraceMetaTags function (#13201)useOperationNameForRootSpan tographqlIntegration (#13248)wrapServerRouteWithSentry wrapper (#13247)context over event (#13266)defaultIntegrations: undefined (#13261)This release includes support for Cloudflare D1, Cloudflare's serverless SQL database. To instrument your Cloudflare D1
database, use the instrumentD1WithSentry method as follows:
// env.DB is the D1 DB binding configured in your `wrangler.toml`
const db = instrumentD1WithSentry(env.DB);
// Now you can use the database as usual
await db.prepare('SELECT * FROM table WHERE id = ?').bind(1).run();
getTraceData function (#13134)onBeforeResponse middleware to enable distributed tracing (#13221)window global scopes (#13156)\_loadAndRenderDialog (#13203)Work in this release was contributed by @horochx. Thank you for your contribution!
This release adds support for Cloudflare Pages to @sentry/cloudflare, our SDK for the
Cloudflare Workers JavaScript Runtime! For details on how to use it,
please see the README. Any feedback/bug reports are greatly appreciated, please
reach out on GitHub.
// functions/_middleware.js
import * as Sentry from '@sentry/cloudflare';
export const onRequest = Sentry.sentryPagesPlugin({
dsn: __PUBLIC_DSN__,
// Set tracesSampleRate to 1.0 to capture 100% of spans for tracing.
tracesSampleRate: 1.0,
});
internal_sdk_error client report happens (#13072)globalThis for code injection (#13132)withSentry method (#13025)This release contains the alpha version of @sentry/cloudflare, our SDK for the
Cloudflare Workers JavaScript Runtime! For details on how to use it,
please see the README. Any feedback/bug reports are greatly appreciated, please
reach out on GitHub.
Please note that only Cloudflare Workers are tested and supported - official Cloudflare Pages support will come in an upcoming release.
beforeSendTransaction (#13022)@opentelemetry/instrumentation-aws-sdk from 0.43.0 to 0.43.1 (#13089)@opentelemetry/instrumentation-express from 0.41.0 to 0.41.1 (#13090)import-in-the-middle to 1.11.0 (#13107)sourcemaps.deleteFilesAfterUpload (#13102)registerEsmLoaderHooks to preload (#12998)You can write your own custom preload script and configure this in the preload options. registerEsmLoaderHooks can be
passed as an option to preloadOpenTelemetry, which allows to exclude/include packages in the preload.
Sentry will not emit "fetch" spans if tracing is disabled. This is relevant for user who use their own sampler.
afterSendEvent listener once root injector is destroyed (#12786)tracesSampler (#12945)setupExpressErrorHandler (#12952)Work in this release was contributed by @jaspreet57 and @arturovt. Thank you for your contribution!
enableTracing (12897)The enableTracing option has been deprecated and will be removed in the next major version. We recommend removing it
in favor of the tracesSampleRate and tracesSampler options. If you want to enable performance monitoring, please set
the tracesSampleRate to a sample rate of your choice, or provide a sampling function as tracesSampler option
instead. If you want to disable performance monitoring, remove the tracesSampler and tracesSampleRate options.
exclude and include options for ESM loader (#12910)experimental_captureRequestError for onRequestError hook (#12885)rrweb to 2.25.0 (#12478)ErrorEvent check in ErrorHandler to avoid throwing in Node environments (#12892)ignoreIncomingRequests callback (#12929)otel.kind: INTERNAL attribute (#12841)null as parentSpan in startSpan* (#12928)Work in this release was contributed by @GitSquared, @ziyadkhalil and @mcous. Thank you for your contributions!
Previously, the @sentry/nextjs SDK automatically recorded spans in the form of transactions for each of your top-level
server components (pages, layouts, ...). This approach had a few drawbacks, the main ones being that traces didn't have
a root span, and more importantly, if you had data stream to the client, its duration was not captured because the
server component spans had finished before the data could finish streaming.
With this release, we will capture the duration of App Router requests in their entirety as a single transaction with server component spans being descendants of that transaction. This means you will get more data that is also more accurate. Note that this does not apply to the Edge runtime. For the Edge runtime, the SDK will emit transactions as it has before.
Generally speaking, this change means that you will see less transactions and more spans in Sentry. You will no
longer receive server component transactions like Page Server Component (/path/to/route) (unless using the Edge
runtime), and you will instead receive transactions for your App Router SSR requests that look like
GET /path/to/route.
If you are on Sentry SaaS, this may have an effect on your quota consumption: Less transactions, more spans.
The @sentry/nestjs SDK now includes a @SentryCron decorator that can be used to augment the native NestJS @Cron
decorator to send check-ins to Sentry before and after each cron job run:
import { Cron } from '@nestjs/schedule';
import { SentryCron, MonitorConfig } from '@sentry/nestjs';
import type { MonitorConfig } from '@sentry/types';
const monitorConfig: MonitorConfig = {
schedule: {
type: 'crontab',
value: '* * * * *',
},
checkinMargin: 2, // In minutes. Optional.
maxRuntime: 10, // In minutes. Optional.
timezone: 'America/Los_Angeles', // Optional.
};
export class MyCronService {
@Cron('* * * * *')
@SentryCron('my-monitor-slug', monitorConfig)
handleCron() {
// Your cron job logic here
}
}
httpIntegration (#12761)addPluginTemplate (#12760)h import in ScreenshotEditor (#12784)autoSessionTracking is enabled by default (#12790)on (#11710)spanTimeInputToSeconds for otel span exporter (#12699)lazyLoadIntegration (#12766)jsxRuntime: 'classic' to prevent breaking react 17 (#12775)getStack() (#12737)Work in this release was contributed by @arturovt and @jaulz. Thank you for your contributions!
The @sentry/nestjs SDK no longer captures 4xx errors automatically.
JSX (#12691)registerEsmLoaderHooks option (#12684)afterAllSetup instead of next tick (#12709)Work in this release was contributed by @quisido. Thank you for your contribution!
@sentry/nestjs)
in alpha state. The SDK is a drop-in replacement for the Sentry Node SDK (@sentry/node) supporting the same set of
features. See the docs for how to use the SDK.2.20.1 (#12641)This release introduces breaking changes to the @sentry/solid package (which is currently out in alpha).
We've made it easier to get started with the solid router integration by removing the need to pass use* hooks
explicitly to solidRouterBrowserTracingIntegration. Import solidRouterBrowserTracingIntegration from
@sentry/solid/solidrouter and add it to Sentry.init
import * as Sentry from '@sentry/solid';
import { solidRouterBrowserTracingIntegration, withSentryRouterRouting } from '@sentry/solid/solidrouter';
import { Router } from '@solidjs/router';
Sentry.init({
dsn: '__PUBLIC_DSN__',
integrations: [solidRouterBrowserTracingIntegration()],
tracesSampleRate: 1.0, // Capture 100% of the transactions
});
const SentryRouter = withSentryRouterRouting(Router);
Sentry.init() now returns a client directly, so you don't need to explicitly call getClient() anymore:
const client = Sentry.init();
deleteSourcemapsAfterUpload option (#12457)This adds an easy way to delete sourcemaps immediately after uploading them:
module.exports = withSentryConfig(nextConfig, {
sourcemaps: {
deleteSourcemapsAfterUpload: true,
},
});
maxSpanWaitDuration (#12610)Adds configuration option for the max. duration in seconds that the SDK will wait for parent spans to be finished before discarding a span. The SDK will automatically clean up spans that have no finished parent after this duration. This is necessary to prevent memory leaks in case of parent spans that are never finished or otherwise dropped/missing. However, if you have very long-running spans in your application, a shorter duration might cause spans to be discarded too early. In this case, you can increase this duration to a value that fits your expected data.
window.Sentry (#12580)isRemixV2 as optional in exposed types. (#12614)Work in this release was contributed by @n4bb12. Thank you for your contribution!
parentSpan option to startSpan* APIs (#12567)We've made it easier to create a span as a child of a specific span via the startSpan* APIs. This should allow you to explicitly manage the parent-child relationship of your spans better.
Sentry.startSpan({ name: 'root' }, parent => {
const span = Sentry.startInactiveSpan({ name: 'xxx', parentSpan: parent });
Sentry.startSpan({ name: 'xxx', parentSpan: parent }, () => {});
Sentry.startSpanManual({ name: 'xxx', parentSpan: parent }, () => {});
});
@sentry/node exports from framework SDKs. (#12589)opentelemetry-instrumentation-remix. (#12110)You can now simplify your remix instrumentation by opting-in like this:
const Sentry = require('@sentry/remix');
Sentry.init({
dsn: YOUR_DSN
// opt-in to new auto instrumentation
autoInstrumentRemix: true,
});
With this setup, you do not need to add e.g. wrapExpressCreateRequestHandler anymore. Additionally, the quality of the
captured data improves. The old way to use @sentry/remix continues to work, but it is encouraged to use the new setup.
thirdPartyErrorFilterIntegration from @sentry/browser (#12512)tags field to any feedback config param (#12197)getDynamicSamplingContextFromSpan (#12522)captureRemixServerException from client SDK (#12497)Work in this release was contributed by @AndreyKovanov and @kiliman. Thank you for your contributions!
feat(solid): Add Solid SDK
This release adds a dedicated SDK for Solid JS in alpha state with instrumentation for
Solid Router and a custom ErrorBoundary. See the
package README for how to use
the SDK.
op to Otel-generated lambda function root span (#12430)awslambda-auto (#12392)Work in this release was contributed by @soch4n. Thank you for your contribution!
This release failed to publish correctly, please use 8.9.1 instead.
This upgrades the OpenTelemetry dependencies to the latest versions and makes OTEL use import-in-the-middle v1.8.0.
This should fix numerous issues with using OTEL instrumentation with ESM.
High level issues fixed with OTEL + ESM:
tsx or similar libraries.date-fns.openai.ENOENT: no such file or directory bugs that libraries like discord.js
surface.If you are still encountering issues with OpenTelemetry instrumentation and ESM, please let us know.
2.18.0 (#12381)thirdPartyErrorFilterIntegration (#12267)mget command in caching functionality (#12380)clientTraceMetadata option (#12323)sentry property on Next.js config object (#12366)Work in this release contributed by @dohooo, @mohd-akram, and @ykzts. Thank you for your contributions!
feat(react): Add TanStack Router integration (#12095)
This release adds instrumentation for TanStack router with a new tanstackRouterBrowserTracingIntegration in the
@sentry/react SDK:
import * as Sentry from '@sentry/react';
import { createRouter } from '@tanstack/react-router';
const router = createRouter({
// Your router options...
});
Sentry.init({
dsn: '___PUBLIC_DSN___',
integrations: [Sentry.tanstackRouterBrowserTracingIntegration(router)],
tracesSampleRate: 1.0,
});
sourceMappingURL comment on client when nextConfig.productionBrowserSourceMaps: true is
set (#12278)feat(metrics): Add timings method to metrics (#12226)
This introduces a new method, metrics.timing(), which can be used in two ways:
second as unit:Sentry.metrics.timing('myMetric', 100);
const returnValue = Sentry.metrics.timing('myMetric', measureThisFunction);
feat(react): Add Sentry.reactErrorHandler (#12147)
This PR introduces Sentry.reactErrorHandler, which you can use in React 19 as follows:
import * as Sentry from '@sentry/react';
import { hydrateRoot } from 'react-dom/client';
ReactDOM.hydrateRoot(
document.getElementById('root'),
<React.StrictMode>
<App />
</React.StrictMode>,
{
onUncaughtError: Sentry.reactErrorHandler(),
onCaughtError: Sentry.reactErrorHandler((error, errorInfo) => {
// optional callback if users want custom config.
}),
},
);
For more details, take a look at the PR. Our documentation will be updated soon!
This release adds support for React 19 in the @sentry/react SDK package.
@sentry/node/preload hook (#12213)This release adds a new way to initialize @sentry/node, which allows you to use the SDK with performance
instrumentation even if you cannot call Sentry.init() at the very start of your app.
First, run the SDK like this:
node --require @sentry/node/preload ./app.js
Now, you can initialize and import the rest of the SDK later or asynchronously:
const express = require('express');
const Sentry = require('@sentry/node');
const dsn = await getSentryDsn();
Sentry.init({ dsn });
For more details, head over to the PR Description of the new feature. Our docs will be updated soon with a new guide.
startNewTrace API (#12138)captureFeedback() (#12216)SerializedSession in session envelope items (#11979)waitUntil to defer freezing of Vercel Lambdas (#12133)Module._resolveFilename in Lambda layer bundle (#12232)ImportInTheMiddle (#12233)@prisma/instrumentation to use default import (#12185)inspector asynchronously (#12231)If you are using Next.js version 14.3.0-canary.64 or above, the Sentry Next.js SDK will now trace clientside pageloads
with React Server Components. This means, that client-side errors like
Error: An error occurred in the Server Components render., which previously didn't give you much information on how
that error was caused, can now be traced back to a specific error in a server component.
This release guarantees support for Angular 18 with @sentry/angular.
This release improves data quality of spans emitted by Express, Fastify, Connect, Koa, Nest.js and Hapi.
feat(node): Ensure connect spans have better data (#12130)
feat(node): Ensure express spans have better data (#12107)
feat(node): Ensure fastify spans have better data (#12106)
feat(node): Ensure hapi spans have better data (#12140)
feat(node): Ensure koa spans have better data (#12108)
feat(node): Ensure Nest.js spans have better data (#12139)
feat(deps): Bump @opentelemetry/instrumentation-express from 0.38.0 to 0.39.0 (#12079)
feat(node): No-code init via --import=@sentry/node/init (#11999)
When using Sentry in ESM mode, you can now use Sentry without manually calling init like this:
SENTRY_DSN=https://[email protected]/0 node --import=@sentry/node/init app.mjs
When using CommonJS, you can do:
SENTRY_DSN=https://[email protected]/0 node --require=@sentry/node/init app.js
browserProfilingIntegration is published to CDN (#12158)node: prefix for node built-ins (#11895)setTimeout to avoid e.g. angular change detection (#11924)undefined values in props (#12131)@prisma/instrumentation from 5.13.0 to 5.14.0 (#12081)Work in this release contributed by @pboling. Thank you for your contribution!
beforeSendSpan hook (#11886)Scope (#12067)hasTracingEnabled() if possible (#12066)This release mainly fixes a couple of bugs from the initial 8.0.0 release. In addition to the changes below, we updated some initially missed points in our migration guides and documentation.
lastEventId on isolation scope (#11951) (#12022)awslambda-autoparseSampleRate utility function (#12024)eventId optional and use lastEventId in report dialog (#12029)The Sentry JS SDK team is proud to announce the release of version 8.0.0 of Sentry's JavaScript SDKs - it's been a
long time coming! Thanks to everyone for your patience and a special shout out to the brave souls testing preview builds
and reporting issues - we appreciate your support!
We recommend reading the migration guide docs to find out how to address any breaking changes in your code for your specific platform or framework.
To automate upgrading to v8 as much as possible, use our migration codemod @sentry/migr8:
npx @sentry/migr8@latest
All deprecations from the v7 cycle, with the exception of getCurrentHub(), have been removed and can no longer be used
in v8. If you have an advanced Sentry SDK setup, we additionally recommend reading the
in-depth migration guide in our repo which highlights all changes with additional details and
information.
The rest of this changelog highlights the most important (breaking) changes and links to more detailed information.
With v8, we dropped support for several old runtimes and browsers
Node SDKs: The Sentry JavaScript SDK v8 now supports Node.js 14.8.0 or higher. This applies to @sentry/node
and all of our node-based server-side sdks (@sentry/nextjs, @sentry/remix, etc.). Furthermore, version 8 now ships
with full support for ESM-based node apps using Node.js 18.19.0 or higher.
Browser SDKs: The browser SDKs now require ES2018+ compatible browsers. New minimum browser versions:
For more details, please see the version support section in our migration guide.
In v8, we support a lot more node-based packages than before. In order to ensure auto-instrumentation works, the SDK now needs to be imported and initialized before any other import in your code.
We recommend creating a new file (e.g. instrumentation.js) to import and initialize the SDK. Then, import the file on
top of your entry file or detailed instructions, check our updated SDK setup docs
initializing the SDK in v8.
The API around performance monitoring and tracing has been streamlined, and we've added support for more integrations out of the box.
Integrations are now simple functions instead of classes. Class-based integrations have been removed:
// old (v7)
Sentry.init({
integrations: [new Sentry.BrowserTracing()],
});
// new (v8)
Sentry.init({
integrations: [Sentry.browserTracingIntegration()],
});
The following packages have been removed or replaced and will no longer be published:
8.0.0-rc.3feat(nextjs): Remove transpileClientSDK (#11978)
As we are dropping support for Internet Explorer 11 and other other older browser versions wih version 8.0.0, we are
also removing the transpileClientSDK option from the Next.js SDK. If you need to support these browser versions,
please configure Webpack and Next.js to down-compile the SDK.
feat(serverless): Do not include performance integrations by default (#11998)
To keep Lambda bundle size reasonable, the SDK no longer ships with all performance (database) integrations by
default. Add the Sentry integrations of the databases and other tools you're using manually to your Sentry.init call
by following
this guide.
Note that this change does not apply if you use the SDK with the Sentry AWS Lambda layer.
feat(feedback): Simplify public css configuration for feedback (#11985)
fix(feedback): Check for empty user (#11993)
fix(replay): Fix type for replayCanvasIntegration (#11995)
fix(replay): Fix user activity not being updated in start() (#12001)
The Bun SDK will now capture global unhandled errors.
http.client spans if there is an active parent span (#11974)execArgv are not sent to worker threads (#11963)This release includes adds support for ESM when Sentry.init() is called within a module imported via the --import
Node.js flag:
node --import ./your-file-with-sentry-init.mjs your-app.mjs
Note that the SDK only supports ESM for node versions 18.19.0 and above, and 20.6.0 above.
@opentelemetry/core to 1.24.1 and @opentelemetry/instrumentation to 0.51.1 (#11941)This release contains no changes and was done for technical purposes. This version is considered stable.
For the sake of completeness this changelog entry includes the changes from the previous release candidate:
We recommend to read the detailed migration guide in the docs.
We now support hapi v21 and added tests for it.
When running Sentry in ESM mode, we will now warn you that this is not supported as of now. We are working on ensuring support with ESM builds.
This is the first release candidate of Sentry JavaScript SDK v8.
We recommend to read the detailed migration guide in the docs.
We now support hapi v21 and added tests for it.
When running Sentry in ESM mode, we will now warn you that this is not supported as of now. We are working on ensuring support with ESM builds.
This beta release contains various bugfixes and improvements for the v8 beta cycle.
tunnel support to multiplexed transport (#11806)spanToBaggageHeader utility (#11881)http.client spans (#11879)captureFeedback method (#11428)ioredis (#11856)This beta release contains various bugfixes and improvements for the v8 beta cycle.
We now officially support Svelte 5.
Starting with this version, spans for outgoing fetch/xhr requests will be captured even if no pageload/navigation span is ongoing. This means that you will be able to have a more complete trace, especially for web applications that make a lot of HTTP requests on longer lived pages.
transactionName to isolation scope for requests (#11786)startInactiveSpan (#11788)trace envelope header to span envelope (#11699)start*Span APIs (#11696)withMonitor callback in withIsolationScope (#11797)transactionName to isolation scope for Next.js server side features (#11782)@opentelemetry/instrumentation (#11810)wrapHandleErrorWithSentry (#10370)formData as action span data. (#10836)transactionName for Remix server features (#11784)showReportDialog in root context (#11703)loader, action and documentRequest errors (#11793)captureException(), captureMessage(), and
captureEvent() (#11805)requestDataIntegration (#11513)onlyIfParent for recording component update spans (#11809)INP web vital support was now forward-ported to version 8. Recording of INP data is enabled by default.
The default limit of queued events to be sent was increased from 30 to 64 events. You may observe a higher memory
footprint of the SDK. You can override this limit by setting the transportOptions.bufferSize option in
Sentry.init().
A maxCanvasSize option was added to the replayCanvasIntegration to disallow capturing of canvases larger than a
certain size. This value defaults to 1280 which will not capture canvases bigger than 1280x1280 pixels.
@opentelemetry/instrumentation-http to 0.48.0 (#11745)@opentelemetry/api dependency from Next.js package (#11717)lazyLoadIntegration works in NPM mode (#11673)addOpenTelemetryInstrumentation (#11667)A utility function addOpenTelemetryInstrumentation was added that allows for the registration of instrumentations that
conform to the OpenTelemetry JS API without having to specify @opentelemetry/instrumentation as a dependency.
Going forward, the Sentry trpcMiddleware will only create spans. Previously it used to always create a transaction.
This change was made to integrate more nicely with the HTTP instrumentation added in earlier versions to avoid creating
unnecessary transactions.
propagationContext on spanEnd to keep trace consistentTo ensure consistency throughout a route's duration, we update the scope's propagation context when the initial page load or navigation span ends. This keeps span-specific attributes like the sampled decision and dynamic sampling context on the scope, even after the transaction has ended.
We won't assume window.dodument is available in the browser SDKs anymore. This should prevent errors in environments
where window.document is not available (such as web workers).
server.address to browser http.client spans (#11634)NodeClient without calling init (#11585)This is the first beta release of Sentry JavaScript SDK v8. With this release, there are no more planned breaking changes for the v8 cycle.
Read the in-depth migration guide to find out how to address any breaking changes in your code. All
deprecations from the v7 cycle, with the exception of getCurrentHub(), have been removed and can no longer be used in
v8.
The Sentry JavaScript SDK v8 now supports Node.js 14.8.0 or higher. This applies to @sentry/node and all of our
node-based server-side sdks (@sentry/nextjs, @sentry/remix, etc.).
The browser SDKs now require ES2018+ compatible browsers. New minimum browser versions:
For more details, please see the version support section in migration guide.
The following packages will no longer be published
Initializing the SDKs on the server-side has been simplified. More details in our migration docs about initializing the SDK in v8.
The API around performance monitoring and tracing has been vastly improved, and we've added support for more integrations out of the box.
Because execution context isolation in browser environments does not work reliably, we deciced to keep a flat span hierarchy by default in v8.
addTracingExtensions (#11579)Instead of calling Sentry.addTracingExtensions() if you want to use performance in a browser SDK without using
browserTracingIntegration(), you should now call Sentry.registerSpanErrorInstrumentation().
suppressTracing (#11468)You can use the new suppressTracing API to ensure a given callback will not generate any spans:
return Sentry.suppressTracing(() => {
// Ensure this fetch call does not generate a span
return fetch('/my-url');
});
import and loader (#11498)We renamed the loader hooks for better clarity:
# For Node.js <= 18.18.2
node --loader=@sentry/node/loader app.js
# For Node.js >= 18.19.0
node --import=@sentry/node/import app.js
onUncaughtException handlers are registered in
onUncaughtExceptionIntegration (#11532)In v8, we will no longer exit the node process by default if other uncaught exception handlers have been registered by the user.
We improved the way we keep the transaction name for error events, even when spans are not sampled or performance is disabled.
transactionName when handling request (#11447)transactionName when handling request (#11448)transactionName when creating router span (#11476)getCurrentHub from AsyncContextStrategy (#11581)getGlobalHub export (#11565)Hub class export (#11560)getCurrentHub shim to core as getCurrentHubShim (#11537)rewriteFramesIntegration in browser (#11535)getRequestSpanData (#11508)OPTIONS and HEAD requests. (#11149)tunnelRoute matching logic for hybrid cloud (#11576)This release failed to publish correctly. Use 8.0.0-beta.1 instead.
This is the eighth alpha release of Sentry JavaScript SDK v8, which includes a variety of breaking changes.
Read the in-depth migration guide to find out how to address any breaking changes in your code.
A big part of the browser-runtime specific exports of the internal @sentry/utils package were moved into a new package
@sentry-internal/browser-utils. If you imported any API from @sentry/utils (which is generally not recommended but
necessary for some workarounds), please check that your import statements still point to existing exports after
upgrading.
When using ESM, it is necessary to use a "loader" to be able to instrument certain third-party packages and Node.js API. The server-side SDKs now ship with a set of ESM loader hooks, that should be used when using ESM. Use them as follows:
# For Node.js <= 18.18.2
node --experimental-loader=@sentry/node/hook your-app.js
# For Node.js >= 18.19.0
node --import=@sentry/node/register your-app.js
Please note that due to an upstream bug, these loader hooks will currently crash or simply not work. We are planning to fix this in upcoming versions of the SDK - definitely before a stable version 8 release.
The Sentry SDK now exports integrations and error middlewares for Koa (koaIntegration(), setupKoaErrorHandler()) and
NestJS (setupNestErrorHandler()) that can be used to instrument your Koa and NestJS applications with error
monitoring.
beforeSend and beforeSendTransaction breaking changes (#11354)node package (#11322)span.startChild() (#11376)addRequestDataToTransaction util (#11369)args on HandlerDataXhr (#11373)getGlobalObject utility method (#11372)metadata on transaction (#11397)pushScope, popScope, isOlderThan, shouldSendDefaultPii from hub (#11404)shouldCreateSpanForRequest from vercel edge options (#11371)_reportAllChanges option (#11393)scope.getTransaction() (#11365)trpcMiddleware back to serverside SDKs (#11374)transaction.measurements (#11398)getFeedback utility to get typed feedback instance (#11331)options and head requests (#11467)transactionName when resolving route (#11420)rrweb to 2.12.0 (#11314)transactionName when pageload route name is updated (#11406)globalThis (#11351)transactionName when resolving a route (#11423).__sentry_transaction (#11346)This is a partially broken release and was superseded by version 8.0.0-alpha.9.
This is the seventh alpha release of Sentry JavaScript SDK v8, which includes a variety of breaking changes.
Read the in-depth migration guide to find out how to address any breaking changes in your code.
We now use OpenTelemetry under the hood to power performance monitoring and tracing in the Next.js SDK.
In v8, you cannot initialize the SDK anymore via Gatsby plugin options. Instead, you have to configure the SDK in a
sentry.config.js file.
We also removed the automatic initialization of browserTracingIntegration. You now have to add this integration
yourself.
scope.setSpan() and scope.getSpan() methods (#11051)runtime and vercel tags (#11291)prismaIntegration by default (#11265)tracePropagationTargets are respected (#11285)SentrySpanProcessor (#11273)instrumentation.ts) (#11266)suppressTracing to avoid capturing otel spans (#11288)startSpan callback throws (#11170)This version did not publish correctly due to a configuration issue.
This is the fifth alpha release of Sentry JavaScript SDK v8, which includes a variety of breaking changes.
Read the in-depth migration guide to find out how to address any breaking changes in your code.
client.(server|client).config.ts functionality in favor of instrumentation.ts (#11059)
13.2.0 (#11097)With version 8 of the SDK we will no longer support the use of sentry.server.config.ts and sentry.edge.config.ts
files. Instead, please initialize the Sentry Next.js SDK for the serverside in a
Next.js instrumentation hook.
sentry.client.config.ts|js is still supported and encouraged for initializing the clientside SDK. Please see the
Migration Guide for more details.
In addition, the Next.js SDK now requires a minimum Next.js version of 13.2.0.
The @sentry/angular-ivy package has been removed. The @sentry/angular package now supports Ivy by default and
requires at least Angular 14. See the Migration Guide for more
details.
rethrowAfterCapture option (#11126)tunnel option for ANR (#11163)@sentry/node package (#11075)view_hierarchy attachment type (#11197)initOpenTelemetry (#11158)cron (#11225)sampled type on Transaction (#11115)This is the fourth Alpha release of the v8 cycle, which includes a variety of breaking changes.
Read the in-depth migration guide to find out how to address any breaking changes in your code.
The minimum Node version required for the SDK is now 14.18.0.
@sentry/google-cloud-serverless (#11065)@sentry/serverless is no longer published, and is replaced by two new packages: @sentry/google-cloud-serverless and
@sentry/aws-serverless. These packages are now the recommended way to instrument serverless functions. See the
migration guide for more details.
The Browser SDK and CDN bundles now emits ES2017 compatible code and drops support for IE11. This also means that the
Browser SDKs (@sentry/browser, @sentry/react, @sentry/vue, etc.) requires the fetch API to be available in the
environment. If you need to support older browsers, please transpile your code to ES5 using babel or similar and add
required polyfills.
New minimum supported browsers:
startTransaction export (#11015)unmask and unblock (#11049)replaySession and errorSampleRates (#11045)spanRecorder and all related code (#10977)origin field on span start options (#11058)startSpan options (#11054)startTransaction & finishTransaction hooks (#11008)sentry field in Next.js config as a means of configuration (#10839)startChild deprecations (#10956)getRootSpan() does not rely on transaction (#10979)getSpanDescendants() everywhere (#10924)transactionName when route is resolved (#11043)name parameter (#11057)@sentry/astro to use OpenTelemetry (#10960)HttpContext integration class (#10987)scope.transactionName from root spans (#10991)startIdleSpan (#10934)__SENTRY__ singleton (#11034)__SENTRY__ (#11074)continueTrace to be callback-only (#11044)spanToJSON to handle OTEL spans (#10922)tunnelRoute option (#10959)setupFastifyErrorHandler utility (#11061)getRootSpan functionality (#11004)transactionName in React Router instrumentations (#11048)unstable_sentryVitePluginOptions for full Vite plugin customization (#10930)createReduxEnhancer on server (#11005)handled value in ErrorBoundary depending on fallback (#10989)addScopeListener to Scope interface (#10952)AttachmentType and use for envelope attachment_type property (#10946)allowSyntheticDefaultImports (#11073)startChild (#11056)scope.transactionName on pageload and navigation span creation (#10992)startChild() (#11047)http & undici (#11055)Work in this release contributed by @MFoster and @jessezhang91. Thank you for your contributions!
This alpha was released in an incomplete state. We recommend skipping this release and using the 8.0.0-alpha.4 release
instead.
This alpha release fixes a build problem that prevented 8.0.0-alpha.1 from being properly released.
@sentry/opentelemetry-node package (#10906)The @sentry/opentelemetry-node package has been removed. Instead, you can either use @sentry/node with built-in
OpenTelemetry support, or use @sentry/opentelemetry to manually connect Sentry with OpenTelemetry.
startSpan options (#10825)skipOpenTelemetrySetup (#10907)inspector (#10910)Work in this release contributed by @harish-talview & @bfontaine. Thank you for your contributions!
This is the first Alpha release of the v8 cycle, which includes a variety of breaking changes.
Read the in-depth migration guide to find out how to address any breaking changes in your code.
- feat(node): Make @sentry/node powered by OpenTelemetry (#10762)
The biggest change is the switch to use OpenTelemetry under the hood in @sentry/node. This brings with it a variety of
changes:
autoDiscoverNodePerformanceMonitoringIntegrations() anymore.Sentry.init() before you import any other packages. Otherwise, the packages cannot be
instrumented:const Sentry = require('@sentry/node');
Sentry.init({
dsn: '...',
// ... other config here
});
// now require other things below this!
const http = require('http');
const express = require('express');
// ....
startTransaction and span.startChild() are no longer supported. This is due to the underlying change to
OpenTelemetry powered performance instrumentation. See
docs on the new performance APIs for details.Related changes:
defaultStackParser & getSentryRelease (#10722)errorHandler (#10728)forceTransaction in OTEL (#10807)isInitialized (#10607)errorHandler to expressErrorHandler (#10746)- feat: Remove @sentry/integrations package (#10799)
This package is no longer published. You can instead import these pluggable integrations directly from your SDK package
(e.g. @sentry/browser or @sentry/react).
- feat: Remove @sentry/hub package (#10783)
This package is no longer published. You can instead import directly from your SDK package (e.g. @sentry/react or
@sentry/node).
- feat(v8): Remove @sentry/tracing (#10625)
This package is no longer published. You can instead import directly from your SDK package (e.g. @sentry/react or
@sentry/node).
- feat: Set required node version to >=14.8.0 for all packages (#10834)
The minimum required node version is now 14.8+. If you need support for older node versions, you can stay on the v7 branch.
- Removed class-based integrations
We have removed most of the deprecated class-based integrations. Instead, you can use the functional styles:
import * as Sentry from '@sentry/browser';
// v7
Sentry.init({
integrations: [new Sentry.BrowserTracing()],
});
// v8
Sentry.init({
integrations: [new Sentry.browserTracingIntegration()],
});
BrowserTracing (#10653)- feat(v8/browser): Remove XHR transport (#10703)
We have removed the XHR transport, and are instead using the fetch-based transport now by default. This means that if you are using Sentry in a browser environment without fetch, you'll need to either provide a fetch polyfill, or provide a custom transport to Sentry.
- feat(sveltekit): Update @sentry/vite-plugin to 2.x and adjust options API (#10813)
We have updated @sentry/sveltekit to use the latest version of @sentry/vite-plugin, which lead to changes in
configuration options.
withActiveSpan is exported everywhere (#10878)null to withActiveSpan (#10717)hub from global, hub.run & hub utilities (#10718)getIsolationScope and getGlobalScope (#10658)setXXX methods set on isolation scope (#10678)addBreadcrumb write to the isolation scope instead of current scope (#10586)addEventProcessor to add to isolation scope (#10606)Sentry.addBreadcrumb to skip hub (#10601)TextEncoder and TextDecoder (#10701)captureConsoleIntegration (#10744)BaseClient (#10789)exports field to package.json (#10569)captureContext function (#10735)webpack:// prefix more broadly from source map sources field (#10642)worker_threads and fix node v14 types (#10791)null and undefined (#10821)? for anonymous function name (#10732)on and emit required on client (#10603)Span class to SentrySpan (#10687)captureXXX methods (#10688)number as span traceFlag (#10855)status field from Span (#10856)@remix-run/router a dependency. (#10479)beforeAddBreadcrumb hook instead of scope listener (#10600)We have also removed or updated a variety of deprecated APIs.
extractTraceparentData export (#10559)span.isSuccess method (#10699)traceHeaders method (#10776)_eventFromIncompleteOnError usage (#10553)browserApiErrorsIntegration (#10755)Span interface (#10854)setupOnce optional in integrations (#10729)makeMain usage (#10713)scope.applyToEvent() method (#10842)lastEventId (#10585)reuseExisting option for ACS (#10645)tracingOrigins options (#10614)showReportDialog APIs (#10609)