Skip to content

navigate span not show in web vistalΒ #14240

@vaynevayne

Description

@vaynevayne

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/react

SDK Version

Sentry 24.8.0

Framework Version

React17

Link to Sentry event

No response

Reproduction Example/SDK Setup

Sentry.init({
    dsn: 'https://[email protected]/2',
    integrations: [
      Sentry.reactRouterV6BrowserTracingIntegration({
        useEffect: React.useEffect,
        useLocation,
        useNavigationType,
        createRoutesFromChildren,
        matchRoutes,
      }),
      Sentry.replayIntegration({
        maskAllText: false,
        blockAllMedia: false,
        networkResponseHeaders: ['Set-Cookie', 'traceid'],
        networkDetailAllowUrls: ['mifengjiaoyu.com'],
      }),
      Sentry.browserProfilingIntegration(),
    ],

    environment: process.env.REACT_APP_SENTRY,
    // Tracing
    tracesSampleRate: 1.0, //  Capture 100% of the transactions
    // Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
    // tracePropagationTargets: ['localhost', /^https:\/\/yourserver\.io\/api/],
    // Session Replay
    replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
    replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
    profilesSampleRate: 1.0,
  })

Steps to Reproduce

The document says that if the react-router-dom integration is added, navigation span will be generated, but I only see pageload in sentry, which does not take effect. Is it my use? Or was it not there?
I need navigation data in the spa application,

Now, Sentry should generate pageload/navigation transactions with parameterized transaction
https://docs.sentry.io/platforms/javascript/guides/react/features/react-router/#usage-with-useroutes-hook

Image

Expected Result

has navigation span

Actual Result

no navigation span

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPackage: reactIssues related to the Sentry React SDK

    Projects

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions