Official Sentry SDK for Vercel Edge Runtime [ALPHA]

Links
Note: This SDK is still in an alpha state. Breaking changes can occur at any time.
Usage
To use this SDK, call init(options)
as early as possible in the main entry module. This will initialize the SDK and
hook into the environment. Note that you can turn off almost all side effects using the respective options.
const Sentry = require('@sentry/vercel-edge');
import * as Sentry from '@sentry/vercel-edge';
Sentry.init({
dsn: '__DSN__',
});
To set context information or send manual events, use the exported functions of @sentry/vercel-edge
. Note that these
functions will not perform any action before you have called init()
:
Sentry.setExtra('battery', 0.7);
Sentry.setTag('user_mode', 'admin');
Sentry.setUser({ id: '4711' });
Sentry.addBreadcrumb({
message: 'My Breadcrumb',
});
Sentry.captureMessage('Hello, world!');
Sentry.captureException(new Error('Good bye'));
Sentry.captureEvent({
message: 'Manual',
stacktrace: [
],
});
8.0.0-beta.2
Important Changes
- feat(browser): Update
propagationContext
on spanEnd
to keep trace consistent
To ensure consistency throughout a route's duration, we update the scope's propagation context when the initial page
load or navigation span ends. This keeps span-specific attributes like the sampled decision and dynamic sampling context
on the scope, even after the transaction has ended.
- fix(browser): Don't assume window.document is available (#11602)
We won't assume window.dodument
is available in the browser SDKs anymore. This should prevent errors in environments
where window.document
is not available (such as web workers).
Other changes
- feat(core): Add
server.address
to browser http.client
spans (#11634) - feat(opentelemetry): Update OTEL packages & relax some version ranges (#11580)
- feat(deps): bump @opentelemetry/instrumentation-hapi from 0.34.0 to 0.36.0 (#11496)
- feat(deps): bump @opentelemetry/instrumentation-koa from 0.37.0 to 0.39.0 (#11495)
- feat(deps): bump @opentelemetry/instrumentation-pg from 0.38.0 to 0.40.0 (#11494)
- feat(nextjs): Skip OTEL root spans emitted by Next.js (#11623)
- feat(node): Collect Local Variables via a worker (#11586)
- fix(nextjs): Escape Next.js' OpenTelemetry instrumentation (#11625)
- fix(feedback): Fix timeout on feedback submission (#11619)
- fix(node): Allow use of
NodeClient
without calling init
(#11585) - fix(node): Ensure DSC is correctly set in envelope headers (#11628)