Skip to content

Tree-shake long task/LoAF tracking; fix default doc #26138

Open

Description

@sentry-junior

browserTracingIntegration() always bundles long task and long animation frame tracking. enableLongTask and enableLongAnimationFrame are runtime booleans, so bundlers can't drop the code.

  • The calls to startTrackingLongAnimationFrames() / startTrackingLongTasks() sit behind runtime checks in browserTracingIntegration.ts L436–L445.
  • Measured on a tracing-only setup (BrowserClient + browserTracingIntegration(), esbuild 0.27, minified ESM, __SENTRY_DEBUG__: false): this code is about 1.2 KB raw / 380 B brotli-11.
  • The enableLongAnimationFrame JSDoc says Default: false (L130), but the actual default is true (L284).

via @BYK.

--

View Session in Sentry

Activity

  1. linear-code commented on Nov 5, 2026

    @linear-code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions