Packages

@sentry/serverless

7.120.4 · 29 Jul 2025MIT226.6k / weekRepositoryHomepagenpmAtom feed

Your version

7.46.0

30 Mar 2023Where it was published

7.120.4 is the newest release of 7.x.

In short

9 new7 fixed3 changed

Release note

Important Changes

  • feat(sveltekit): Add Performance Monitoring for SvelteKit

    • feat(sveltekit): Add meta tag for backend -> frontend

    • fix(sveltekit): Explicitly export Node SDK exports

    • fix(sveltekit): Handle nested server calls in sentryHandle

    • ref(sveltekit): Split up universal and server load wrappers

This release adds support for Performance Monitoring in our SvelteKit SDK for the client/server. We've also changed how you should initialize your SDK. Please read our updated SvelteKit README instructions for more details.

  • feat(core): Add ignoreTransactions option

You can now easily filter out certain transactions from being sent to Sentry based on their name.

Sentry.init({
  ignoreTransactions: ['/api/healthcheck', '/ping'],
})
  • feat(node): Undici integration

    • feat(nextjs): Add Undici integration automatically

    • feat(sveltekit): Add Undici integration by default

We've added an integration that automatically instruments Undici and Node server side fetch. This supports Undici v4.7.0 or higher and requires Node v16.7.0 or higher. After adding the integration outgoing requests made by Undici will have associated spans and breadcrumbs in Sentry.

Sentry.init({
  integrations: [new Sentry.Integrations.Undici()],
})

In our Next.js and SvelteKit SDKs, this integration is automatically added.

  • feat(node): Add Sentry tRPC middleware

We've added a new middleware for trpc that automatically adds TRPC information to Sentry transactions. This middleware is meant to be used in combination with a Sentry server integration (Next.js, Express, etc).

import { initTRPC } from '@trpc/server';
import * as Sentry from '@sentry/node';

const t = initTRPC.context().create();
const sentryMiddleware = t.middleware(
  Sentry.Handlers.trpcMiddleware({
    attachRpcInput: true,
  }),
);

const sentrifiedProcedure = t.procedure.use(sentryMiddleware);

With 7.46.0 you no longer require the @sentry/tracing package to use tracing and performance monitoring with the Sentry JavaScript SDKs. The @sentry/tracing package will be removed in a future major release, but can still be used with no changes.

Please see the Migration docs for more details.

  • fix(node): Convert debugging code to callbacks to fix memory leak in LocalVariables integration

This fixes a memory leak in the opt-in LocalVariables integration, which adds local variables to the stacktraces sent to Sentry. The minimum recommended version to use the LocalVariables is now 7.46.0.

Additional Features and Fixes

  • node: Auto discovery only returns integrations where dependency loads

  • node: Sanitize URLs in Span descriptions and breadcrumbs (PII)

  • replay: Add responseStatus, decodedBodySize to perf entries

  • replay: Add experiment to capture request/response bodies

  • replay: Capture replay mutation breadcrumbs & add experiment

  • tracing: Ensure pageload transaction starts at timeOrigin

  • core: Remove abs_path from stack trace (reverting #7167)

  • nextjs: Add loading component type to server component wrapping

  • nextjs: Don't report NEXT_NOT_FOUND and NEXT_REDIRECT errors

  • nextjs: Rewrite abs_path frames

  • nextjs: Show errors and warnings only once during build

  • nextjs: Use Next.js internal AsyncStorage

  • nextjs: Gracefully handle undefined beforeFiles in rewrites

Work in this release contributed by @aldenquimby and @bertho-zero. Thank you for your contributions!

Bundle size

PathSize
@sentry/browser - ES5 CDN Bundle (gzipped + minified)20.62 KB
@sentry/browser - ES5 CDN Bundle (minified)64.4 KB
@sentry/browser - ES6 CDN Bundle (gzipped + minified)19.15 KB
@sentry/browser - ES6 CDN Bundle (minified)56.78 KB
@sentry/browser - Webpack (gzipped + minified)21.53 KB
@sentry/browser - Webpack (minified)72 KB
@sentry/react - Webpack (gzipped + minified)21.55 KB
@sentry/nextjs Client - Webpack (gzipped + minified)52.05 KB
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified)28.21 KB
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified)26.41 KB
@sentry/replay ES6 CDN Bundle (gzipped + minified)44.74 KB
@sentry/replay - Webpack (gzipped + minified)38.86 KB
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified)63.46 KB
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified)56.49 KB