You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@sentry/types

Package Overview
Dependencies
Maintainers
11
Versions
452
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
23
46
Next

8.20.0

Diff

Changelog

Source

8.20.0

Important Changes

  • feat(node): Allow to pass registerEsmLoaderHooks to preload (#12998)

You can write your own custom preload script and configure this in the preload options. registerEsmLoaderHooks can be passed as an option to preloadOpenTelemetry, which allows to exclude/include packages in the preload.

  • fix(node): Do not emit fetch spans when tracing is disabled (#13003)

Sentry will not emit "fetch" spans if tracing is disabled. This is relevant for user who use their own sampler.

Other Changes

  • feat(feedback): Trigger button aria label configuration (#13008)
  • feat(nestjs): Change nest sdk setup (#12920)
  • feat(node): Extend ESM hooks options for iitm v1.10.0 (#13016)
  • feat(node): Send client reports (#12951)
  • feat(nuxt): Automatically add BrowserTracing (#13005)
  • feat(nuxt): Setup source maps with vite config (#13018)
  • feat(replay): Improve public Replay APIs (#13000)
sentry-bot
published 8.19.0 •

Changelog

Source

For Node.js >= 18.19.0

node --import=@sentry/node/import app.js


- **feat(node): Do not exit process by default when other `onUncaughtException` handlers are registered in
  `onUncaughtExceptionIntegration` (#11532)**

In v8, we will no longer exit the node process by default if other uncaught exception handlers have been registered by
the user.

- **Better handling of transaction name for errors**

We improved the way we keep the transaction name for error events, even when spans are not sampled or performance is
disabled.

- feat(fastify): Update scope `transactionName` when handling request (#11447)
- feat(hapi): Update scope `transactionName` when handling request (#11448)
- feat(koa): Update scope `transactionName` when creating router span (#11476)
- feat(sveltekit): Update scope transactionName when handling server-side request (#11511)
- feat(nestjs): Update scope transaction name with parameterized route (#11510)

### Removal/Refactoring of deprecated functionality

- feat(core): Remove `getCurrentHub` from `AsyncContextStrategy` (#11581)
- feat(core): Remove `getGlobalHub` export (#11565)
- feat(core): Remove `Hub` class export (#11560)
- feat(core): Remove most Hub class exports (#11536)
- feat(nextjs): Remove webpack 4 support (#11605)
- feat(vercel-edge): Stop using hub (#11539)

### Other Changes

- feat: Hoist `getCurrentHub` shim to core as `getCurrentHubShim` (#11537)
- feat(core): Add default behaviour for `rewriteFramesIntegration` in browser (#11535)
- feat(core): Ensure replay envelopes are sent in order when offline (#11413)
- feat(core): Extract errors from props in unkown inputs (#11526)
- feat(core): Update metric normalization (#11518)
- feat(feedback): Customize feedback placeholder text color (#11417)
- feat(feedback): Maintain v7 compat in the @sentry-internal/feedback package (#11461)
- feat(next): Handle existing root spans for isolation scope (#11479)
- feat(node): Ensure tracing without performance (TWP) works (#11564)
- feat(opentelemetry): Export `getRequestSpanData` (#11508)
- feat(opentelemetry): Remove otel.attributes in context (#11604)
- feat(ratelimit): Add metrics rate limit (#11538)
- feat(remix): Skip span creation for `OPTIONS` and `HEAD` requests. (#11149)
- feat(replay): Merge packages together & ensure bundles are built (#11552)
- feat(tracing): Adds span envelope and datacategory (#11534)
- fix(browser): Ensure pageload trace remains active after pageload span finished (#11600)
- fix(browser): Ensure tracing without performance (TWP) works (#11561)
- fix(nextjs): Fix `tunnelRoute` matching logic for hybrid cloud (#11576)
- fix(nextjs): Remove Http integration from Next.js (#11304)
- fix(node): Ensure isolation scope is correctly cloned for non-recording spans (#11503)
- fix(node): Make fastify types more broad (#11544)
- fix(node): Send ANR events without scope if event loop blocked indefinitely (#11578)
- fix(tracing): Fixes latest route name and source not updating correctly (#11533)
- ref(browser): Move browserTracing into browser pkg (#11484)
- ref(feedback): Configure font size (#11437)
- ref(feedback): Refactor Feedback types into @sentry/types and reduce the exported surface area (#11355)
sentry-bot
published 8.18.0 •

Changelog

Source

8.18.0

Important Changes

  • ref: Deprecate enableTracing (12897)

The enableTracing option has been deprecated and will be removed in the next major version. We recommend removing it in favor of the tracesSampleRate and tracesSampler options. If you want to enable performance monitoring, please set the tracesSampleRate to a sample rate of your choice, or provide a sampling function as tracesSampler option instead. If you want to disable performance monitoring, remove the tracesSampler and tracesSampleRate options.

Other Changes

  • feat(node): Expose exclude and include options for ESM loader (#12910)
  • feat(browser): Add user agent to INP standalone span attributes (#12896)
  • feat(nextjs): Add experimental_captureRequestError for onRequestError hook (#12885)
  • feat(replay): Bump rrweb to 2.25.0 (#12478)
  • feat(tracing): Add long animation frame tracing (#12646)
  • fix: Cleanup hooks when they are not used anymore (#12852)
  • fix(angular): Guard ErrorEvent check in ErrorHandler to avoid throwing in Node environments (#12892)
  • fix(inp): Ensure INP spans have correct transaction (#12871)
  • fix(nestjs): Do not make SentryTraced() decorated functions async (#12879)
  • fix(nextjs): Support automatic instrumentation for app directory with custom page extensions (#12858)
  • fix(node): Ensure correct URL is passed to ignoreIncomingRequests callback (#12929)
  • fix(otel): Do not add otel.kind: INTERNAL attribute (#12841)
  • fix(solidstart): Set proper sentry origin for solid router integration when used in solidstart sdk (#12919)
  • fix(sveltekit): Add Vite peer dep for proper type resolution (#12926)
  • fix(tracing): Ensure you can pass null as parentSpan in startSpan* (#12928)
  • ref(core): Small bundle size improvement (#12830)

Work in this release was contributed by @GitSquared, @ziyadkhalil and @mcous. Thank you for your contributions!

sentry-bot
published 8.17.0 •

Changelog

Source

8.17.0

  • feat: Upgrade OTEL deps (#12809)
  • fix(nuxt): Add module to build:transpile script (#12843)
  • fix(browser): Allow SDK initialization in NW.js apps (#12846)
sentry-bot
published 8.16.0 •

Changelog

Source

8.16.0

Important Changes

  • feat(nextjs): Use spans generated by Next.js for App Router (#12729)

Previously, the @sentry/nextjs SDK automatically recorded spans in the form of transactions for each of your top-level server components (pages, layouts, ...). This approach had a few drawbacks, the main ones being that traces didn't have a root span, and more importantly, if you had data stream to the client, its duration was not captured because the server component spans had finished before the data could finish streaming.

With this release, we will capture the duration of App Router requests in their entirety as a single transaction with server component spans being descendants of that transaction. This means you will get more data that is also more accurate. Note that this does not apply to the Edge runtime. For the Edge runtime, the SDK will emit transactions as it has before.

Generally speaking, this change means that you will see less transactions and more spans in Sentry. You will no longer receive server component transactions like Page Server Component (/path/to/route) (unless using the Edge runtime), and you will instead receive transactions for your App Router SSR requests that look like GET /path/to/route.

If you are on Sentry SaaS, this may have an effect on your quota consumption: Less transactions, more spans.

  • - feat(nestjs): Add nest cron monitoring support (#12781)

The @sentry/nestjs SDK now includes a @SentryCron decorator that can be used to augment the native NestJS @Cron decorator to send check-ins to Sentry before and after each cron job run:

import { Cron } from '@nestjs/schedule';
import { SentryCron, MonitorConfig } from '@sentry/nestjs';
import type { MonitorConfig } from '@sentry/types';

const monitorConfig: MonitorConfig = {
  schedule: {
    type: 'crontab',
    value: '* * * * *',
  },
  checkinMargin: 2, // In minutes. Optional.
  maxRuntime: 10, // In minutes. Optional.
  timezone: 'America/Los_Angeles', // Optional.
};

export class MyCronService {
  @Cron('* * * * *')
  @SentryCron('my-monitor-slug', monitorConfig)
  handleCron() {
    // Your cron job logic here
  }
}

Other Changes

  • feat(node): Allow to pass instrumentation config to httpIntegration (#12761)
  • feat(nuxt): Add server error hook (#12796)
  • feat(nuxt): Inject sentry config with Nuxt addPluginTemplate (#12760)
  • fix: Apply stack frame metadata before event processors (#12799)
  • fix(feedback): Add missing h import in ScreenshotEditor (#12784)
  • fix(node): Ensure autoSessionTracking is enabled by default (#12790)
  • ref(feedback): Let CropCorner inherit the existing h prop (#12814)
  • ref(otel): Ensure we never swallow args for ContextManager (#12798)
sentry-bot
published 8.15.0 •

Changelog

Source

8.15.0

  • feat(core): allow unregistering callback through on (#11710)
  • feat(nestjs): Add function-level span decorator to nestjs (#12721)
  • feat(otel): Export & use spanTimeInputToSeconds for otel span exporter (#12699)
  • fix(core): Pass origin as referrer for lazyLoadIntegration (#12766)
  • fix(deno): Publish from build directory (#12773)
  • fix(hapi): Specify error channel to filter boom errors (#12725)
  • fix(react): Revert back to jsxRuntime: 'classic' to prevent breaking react 17 (#12775)
  • fix(tracing): Report dropped spans for transactions (#12751)
  • ref(scope): Delete unused public getStack() (#12737)

Work in this release was contributed by @arturovt and @jaulz. Thank you for your contributions!

sentry-bot
published 8.14.0 •

Changelog

Source

8.14.0

Important Changes

  • feat(nestjs): Filter 4xx errors (#12695)

The @sentry/nestjs SDK no longer captures 4xx errors automatically.

Other Changes

  • chore(react): Remove private namespace JSX (#12691)
  • feat(deps): bump @opentelemetry/propagator-aws-xray from 1.25.0 to 1.25.1 (#12719)
  • feat(deps): bump @prisma/instrumentation from 5.16.0 to 5.16.1 (#12718)
  • feat(node): Add registerEsmLoaderHooks option (#12684)
  • feat(opentelemetry): Expose sampling helper (#12674)
  • fix(browser): Make sure measure spans have valid start timestamps (#12648)
  • fix(hapi): Widen type definitions (#12710)
  • fix(nextjs): Attempt to ignore critical dependency warnings (#12694)
  • fix(react): Fix React jsx runtime import for esm (#12740)
  • fix(replay): Start replay in afterAllSetup instead of next tick (#12709)

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

sentry-bot
published 8.13.0 •

Changelog

Source

8.13.0

Important Changes

  • feat(nestjs): Add Nest SDK This release adds a dedicated SDK for NestJS (@sentry/nestjs) in alpha state. The SDK is a drop-in replacement for the Sentry Node SDK (@sentry/node) supporting the same set of features. See the docs for how to use the SDK.

Other Changes

  • deps: Bump bundler plugins to 2.20.1 (#12641)
  • deps(nextjs): Remove react peer dep and allow rc (#12670)
  • feat: Update OTEL deps (#12635)
  • feat(deps): bump @prisma/instrumentation from 5.15.0 to 5.15.1 (#12627)
  • feat(node): Add context info for missing instrumentation (#12639)
  • fix(feedback): Improve feedback error message (#12647)
sentry-bot
published 8.12.0 •

Changelog

Source

8.12.0

Important Changes

  • feat(solid): Remove need to pass router hooks to solid integration (breaking)

This release introduces breaking changes to the @sentry/solid package (which is currently out in alpha).

We've made it easier to get started with the solid router integration by removing the need to pass use* hooks explicitly to solidRouterBrowserTracingIntegration. Import solidRouterBrowserTracingIntegration from @sentry/solid/solidrouter and add it to Sentry.init

import * as Sentry from '@sentry/solid';
import { solidRouterBrowserTracingIntegration, withSentryRouterRouting } from '@sentry/solid/solidrouter';
import { Router } from '@solidjs/router';

Sentry.init({
  dsn: '__PUBLIC_DSN__',
  integrations: [solidRouterBrowserTracingIntegration()],
  tracesSampleRate: 1.0, //  Capture 100% of the transactions
});

const SentryRouter = withSentryRouterRouting(Router);
  • feat(core): Return client from init method (#12585)

Sentry.init() now returns a client directly, so you don't need to explicitly call getClient() anymore:

const client = Sentry.init();
  • feat(nextjs): Add deleteSourcemapsAfterUpload option (#12457)

This adds an easy way to delete sourcemaps immediately after uploading them:

module.exports = withSentryConfig(nextConfig, {
  sourcemaps: {
    deleteSourcemapsAfterUpload: true,
  },
});
  • feat(node): Allow to configure maxSpanWaitDuration (#12610)

Adds configuration option for the max. duration in seconds that the SDK will wait for parent spans to be finished before discarding a span. The SDK will automatically clean up spans that have no finished parent after this duration. This is necessary to prevent memory leaks in case of parent spans that are never finished or otherwise dropped/missing. However, if you have very long-running spans in your application, a shorter duration might cause spans to be discarded too early. In this case, you can increase this duration to a value that fits your expected data.

Other Changes

  • feat(feedback): Extra check for iPad in screenshot support (#12593)
  • fix(bundle): Ensure CDN bundles do not overwrite window.Sentry (#12580)
  • fix(feedback): Inject preact from feedbackModal into feedbackScreenshot integration (#12535)
  • fix(node): Re-throw errors from koa middleware (#12609)
  • fix(remix): Mark isRemixV2 as optional in exposed types. (#12614)
  • ref(node): Add error message to NodeFetch log (#12612)

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

sentry-bot
published 8.12.0-beta.0 •

23
46
Next
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc