Packages

@sentry/tracing

7.120.4 · 29 Jul 2025MIT1.8M / weekRepositoryHomepagenpmAtom feed

Your version

7.62.0

9 Aug 2023Where it was published

7.120.4 is the newest release of 7.x.

In short

1 new3 fixed2 internal

Release note

Important Changes

  • integrations: Add ContextLines integration for html-embedded JS stack frames

This release adds the ContextLines integration as an optional integration for the Browser SDKs to @sentry/integrations.

This integration adds source code from inline JavaScript of the current page's HTML (e.g. JS in <script> tags) to stack traces of captured errors.
It can't collect source code from assets referenced by your HTML (e.g. <script src="..." />).

The ContextLines integration is useful when you have inline JS code in HTML pages that can't be accessed by Sentry's backend, for example, due to a login-protected page.

import { ContextLines } from "@sentry/integrations";

Sentry.init({
  // ...
  integrations: [
    new ContextLines({
      // The number of lines to collect before and after each stack frame's line number
      // Defaults to 7
      frameContextLines: 7,
    }),
  ],
});

Other Changes

  • nextjs: Make all wrappers isomorphic and available in all runtimes

  • replay: Cancel debounce when replay is too short/long

  • utils: dirname and basename should handle Windows paths

Bundle size

PathSize
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped)74.96 KB
@sentry/browser (incl. Tracing) - Webpack (gzipped)31.11 KB
@sentry/browser - Webpack (gzipped)21.81 KB
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped)69.58 KB
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped)28.15 KB
@sentry/browser - ES6 CDN Bundle (gzipped)20.17 KB
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed)219.29 KB
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed)84.67 KB
@sentry/browser - ES6 CDN Bundle (minified & uncompressed)59.83 KB
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped)31.02 KB
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped)65.16 KB
@sentry/react - Webpack (gzipped)21.84 KB
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped)92.78 KB
@sentry/nextjs Client - Webpack (gzipped)50.64 KB