Packages

@sentry/node

11.9.0 · 23 Oct 2026MIT36.1M / weekRepositoryHomepagenpmAtom feed

Your version

9.16.0

7 May 2025Where it was published

9.47.2 is the newest release of 9.x.

In short

9 new8 fixed1 internal

Release note

Important changes

  • Create a Vite plugin that injects sentryConfig into the global config

Add a new plugin makeConfigInjectorPlugin within our existing vite plugin that updates the global vite config with sentry options

  • browser: Add option to sample linked traces consistently

This PR implements consistent sampling across traces as outlined in

  • cloudflare: Add support for durable objects

This PR introduces a new instrumentDurableObjectWithSentry method to the SDK, which instruments durable objects. We capture both traces and errors automatically.

  • node: Add Prisma integration by default

Prisma integration is enabled by default, it should work for both ESM and CJS.

  • react-router: Add client-side router instrumentation

Adds client-side instrumentation for react router's HydratedRouter. To enable it, simply replace browserTracingIntegration() with reactRouterTracingIntegration() in your client-side init call.

  • node: Avoid double-wrapping http module

When running your application in ESM mode, there have been scenarios that resulted in the http/https emitting duplicate spans for incoming requests. This was apparently caused by us double-wrapping the modules for incoming request isolation.

In order to solve this problem, the modules are no longer monkey patched by us for request isolation. Instead, we register diagnosticschannel hooks to handle request isolation now.
While this is generally not expected to break anything, there is one tiny change that _may
affect you if you have been relying on very specific functionality:

The ignoreOutgoingRequests option of httpIntegration receives the RequestOptions as second argument. This type is not changed, however due to how the wrapping now works, we no longer pass through the full RequestOptions, but re-construct this partially based on the generated request. For the vast majority of cases, this should be fine, but for the sake of completeness, these are the only fields that may be available there going forward - other fields that may have existed before may no longer be set:

ignoreOutgoingRequests(url: string, {
  method: string;
  protocol: string;
  host: string;
  hostname: string; // same as host
  path: string;
  headers: OutgoingHttpHeaders;
})

Other changes

  • cloudflare: Add logs exports

  • vercel-edge: Add logs export

  • cloudflare: Read SENTRY_RELEASE from env

  • node: Drop http.server spans with 404 status by default

  • browser: Respect manually set sentry tracing headers in XHR requests

  • core: Respect manually set sentry tracing headers in fetch calls

  • feedback: Prevent removeFromDom() from throwing

  • node: Use class constructor in docstring for winston transport

  • node: Fix vercel flushing logic & add test for it

  • node: Fix 404 route handling in express 5

  • logs: Ensure logs can be flushed correctly