sentry-javascript-bundler-plugins icon indicating copy to clipboard operation
sentry-javascript-bundler-plugins copied to clipboard

Sourcemap file paths in Sentry are different with its in console of online website.

Open a1245582339 opened this issue 9 months ago • 15 comments

Environment

rsbuild + @sentry/webpack-plugin + React + Self-host sentry 25.1.0.dev0

Steps to Reproduce

  1. Setup the Sentry init in main.tsx
Sentry.init({
  dsn: import.meta.env.SENTRY_DSN,
  integrations: [
    Sentry.browserTracingIntegration(),
    Sentry.replayCanvasIntegration(),
    Sentry.replayIntegration({
      blockAllMedia: false,
      ...(import.meta.env.VITE_SENTRY_SENSITIVE === 'false' ? { maskAllInputs: false, maskAllText: false } : {}),
    }),
  ],
  release: import.meta.env.APP_VERSION,
  dist: import.meta.env.APP_VERSION,
  // Tracing
  tracesSampleRate: 1.0, //  Capture 100% of the transactions
  // Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
  tracePropagationTargets: [****],
  // 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.
});
  1. Setup the webpack plugin in rsbuild.config.ts
sentryWebpackPlugin({
  org: 'sentry',
  project: import.meta.env.VITE_SENTRY_PROJECT,
  url: '***',
  telemetry: false,
  release: {
    name: import.meta.env.APP_VERSION,
    dist: import.meta.env.APP_VERSION,
  },
  authToken: '***'
}),
  1. Deploy the front-end project to website.

  2. I triggered an error and checked the console in browser. It can show the concrete file of source code. Such as instanceList.tsx.Image

  3. Check the issue on sentry. The error stack trace is different with console. It seems like:

Image I can not find the concrete file and line in this trace.

Is there something I didn't configure correctly?

Expected Result

I hope I can check the stack trace same with browser console.

a1245582339 avatar Jan 23 '25 02:01 a1245582339