@sentry/tracing
7.120.4 · 29 Jul 2025MIT1.8M / weekRepositoryHomepagenpmAtom feed
7.120.4 is the newest release of 7.x.
In short
7 deprecated8 new1 faster11 fixed2 internal
- deprecated
core: Add
span.updateName()and deprecatespan.setName() - deprecated
core: Deprecate
span.getTraceContext() - deprecated
core: Deprecate
span.toTraceparent()in favor ofspanToTraceHeader()util - deprecated
core: Deprecate
tracein favor ofstartSpan - deprecated
core: Deprecate span
toContext()andupdateWithContext() - deprecated
Deprecate
deepReadDirSync - deprecated
Deprecate
lastEventId()
Release note
Important Changes
Deprecations
- deprecated
core: Add
span.updateName()and deprecatespan.setName() - deprecated
core: Deprecate
span.getTraceContext() - deprecated
core: Deprecate
span.toTraceparent()in favor ofspanToTraceHeader()util - deprecated
core: Deprecate
tracein favor ofstartSpan - deprecated
core: Deprecate span
toContext()andupdateWithContext() - deprecated
Deprecate
deepReadDirSync - deprecated
Deprecate
lastEventId()
Please take a look at the Migration docs for more details. These methods will be removed in the upcoming v8 major release.
Cron Monitoring Support for cron and node-cron libraries
node: Instrumentation for
cronlibrarynode: Instrumentation for
node-cronlibrary
This release adds instrumentation for the cron and node-cron libraries. This allows you to monitor your cron jobs with Sentry cron monitors.
For cron:
import * as Sentry from '@sentry/node';
import { CronJob } from 'cron';
const CronJobWithCheckIn = Sentry.cron.instrumentCron(CronJob, 'my-cron-job');
// use the constructor
const job = new CronJobWithCheckIn('* * * * *', () => {
console.log('You will see this message every minute');
});
// or from
const job = CronJobWithCheckIn.from({
cronTime: '* * * * *',
onTick: () => {
console.log('You will see this message every minute');
},
});For node-cron:
import * as Sentry from '@sentry/node';
import cron from 'node-cron';
const cronWithCheckIn = Sentry.cron.instrumentNodeCron(cron);
cronWithCheckIn.schedule(
'* * * * *',
() => {
console.log('running a task every minute');
},
{ name: 'my-cron-job' },
);Other Changes
astro: Add
enabledoption to Astro integration optionscore: Add
attributestoSpancore: Add
setClient()andgetClient()toScopeintegrations: Capture error cause with
captureErrorCauseinExtraErrorDataintegrationnode-experimental: Allow to pass base span options to trace methods
node: Local variables via async inspector in node 19+
astro: Handle commonjs related issues
astro: Handle non-utf8 encoded streams in middleware
astro: Prevent sentry from externalized
core: Ensure
withScopesets current scope correctly with async callbacksnode: ANR fixes and additions
node: Anr should not block exit
node: Correctly resolve module name
node: Handle inspector already open
node: Make
NODE_VERSIONproperties requirednode: Anr doesn't block exit
utils: Use correct typeof URL validation
astro: Reduce unnecessary path resolutions
Work in this release contributed by @joshkel. Thank you for your contribution!
Bundle size
| Path | Size |
|---|---|
| @sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) | 76.1 KB |
| @sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) | 67.5 KB |
| @sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) | 61.1 KB |
| @sentry/browser (incl. Tracing) - Webpack (gzipped) | 32.08 KB |
| @sentry/browser (incl. Feedback) - Webpack (gzipped) | 30.49 KB |
| @sentry/browser - Webpack (gzipped) | 22.21 KB |
| @sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) | 73.53 KB |
| @sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) | 65.2 KB |
| @sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) | 31.37 KB |
| @sentry/browser - ES6 CDN Bundle (gzipped) | 23.29 KB |
| @sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) | 204.35 KB |
| @sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) | 94.24 KB |
| @sentry/browser - ES6 CDN Bundle (minified & uncompressed) | 69.09 KB |
| @sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) | 34.33 KB |
| @sentry/react (incl. Tracing, Replay) - Webpack (gzipped) | 67.91 KB |
| @sentry/react - Webpack (gzipped) | 22.23 KB |
| @sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) | 84.53 KB |
| @sentry/nextjs Client - Webpack (gzipped) | 49.14 KB |
| @sentry-internal/feedback - Webpack (gzipped) | 16.73 KB |