Skip to content

Pageloads traces aren't being captured by sentry/nextjs #12914

Closed
@purplecandy

Description

@purplecandy

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

8.17.0

Framework Version

Next 13.5.6 (Pages Router)

Link to Sentry event

No response

SDK Setup/Reproduction Example

Sentry.init({
    dsn: SENTRY_DSN,
    integrations: [
      Sentry.browserTracingIntegration({
        instrumentNavigation: true,
        instrumentPageLoad: true,
        enableInp: true,
        enableLongTask: true,
      }),
      Sentry.breadcrumbsIntegration({
        console: false,
      }),
    ],
    tracesSampleRate: 0.15,
    beforeSend: (event, hints) => {
      const location = window?.location?.href
      const area = getAreaFromUrl(location)
      if (!event.tags) return event
      event.tags.area = area

      return event
    },
  })

Steps to Reproduce

  1. Enter the URL of the page in the browser or refresh any page
  2. Once the page is done loading and the idle timeout is over - sentry should capture a page load event with Web Vitals

Expected Result

Sentry should track page load operations with web vitals.

Actual Result

Sentry only tracks navigation operations and leaves out page loads and web vitals reports.

Metadata

Metadata

Assignees

Labels

Package: nextjsIssues related to the Sentry Nextjs SDK

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions