You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@sentry/svelte

Package Overview
Dependencies
Maintainers
10
Versions
322
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/svelte - npm Package Versions

2345
33

9.40.0

Diff
s
sentry-bot
published 9.40.0 •

Changelog

Source

9.40.0

Important Changes

  • feat(browser): Add debugId sync APIs between web worker and main thread (#16981)

This release adds two Browser SDK APIs to let the main thread know about debugIds of worker files:

  • webWorkerIntegration({worker}) to be used in the main thread
  • registerWebWorker({self}) to be used in the web worker
// main.js
Sentry.init({...})

const worker = new MyWorker(...);

Sentry.addIntegration(Sentry.webWorkerIntegration({ worker }));

worker.addEventListener('message', e => {...});
// worker.js
Sentry.registerWebWorker({ self });

self.postMessage(...);
  • feat(core): Deprecate logger in favor of debug (#17040)

The internal SDK logger export from @sentry/core has been deprecated in favor of the debug export. debug only exposes log, warn, and error methods but is otherwise identical to logger. Note that this deprecation does not affect the logger export from other packages (like @sentry/browser or @sentry/node) which is used for Sentry Logging.

import { logger, debug } from '@sentry/core';

// before
logger.info('This is an info message');

// after
debug.log('This is an info message');
  • feat(node): Add OpenAI integration (#17022)

This release adds official support for instrumenting OpenAI SDK calls in with Sentry tracing, following OpenTelemetry semantic conventions for Generative AI. It instruments:

  • client.chat.completions.create() - For chat-based completions
  • client.responses.create() - For the responses API
// The integration respects your `sendDefaultPii` option, but you can override the behavior in the integration options

Sentry.init({
  dsn: '__DSN__',
  integrations: [
    Sentry.openAIIntegration({
      recordInputs: true, // Force recording prompts
      recordOutputs: true, // Force recording responses
    }),
  ],
});

Other Changes

  • feat(node-core): Expand @opentelemetry/instrumentation range to cover 0.203.0 (#17043)
  • fix(cloudflare): Ensure errors get captured from durable objects (#16838)
  • fix(sveltekit): Ensure server errors from streamed responses are sent (#17044)

Work in this release was contributed by @0xbad0c0d3 and @tommy-gilligan. Thank you for your contributions!

s
sentry-bot
published 9.39.0 •

Changelog

Source

9.39.0

Important Changes

  • feat(browser): Add afterStartPageloadSpan hook to improve spanId assignment on web vital spans (#16893)

This PR adds a new afterStartPageloadSpan lifecycle hook to more robustly assign the correct pageload span ID to web vital spans, replacing the previous unreliable "wait for a tick" approach with a direct callback that fires when the pageload span becomes available.

  • feat(nextjs): Client-side parameterized routes (#16934)

This PR implements client-side parameterized routes for Next.js by leveraging an injected manifest within the existing app-router instrumentation to automatically parameterize all client-side transactions (e.g. users/123 and users/456 now become become users/:id).

  • feat(node): Drop 401-404 and 3xx status code spans by default (#16972)

This PR changes the default behavior in the Node SDK to drop HTTP spans with 401-404 and 3xx status codes by default to reduce noise in tracing data.

Other Changes

  • feat(core): Prepend vercel ai attributes with vercel.ai.X (#16908)
  • feat(nextjs): Add disableSentryWebpackConfig flag (#17013)
  • feat(nextjs): Build app manifest (#16851)
  • feat(nextjs): Inject manifest into client for turbopack builds (#16902)
  • feat(nextjs): Inject manifest into client for webpack builds (#16857)
  • feat(node-native): Add option to disable event loop blocked detection (#16919)
  • feat(react-router): Ensure http.server route handling is consistent (#16986)
  • fix(core): Avoid prolonging idle span when starting standalone span (#16928)
  • fix(core): Remove side-effect from tracing/errors.ts (#16888)
  • fix(core): Wrap beforeSendLog in consoleSandbox (#16968)
  • fix(node-core): Apply correct SDK metadata (#17014)
  • fix(react-router): Ensure that all browser spans have source=route (#16984)

Work in this release was contributed by @janpapenbrock. Thank you for your contribution!

s
sentry-bot
published 9.38.0 •

Changelog

Source

9.38.0

Important Changes

  • chore: Add craft entry for @sentry/node-native (#16907)

This release publishes the @sentry/node-native SDK.

Other Changes

  • feat(core): Introduce debug to replace logger (#16906)
  • fix(browser): Guard nextHopProtocol when adding resource spans (#16900)
s
sentry-bot
published 9.37.0 •

Changelog

Source

9.37.0

Important Changes

  • feat(nuxt): Parametrize SSR routes (#16843)

    When requesting dynamic or catch-all routes in Nuxt, those will now be shown as parameterized routes in Sentry. For example, /users/123 will be shown as /users/:userId() in Sentry. This will make it easier to identify patterns and make grouping easier.

Other Changes

  • feat(astro): Deprecate passing runtime config to astro integration (#16839)
  • feat(browser): Add beforeStartNavigationSpan lifecycle hook (#16863)
  • feat(browser): Detect redirects when emitting navigation spans (#16324)
  • feat(cloudflare): Add option to opt out of capturing errors in wrapRequestHandler (#16852)
  • feat(feedback): Return the eventId into the onSubmitSuccess callback (#16835)
  • feat(vercel-edge): Do not vendor in all OpenTelemetry dependencies (#16841)
  • fix(browser): Ensure standalone CLS and LCP spans have traceId of pageload span (#16864)
  • fix(nextjs): Use value injection loader on instrumentation-client.ts|js (#16855)
  • fix(sveltekit): Avoid capturing redirect() calls as errors in Cloudflare (#16853)
  • docs(nextjs): Update deleteSourcemapsAfterUpload jsdoc default value (#16867)

Work in this release was contributed by @zachkirsch. Thank you for your contribution!

s
sentry-bot
published 9.36.0 •

Changelog

Source

9.36.0

Important Changes

  • feat(node-core): Add node-core SDK (#16745)

This release adds a new SDK @sentry/node-core which ships without any OpenTelemetry instrumententation out of the box. All OpenTelemetry dependencies are peer dependencies and OpenTelemetry has to be set up manually.

Use @sentry/node-core when:

  • You already have OpenTelemetry set up
  • You need custom OpenTelemetry configuration
  • You want minimal dependencies
  • You need fine-grained control over instrumentation

Use @sentry/node when:

  • You want an automatic setup
  • You're new to OpenTelemetry
  • You want sensible defaults
  • You prefer convenience over control
  • feat(node): Deprecate ANR integration (#16832)

The ANR integration has been deprecated and will be removed in future versions. Use eventLoopBlockIntegration from @sentry/node-native instead.

  • feat(replay): Add _experiments.ignoreMutations option (#16816)

This replay option allows to configure a selector list of elements to not capture mutations for.

Sentry.replayIntegration({
  _experiments: {
    ignoreMutations: ['.dragging'],
  },
});

Other changes

  • feat(deps): bump @prisma/instrumentation from 6.10.1 to 6.11.1 (#16833)
  • feat(nextjs): Add flag for suppressing router transition warning (#16823)
  • feat(nextjs): Automatically skip middleware requests for tunnel route (#16812)
  • feat(replay): Export compression worker from @sentry/replay-internal (#16794)
  • fix(browser): Avoid 4xx response for succesful diagnoseSdkConnectivity request (#16840)
  • fix(browser): Guard against undefined nextHopProtocol (#16806)
  • fix(cloudflare): calculate retries not attempts (#16834)
  • fix(nuxt): Parametrize routes on the server-side (#16785)
  • fix(vue): Make pageload span handling more reliable (#16799)

Work in this release was contributed by @Spice-King and @stayallive. Thank you for your contributions!

s
sentry-bot
published 9.36.0-alpha.2 •
s
sentry-bot
published 9.36.0-alpha.1 •
s
sentry-bot
published 9.35.0 •

Changelog

Source

9.35.0

  • feat(browser): Add ElementTiming instrumentation and spans (#16589)
  • feat(browser): Export Context and Contexts types (#16763)
  • feat(cloudflare): Add user agent to cloudflare spans (#16793)
  • feat(node): Add eventLoopBlockIntegration (#16709)
  • feat(node): Export server-side feature flag integration shims (#16735)
  • feat(node): Update vercel ai integration attributes (#16721)
  • fix(astro): Handle errors in middlewares better (#16693)
  • fix(browser): Ensure explicit parentSpan is considered (#16776)
  • fix(node): Avoid using dynamic require for fastify integration (#16789)
  • fix(nuxt): Add @sentry/cloudflare as optional peerDependency (#16782)
  • fix(nuxt): Ensure order of plugins is consistent (#16798)
  • fix(nestjs): Fix exception handling in @Cron decorated tasks (#16792)

Work in this release was contributed by @0xbad0c0d3 and @alSergey. Thank you for your contributions!

s
sentry-bot
published 9.34.0-alpha.1 •
s
sentry-bot
published 9.34.0 •

Changelog

Source

9.34.0

Important Changes

  • feat(nuxt): Add Cloudflare Nitro plugin (#15597)

    A Nitro plugin for @sentry/nuxt which initializes Sentry when deployed to Cloudflare (cloudflare-pages preset).

    • Remove the previous server config file: sentry.server.config.ts

    • Add a plugin in server/plugins (e.g. server/plugins/sentry-cloudflare-setup.ts)

    • Add this code in your plugin file

      // server/plugins/sentry-cloudflare-setup.ts (filename does not matter)
      import { sentryCloudflareNitroPlugin } from '@sentry/nuxt/module/plugins';
      
      export default defineNitroPlugin(
        sentryCloudflareNitroPlugin({
          dsn: 'https://dsn',
          tracesSampleRate: 1.0,
        }),
      );
      

      or with access to nitroApp:

      // server/plugins/sentry-cloudflare-setup.ts (filename does not matter)
      import { sentryCloudflareNitroPlugin } from '@sentry/nuxt/module/plugins';
      
      export default defineNitroPlugin(sentryCloudflareNitroPlugin((nitroApp: NitroApp) => {
        // You can access nitroApp here if needed
        return  ({
          dsn: 'https://dsn',
          tracesSampleRate: 1.0,
        })
      }))
      

Other Changes

  • feat(browser): Record standalone LCP spans (#16591)
  • fix(nuxt): Only add OTel alias in dev mode (#16756)
2345
33