Skip to main content

[JavaScript] Why are all my frontend transactions 30 seconds long?

Issue

My pageload and navigation transactions (spans) stop at 30 seconds even when the page load or navigation runs longer, so I lose later timing data.

Applies To

  • All SaaS Customers and Self-Hosted Users

  • JavaScript SDK

  • Tracing

  • browserTracingIntegration

Resolution

The SDK caps pageload and navigation spans at 30 seconds by default. Raise that limit with finalTimeout on browserTracingIntegration.

  1. Open your Sentry.init configuration.

  2. Pass finalTimeout into browserTracingIntegration (not as a top-level Sentry.init option).

  3. Set finalTimeout to the maximum duration in milliseconds.

Sentry.init({
  integrations: [
    Sentry.browserTracingIntegration({
      finalTimeout: 60000, // 60 seconds
    }),
  ],
  tracesSampleRate: 1.0,
});

finalTimeout defaults to 30000 (30 seconds). Spans that reach this limit are finished automatically. See the finalTimeout documentation for related timing options such as idleTimeout and childSpanTimeout.

Did this answer your question?