Update dependency @sentry/node to v9.12.0
-
Review changes -
-
Download -
Patches
-
Plain diff
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
@sentry/node (source) | dependencies | minor | 9.8.0 -> 9.12.0 |
Release Notes
getsentry/sentry-javascript (@sentry/node)
v9.12.0
Important Changes
-
feat(feedback): Implement highlighting and hiding controls for screenshots (#15951)
The Sentry SDK now supports highlighting and hiding controls for screenshots in user feedback reports. This functionality is enabled by default.
-
feat(node): Add
ignoreIncomingRequestBody
callback tohttpIntegration
(#15959)The
httpIntegration
now supports an optionalignoreIncomingRequestBody
callback that can be used to skip capturing the body of incoming requests.Sentry.init({ integrations: [ Sentry.httpIntegration({ ignoreIncomingRequestBody: (url, request) => { return request.method === 'GET' && url.includes('/api/large-payload'); }, }), ], });
The
ignoreIncomingRequestBody
callback receives the URL of the request and should returntrue
if the body should be ignored. -
Logging Improvements
Sentry is adding support for structured logging. In this release we've made a variety of improvements to logging functionality in the Sentry SDKs.
- feat(node): Add server.address to nodejs logs (#16006)
- feat(core): Add sdk name and version to logs (#16005)
- feat(core): Add sentry origin attribute to console logs integration (#15998)
- fix(core): Do not abbreviate message parameter attribute (#15987)
- fix(core): Prefix release and environment correctly (#15999)
- fix(node): Make log flushing logic more robust (#15991)
Other Changes
- build(aws-serverless): Include debug logs in lambda layer SDK bundle (#15974)
- feat(astro): Add tracking of errors during HTML streaming (#15995)
- feat(browser): Add
onRequestSpanStart
hook to browser tracing integration (#15979) - feat(deps): Bump @sentry/cli from 2.42.3 to 2.43.0 (#16001)
- feat(nextjs): Add
captureRouterTransitionStart
hook for capturing navigations (#15981) - feat(nextjs): Mark clientside prefetch request spans with
http.request.prefetch: true
attribute (#15980) - feat(nextjs): Un experimentify
clientInstrumentationHook
(#15992) - feat(nextjs): Warn when client was initialized more than once (#15971)
- feat(node): Add support for
SENTRY_DEBUG
env variable (#15972) - fix(tss-react): Change
authToken
type tostring
(#15985)
Work in this release was contributed by @Page- and @Fryuni. Thank you for your contributions!
Bundle size 

Path | Size |
---|---|
@sentry/browser | 23.28 KB |
@sentry/browser - with treeshaking flags | 23.12 KB |
@sentry/browser (incl. Tracing) | 36.95 KB |
@sentry/browser (incl. Tracing, Replay) | 74.14 KB |
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags | 67.51 KB |
@sentry/browser (incl. Tracing, Replay with Canvas) | 78.8 KB |
@sentry/browser (incl. Tracing, Replay, Feedback) | 90.61 KB |
@sentry/browser (incl. Feedback) | 39.68 KB |
@sentry/browser (incl. sendFeedback) | 27.9 KB |
@sentry/browser (incl. FeedbackAsync) | 32.67 KB |
@sentry/react | 25.09 KB |
@sentry/react (incl. Tracing) | 38.87 KB |
@sentry/vue | 27.51 KB |
@sentry/vue (incl. Tracing) | 38.67 KB |
@sentry/svelte | 23.32 KB |
CDN Bundle | 24.51 KB |
CDN Bundle (incl. Tracing) | 36.95 KB |
CDN Bundle (incl. Tracing, Replay) | 71.99 KB |
CDN Bundle (incl. Tracing, Replay, Feedback) | 77.16 KB |
CDN Bundle - uncompressed | 71.47 KB |
CDN Bundle (incl. Tracing) - uncompressed | 109.23 KB |
CDN Bundle (incl. Tracing, Replay) - uncompressed | 220.52 KB |
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed | 233.05 KB |
@sentry/nextjs (client) | 40.49 KB |
@sentry/sveltekit (client) | 37.39 KB |
@sentry/node | 143.03 KB |
@sentry/node - without tracing | 96.24 KB |
@sentry/aws-serverless | 120.58 KB |
v9.11.0
- feat(browser): Add
http.redirect_count
attribute tobrowser.redirect
span (#15943) - feat(core): Add
consoleLoggingIntegration
for logs (#15955) - feat(core): Don't truncate error messages (#15818)
- feat(nextjs): Add release injection in Turbopack (#15958)
- feat(nextjs): Record
turbopack
as tag (#15928) - feat(nuxt): Base decision on source maps upload only on Nuxt source map settings (#15859)
- feat(react-router): Add
sentryHandleRequest
(#15787) - fix(node): Use
module
instead ofrequire
for CJS check (#15927) - fix(remix): Remove mentions of deprecated
ErrorBoundary
wrapper (#15930) - ref(browser): Temporarily add
sentry.previous_trace
span attribute (#15957) - ref(browser/core): Move all log flushing logic into clients (#15831)
- ref(core): Improve URL parsing utilities (#15882)
v9.10.1
- fix: Correct @sentry-internal/feedback docs to match the code (#15874)
- deps: Bump bundler plugins to version
3.2.4
(#15909)
v9.10.0
Important Changes
-
feat: Add support for logs
- feat(node): Add logging public APIs to Node SDKs (#15764)
- feat(core): Add support for
beforeSendLog
(#15814) - feat(core): Add support for parameterizing logs (#15812)
- fix: Remove critical log severity level (#15824)
All JavaScript SDKs other than
@sentry/cloudflare
and@sentry/deno
now support sending logs via dedicated methods as part of Sentry's upcoming logging product.Logging is gated by an experimental option,
_experiments.enableLogs
.Sentry.init({ dsn: 'PUBLIC_DSN', // `enableLogs` must be set to true to use the logging features _experiments: { enableLogs: true }, }); const { trace, debug, info, warn, error, fatal, fmt } = Sentry.logger; trace('Starting database connection', { database: 'users' }); debug('Cache miss for user', { userId: 123 }); error('Failed to process payment', { orderId: 'order_123', amount: 99.99 }); fatal('Database connection pool exhausted', { database: 'users', activeConnections: 100 }); // Structured logging via the `fmt` helper function. When you use `fmt`, the string template and parameters are sent separately so they can be queried independently in Sentry. info(fmt(`Updated profile for user ${userId}`)); warn(fmt(`Rate limit approaching for endpoint ${endpoint}. Requests: ${requests}, Limit: ${limit}`));
With server-side SDKs like
@sentry/node
,@sentry/bun
or server-side of@sentry/nextjs
or@sentry/sveltekit
, you can do structured logging without needing thefmt
helper function.const { info, warn } = Sentry.logger; info('User %s logged in successfully', [123]); warn('Failed to load user %s data', [123], { errorCode: 404 });
To filter logs, or update them before they are sent to Sentry, you can use the
_experiments.beforeSendLog
option. -
feat(browser): Add
diagnoseSdkConnectivity()
function to programmatically detect possible connectivity issues (#15821)The
diagnoseSdkConnectivity()
function can be used to programmatically detect possible connectivity issues with the Sentry SDK.const result = await Sentry.diagnoseSdkConnectivity();
The result will be an object with the following properties:
-
"no-client-active"
: There was no active client when the function was called. This possibly means that the SDK was not initialized yet. -
"sentry-unreachable"
: The Sentry SaaS servers were not reachable. This likely means that there is an ad blocker active on the page or that there are other connection issues. -
undefined
: The SDK is working as expected.
-
-
SDK Tracing Performance Improvements for Node SDKs
- feat: Stop using
dropUndefinedKeys
(#15796) - feat(node): Only add span listeners for instrumentation when used (#15802)
- ref: Avoid
dropUndefinedKeys
forspanToJSON
calls (#15792) - ref: Avoid using
SentryError
for PromiseBuffer control flow (#15822) - ref: Stop using
dropUndefinedKeys
in SpanExporter (#15794) - ref(core): Avoid using
SentryError
for event processing control flow (#15823) - ref(node): Avoid
dropUndefinedKeys
in Node SDK init (#15797) - ref(opentelemetry): Avoid sampling work for non-root spans (#15820)
We've been hard at work making performance improvements to the Sentry Node SDKs (
@sentry/node
,@sentry/aws-serverless
,@sentry/nestjs
, etc.). We've seen that upgrading from9.7.0
to9.10.0
leads to 30-40% improvement in request latency for HTTP web-server applications that use tracing with high sample rates. Non web-server applications and non-tracing applications will see smaller improvements. - feat: Stop using
Other Changes
- chore(deps): Bump
rrweb
to2.35.0
(#15825) - deps: Bump bundler plugins to
3.2.3
(#15829) - feat: Always truncate stored breadcrumb messages to 2kb (#15819)
- feat(nextjs): Disable server webpack-handling for static builds (#15751)
- fix(nuxt): Don't override Nuxt options if undefined (#15795)
v9.9.0
Important Changes
-
feat(nextjs): Support
instrumentation-client.ts
(#15705)Next.js recently added a feature to support client-side (browser) instrumentation via a
instrumentation-client.ts
file.To be forwards compatible, the Sentry Next.js SDK will now pick up
instrumentation-client.ts
files even on older Next.js versions and add them to your client bundles. It is suggested that you either rename yoursentry.client.config.ts
file toinstrumentation-client.ts
, or if you already happen to have ainstrumentation-client.ts
file move the contents ofsentry.client.config.ts
toinstrumentation-client.ts
. -
feat(browser): Add
previous_trace
span links (#15569)The
@sentry/browser
SDK and SDKs based on@sentry/browser
now emits a link from the first root span of a newly started trace to the root span of a previously started trace. You can control this feature via an option inbrowserTracingIntegration()
:Sentry.init({ dsn: 'your-dsn-here' integrations: [ Sentry.browserTracingIntegration({ // Available settings: // - 'in-memory' (default): Stores previous trace information in memory // - 'session-storage': Stores previous trace information in the browser's `sessionStorage` // - 'off': Disable storing and sending previous trace information linkPreviousTrace: 'in-memory', }), ], });
-
feat(browser): Add
logger.X
methods to browser SDK (#15763)For Sentry's upcoming logging product, the SDK now supports sending logs via dedicated methods.
Sentry.init({ dsn: 'your-dsn-here', _experiments: { enableLogs: true, // This is required to use the logging features }, }); Sentry.logger.info('This is a trace message', { userId: 123 }); // See MR for better documentation
Please note that the logs product is still in early access. See the link above for more information.
Other Changes
- feat(browser): Attach host as part of error message to "Failed to fetch" errors (#15729)
- feat(core): Add
parseStringToURL
method (#15768) - feat(core): Optimize
dropUndefinedKeys
(#15760) - feat(node): Add fastify
shouldHandleError
(#15771) - fix(nuxt): Delete no longer needed Nitro 'close' hook (#15790)
- perf(nestjs): Remove usage of
addNonEnumerableProperty
(#15766) - ref: Avoid some usage of
dropUndefinedKeys()
(#15757) - ref: Remove some usages of
dropUndefinedKeys()
(#15781) - ref(nextjs): Fix Next.js vercel-edge runtime package information (#15789)
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.
Merge request reports
Activity
- Approvals
- Assignees & reviewers
- Comments (from bots)
- Comments (from users)
- Commits & branches
- Edits
- Labels
- Lock status
- Mentions
- Merge request status
- Tracking
- Apr 08, 2025
-
-