@sentry-internal/browser-utils
Advanced tools
Changelog
8.21.0
withSentry
method (#13025)This release contains the alpha version of @sentry/cloudflare
, our SDK for the
Cloudflare Workers JavaScript Runtime! For details on how to use it,
please see the README. Any feedback/bug reports are greatly appreciated, please
reach out on GitHub.
Please note that only Cloudflare Workers are tested and supported - official Cloudflare Pages support will come in an upcoming release.
beforeSendTransaction
(#13022)@opentelemetry/instrumentation-aws-sdk
from 0.43.0 to 0.43.1 (#13089)@opentelemetry/instrumentation-express
from 0.41.0 to 0.41.1 (#13090)import-in-the-middle
to 1.11.0 (#13107)sourcemaps.deleteFilesAfterUpload
(#13102)Changelog
8.20.0
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.
Sentry will not emit "fetch" spans if tracing is disabled. This is relevant for user who use their own sampler.
Changelog
8.19.0
afterSendEvent
listener once root injector is destroyed (#12786)tracesSampler
(#12945)setupExpressErrorHandler
(#12952)Work in this release was contributed by @jaspreet57 and @arturovt. Thank you for your contribution!
Changelog
8.18.0
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.
exclude
and include
options for ESM loader (#12910)experimental_captureRequestError
for onRequestError
hook (#12885)rrweb
to 2.25.0 (#12478)ErrorEvent
check in ErrorHandler to avoid throwing in Node environments (#12892)ignoreIncomingRequests
callback (#12929)otel.kind: INTERNAL
attribute (#12841)null
as parentSpan
in startSpan*
(#12928)Work in this release was contributed by @GitSquared, @ziyadkhalil and @mcous. Thank you for your contributions!
Changelog
8.17.0
Changelog
8.16.0
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.
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
}
}
httpIntegration
(#12761)addPluginTemplate
(#12760)h
import in ScreenshotEditor
(#12784)autoSessionTracking
is enabled by default (#12790)Changelog
8.15.0
on
(#11710)spanTimeInputToSeconds
for otel span exporter (#12699)lazyLoadIntegration
(#12766)jsxRuntime: 'classic'
to prevent breaking react 17 (#12775)getStack()
(#12737)Work in this release was contributed by @arturovt and @jaulz. Thank you for your contributions!
Changelog
8.14.0
The @sentry/nestjs
SDK no longer captures 4xx errors automatically.
JSX
(#12691)registerEsmLoaderHooks
option (#12684)afterAllSetup
instead of next tick (#12709)Work in this release was contributed by @quisido. Thank you for your contribution!
Changelog
8.13.0
@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.2.20.1
(#12641)Changelog
8.12.0
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);
Sentry.init()
now returns a client directly, so you don't need to explicitly call getClient()
anymore:
const client = Sentry.init();
deleteSourcemapsAfterUpload
option (#12457)This adds an easy way to delete sourcemaps immediately after uploading them:
module.exports = withSentryConfig(nextConfig, {
sourcemaps: {
deleteSourcemapsAfterUpload: true,
},
});
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.
window.Sentry
(#12580)isRemixV2
as optional in exposed types. (#12614)Work in this release was contributed by @n4bb12. Thank you for your contribution!