Update dependency @sentry/node to v8.42.0
This MR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| @sentry/node (source) | dependencies | minor | 8.33.1 -> 8.42.0 |
Release Notes
getsentry/sentry-javascript (@sentry/node)
v8.42.0
Important Changes
-
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
Deprecations
-
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
tracingOptionsin favor ofvueIntegration(#14530)Currently it is possible to configure tracing options in two places in the Sentry Nuxt SDK:
- In
Sentry.init() - Inside
tracingOptionsinSentry.init()
For tree-shaking purposes and alignment with the Vue SDK, it is now recommended to instead use the newly exported
vueIntegration()and itstracingOptionsoption 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, }, }), ], }); - In
Other Changes
- feat(browser-utils): Update
web-vitalsto v4.2.4 (#14439) - feat(nuxt): Expose
vueIntegration(#14526) - fix(feedback): Handle css correctly in screenshot mode (#14535)
v8.41.0
Important Changes
-
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
nitropackdependency to satisfy version^2.10.0andofetchto 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.
Deprecations
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
undefinedoption handling (#14450)In the next major version we will change how passing
undefinedtotracesSampleRate/tracesSampler/enableTracingwill behave.Currently, doing the following:
Sentry.init({ tracesSampleRate: undefined, });Will result in tracing being enabled (although no spans will be generated) because the
tracesSampleRatekey is present in the options object. In the next major version, this behavior will be changed so that passingundefined(or rather having atracesSampleRatekey) will result in tracing being disabled, the same as not passing the option at all. If you are currently relying onundefinedbeing passed, and and thus have tracing enabled, it is recommended to update your config to set e.g.tracesSampleRate: 0instead, which will also enable tracing in v9.The same applies to
tracesSamplerandenableTracing. -
feat(core): Log warnings when returning
nullinbeforeSendSpan(#14433)Currently, the
beforeSendSpanoption inSentry.init()allows you to drop individual spans from a trace by returningnullfrom 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
beforeSendSpanAPI 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/utilspackage will be merged into the@sentry/corepackage. It is therefore no longer recommended to use the@sentry/utilspackage. -
feat(vue): Deprecate configuring Vue tracing options anywhere else other than through the
vueIntegration'stracingOptionsoption (#14385)Currently it is possible to configure tracing options in various places in the Sentry Vue SDK:
- In
Sentry.init() - Inside
tracingOptionsinSentry.init() - In the
vueIntegration()options - Inside
tracingOptionsin thevueIntegration()options
Because this is a bit messy and confusing to document, the only recommended way to configure tracing options going forward is through the
tracingOptionsin thevueIntegration(). The other means of configuration will be removed in the next major version of the SDK. - In
-
feat: Deprecate
registerEsmLoaderHooks.includeandregisterEsmLoaderHooks.exclude(#14486)Currently it is possible to define
registerEsmLoaderHooks.includeandregisterEsmLoaderHooks.excludeoptions inSentry.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.onlyIncludeInstrumentedModulestotrue.Note that
onlyIncludeInstrumentedModules: truewill become the default behavior in the next major version and theregisterEsmLoaderHookswill no longer accept fine-grained options.
The following deprecations will most likely not affect you unless you are building an SDK yourself:
- feat(core): Deprecate
arrayify(#14405) - feat(core): Deprecate
flatten(#14454) - feat(core): Deprecate
urlEncode(#14406) - feat(core): Deprecate
validSeverityLevels(#14407) - feat(core/utils): Deprecate
getNumberOfUrlSegments(#14458) - feat(utils): Deprecate
memoBuilder,BAGGAGE_HEADER_NAME, andmakeFifoCache(#14434) - feat(utils/core): Deprecate
addRequestDataToEventandextractRequestData(#14430)
Other Changes
- feat: Streamline
sentry-trace,baggageand DSC handling (#14364) - feat(core): Further optimize debug ID parsing (#14365)
- feat(node): Add
openTelemetryInstrumentationsoption (#14484) - feat(nuxt): Add filter for not found source maps (devtools) (#14437)
- feat(nuxt): Only delete public source maps (#14438)
- fix(nextjs): Don't report
NEXT_REDIRECTfrom browser (#14440) - perf(opentelemetry): Bucket spans for cleanup (#14154)
Work in this release was contributed by @NEKOYASAN and @fmorett. Thank you for your contributions!
v8.40.0
Important Changes
-
feat(angular): Support Angular 19 (#14398)
The
@sentry/angularSDK can now be used with Angular 19. If you're upgrading to the new Angular version, you might want to migrate from the now deprecatedAPP_INITIALIZERtoken toprovideAppInitializer. In this case, change the SentryTraceServiceinitialization inapp.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
debugIntegrationandsessionTimingIntegration(#14363)The
debugIntegrationwas deprecated and will be removed in the next major version of the SDK. To log outgoing events, use Hook Options (beforeSend,beforeSendTransaction, ...).The
sessionTimingIntegrationwas 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
@WithSentryin favor of@SentryExceptionCaptured(#14323)The
@WithSentrydecorator was deprecated. Use@SentryExceptionCapturedinstead. This is a simple renaming and functionality stays identical. -
feat(nestjs): Deprecate
SentryTracingInterceptor,SentryService,SentryGlobalGenericFilter,SentryGlobalGraphQLFilter(#14371)The
SentryTracingInterceptorwas deprecated. If you are using@sentry/nestjsyou can safely remove any references to theSentryTracingInterceptor. If you are using another package migrate to@sentry/nestjsand remove theSentryTracingInterceptorafterwards.The
SentryServicewas deprecated and its functionality was added toSentry.init. If you are using@sentry/nestjsyou can safely remove any references to theSentryService. If you are using another package migrate to@sentry/nestjsand remove theSentryServiceafterwards.The
SentryGlobalGenericFilterwas deprecated. Use theSentryGlobalFilterinstead which is a drop-in replacement.The
SentryGlobalGraphQLFilterwas deprecated. Use theSentryGlobalFilterinstead which is a drop-in replacement. -
feat(node): Deprecate
nestIntegrationandsetupNestErrorHandlerin favor of using@sentry/nestjs(#14374)The
nestIntegrationandsetupNestErrorHandlerfunctions from@sentry/nodewere deprecated and will be removed in the next major version of the SDK. If you're using@sentry/nodein a NestJS application, we recommend switching to our new dedicated@sentry/nestjspackage.
Other Changes
- feat(browser): Send additional LCP timing info (#14372)
- feat(replay): Clear event buffer when full and in buffer mode (#14078)
- feat(core): Ensure
normalizedRequestonsdkProcessingMetadatais merged (#14315) - feat(core): Hoist everything from
@sentry/utilsinto@sentry/core(#14382) - fix(core): Do not throw when trying to fill readonly properties (#14402)
- fix(feedback): Fix
__selfand__sourceattributes on feedback nodes (#14356) - fix(feedback): Fix non-wrapping form title (#14355)
- fix(nextjs): Update check for not found navigation error (#14378)
v8.39.0
Important Changes
- feat(nestjs): Instrument event handlers (#14307)
The @sentry/nestjs SDK will now capture performance data for NestJS Events (@nestjs/event-emitter)
Other Changes
- feat(nestjs): Add alias
@SentryExceptionCapturedfor@WithSentry(#14322) - feat(nestjs): Duplicate
SentryServicebehaviour into@sentry/nestjsSDKinit()(#14321) - feat(nestjs): Handle GraphQL contexts in
SentryGlobalFilter(#14320) - feat(node): Add alias
childProcessIntegrationforprocessThreadBreadcrumbIntegrationand deprecate it (#14334) - feat(node): Ensure request bodies are reliably captured for http requests (#13746)
- feat(replay): Upgrade rrweb packages to 2.29.0 (#14160)
- fix(cdn): Ensure
_sentryModuleMetadatais not mangled (#14344) - fix(core): Set
sentry.sourceattribute tocustomwhen callingspan.updateNameonSentrySpan(#14251) - fix(mongo): rewrite Buffer as ? during serialization (#14071)
- fix(replay): Remove replay id from DSC on expired sessions (#14342)
- ref(profiling) Fix electron crash (#14216)
- ref(types): Deprecate
Requesttype in favor ofRequestEventData(#14317) - ref(utils): Stop setting
transactioninrequestDataIntegration(#14306) - ref(vue): Reduce bundle size for starting application render span (#14275)
v8.38.0
- docs: Improve docstrings for node otel integrations (#14217)
- feat(browser): Add moduleMetadataIntegration lazy loading support (#13817)
- feat(core): Add trpc path to context in trpcMiddleware (#14218)
- feat(deps): Bump @opentelemetry/instrumentation-amqplib from 0.42.0 to 0.43.0 (#14230)
- feat(deps): Bump @sentry/cli from 2.37.0 to 2.38.2 (#14232)
- feat(node): Add
knexintegration (#13526) - feat(node): Add
tediousintegration (#13486) - feat(utils): Single implementation to fetch debug ids (#14199)
- fix(browser): Avoid recording long animation frame spans starting before their parent span (#14186)
- fix(node): Include
debug_metawith ANR events (#14203) - fix(nuxt): Fix dynamic import rollup plugin to work with latest nitro (#14243)
- fix(react): Support wildcard routes on React Router 6 (#14205)
- fix(spotlight): Export spotlightBrowserIntegration from the main browser package (#14208)
- ref(browser): Ensure start time of interaction root and child span is aligned (#14188)
- ref(nextjs): Make build-time value injection turbopack compatible (#14081)
Work in this release was contributed by @grahamhency, @Zen-cronic, @gilisho and @phuctm97. Thank you for your contributions!
v8.37.1
- feat(deps): Bump @opentelemetry/instrumentation from 0.53.0 to 0.54.0 for @sentry/opentelemetry (#14187)
v8.37.0
Important Changes
- feat(nuxt): Add
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 */
}),
],
});
- feat: Deprecate metrics API (#14157)
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.
Other Changes
- feat(browser): Add
http.response_delivery_typeattribute to resource spans (#14056) - feat(browser): Add
skipBrowserExtensionCheckescape hatch option (#14147) - feat(deps): Bump @opentelemetry/instrumentation from 0.53.0 to 0.54.0 (#14174)
- feat(deps): Bump @opentelemetry/instrumentation-fastify from 0.40.0 to 0.41.0 (#14175)
- feat(deps): Bump @opentelemetry/instrumentation-graphql from 0.43.0 to 0.44.0 (#14173)
- feat(deps): Bump @opentelemetry/instrumentation-mongodb from 0.47.0 to 0.48.0 (#14171)
- feat(deps): Bump @opentelemetry/propagator-aws-xray from 1.25.1 to 1.26.0 (#14172)
- feat(nuxt): Add
asyncFunctionReExportsto define re-exported server functions (#14104) - feat(nuxt): Add
piniaIntegration(#14138) - fix(browser): Avoid recording long task spans starting before their parent span (#14183)
- fix(core): Ensure errors thrown in async cron jobs bubble up (#14182)
- fix(core): Silently fail
maybeInstrument(#14140) - fix(nextjs): Resolve path for dynamic webpack import (#13751)
- fix(node): Make sure
modulesIntegrationdoes not crash esm apps (#14169)
Work in this release was contributed by @rexxars. Thank you for your contribution!
v8.36.0
Important Changes
- feat(nextjs/vercel-edge/cloudflare): Switch to OTEL for performance monitoring (#13889)
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.
Other Changes
- deps: Bump bundler plugins and CLI to 2.22.6 and 2.37.0 respectively (#14050)
- feat(deps): bump @opentelemetry/instrumentation-aws-sdk from 0.44.0 to 0.45.0 (#14099)
- feat(deps): bump @opentelemetry/instrumentation-connect from 0.39.0 to 0.40.0 (#14101)
- feat(deps): bump @opentelemetry/instrumentation-express from 0.43.0 to 0.44.0 (#14102)
- feat(deps): bump @opentelemetry/instrumentation-fs from 0.15.0 to 0.16.0 (#14098)
- feat(deps): bump @opentelemetry/instrumentation-kafkajs from 0.3.0 to 0.4.0 (#14100)
- feat(nextjs): Add method and url to route handler request data (#14084)
- feat(node): Add breadcrumbs for
child_processandworker_thread(#13896) - fix(core): Ensure standalone spans are not sent if SDK is disabled (#14088)
- fix(nextjs): Await flush in api handlers (#14023)
- fix(nextjs): Don't leak webpack types into exports (#14116)
- fix(nextjs): Fix matching logic for file convention type for root level components (#14038)
- fix(nextjs): Respect directives in value injection loader (#14083)
- fix(nuxt): Only wrap
.mjsentry files in rollup (#14060) - fix(nuxt): Re-export all exported bindings (#14086)
- fix(nuxt): Server-side setup in readme (#14049)
- fix(profiling-node): Always warn when running on incompatible major version of Node.js (#14043)
- fix(replay): Fix
onErrorcallback (#14002) - perf(otel): Only calculate current timestamp once (#14094)
- test(browser-integration): Add sentry DSN route handler by default (#14095)
v8.35.0
Beta release of the official Nuxt Sentry SDK
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.
- feat(nuxt): Make dynamic import() wrapping default (#13958) (BREAKING)
- feat(nuxt): Add Rollup plugin to wrap server entry with
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;
}
- feat(nuxt): Respect user-provided source map generation settings (#14020)
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,
},
});
- feat(nuxt): Log server instrumentation might not work in dev (#14021)
- feat(nuxt): Add Http
responseHookwithwaitUntil(#13986)
Important Changes
- feat(vue): Add Pinia plugin (#13841)
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());
- feat(node): Implement Sentry-specific http instrumentation (#13763)
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 })).
- feat(core): Make stream instrumentation opt-in (#13951)
This change adds a new option trackFetchStreamPerformance to the browser tracing integration. Only when set to true,
Sentry will instrument streams via fetch.
Other Changes
- feat(node): Expose
suppressTracingAPI (#13875) - feat(replay): Do not log "timeout while trying to read resp body" as exception (#13965)
- chore(node): Bump
@opentelemetry/instrumentation-expressto0.43.0(#13948) - chore(node): Bump
@opentelemetry/instrumentation-fastifyto0.40.0(#13983) - fix: Ensure type for
initis correct in meta frameworks (#13938) - fix(core):
.setthesentry-traceheader instead of.appending in fetch instrumentation (#13907) - fix(module): keep version for node ESM package (#13922)
- fix(node): Ensure
ignoreOutgoingRequestsofhttpIntegrationapplies to breadcrumbs (#13970) - fix(replay): Fix onError sampling when loading an expired buffered session (#13962)
- fix(replay): Ignore older performance entries when starting manually (#13969)
- perf(node): Truncate breadcrumb messages created by console integration (#14006)
Work in this release was contributed by @ZakrepaShe and @zhiyan114. Thank you for your contributions!
v8.34.0
Important Changes
- ref(nextjs): Remove dead code (#13828)
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.
Other Changes
- feat(cdn): Export
getReplayin replay CDN bundles (#13881) - feat(replay): Clear fallback buffer when switching buffers (#13914)
- feat(replay): Upgrade rrweb packages to 2.28.0 (#13732)
- fix(docs): Correct supported browsers due to
globalThis(#13788) - fix(nextjs): Adjust path to
requestAsyncStorageShim.jstemplate file (#13928) - fix(nextjs): Detect new locations for request async storage to support Next.js v15.0.0-canary.180 and higher (#13920)
- fix(nextjs): Drop
_not-foundspans for all HTTP methods (#13906) - fix(nextjs): Fix resolution of request storage shim fallback (#13929)
- fix(node): Ensure graphql options are correct when preloading (#13769)
- fix(node): Local variables handle error (#13827)
- fix(node): Remove
dataloaderinstrumentation from default integrations (#13873) - fix(nuxt): Create declaration files for Nuxt module (#13909)
- fix(replay): Ensure
replay_idis removed from frozen DSC when stopped (#13893) - fix(replay): Try/catch
sendBufferedReplayOrFlushto prevent cycles (#13900) - fix(sveltekit): Ensure trace meta tags are always injected (#13231)
- fix(sveltekit): Update
wrapServerRouteWithSentryto respect ParamMatchers (#13390) - fix(wasm): Integration wasm uncaught WebAssembly.Exception (#13787) (#13854)
- ref(nextjs): Ignore sentry spans based on query param attribute (#13905)
- ref(utils): Move
vercelWaitUntilto utils (#13891)
Work in this release was contributed by @trzeciak, @gurpreetatwal, @ykzts and @lizhiyao. Thank you for your contributions!
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.