getsentry / sentry-webpack-plugin

Repo moved to https://github.com/getsentry/sentry-javascript-bundler-plugins. Please open any issues/PRs there.
MIT License
662 stars 116 forks source link

sourcemap urlprefix setting #426

Closed KobeZhou closed 1 year ago

KobeZhou commented 1 year ago

Environment self-hosted (https://develop.sentry.dev/self-hosted/)

Version 23.1.1

Link No response

DSN No response

Steps to Reproduce Example:config.plugin("sentryCliPlugin").use(sentryCliPlugin, [ { release: "", include: "", ignore: [], configFile: "sentry.properties", urlPrefix: "www.xx.com/1/static/js", }, ]);

my static resource is deployed by CDN, so the urlPrefix is dynamic;For example, this url of static resource is ‘http:// www.xx.com/1/static/js’ this time, and next time, the url of static resource is ‘http:// www.xx.com/2/static/js’ ;

how to handle the urlPrefix。

Expected Result I can use sourcemap correctly in sentry。

Actual Result I do not konw how to do。

lforst commented 1 year ago

If you run into a situation where the url of a resource is dynamic, generally the RewriteFrames integration is your friend :)

KobeZhou commented 1 year ago

If you run into a situation where the url of a resource is dynamic, generally the RewriteFrames integration is your friend :)

thanks guy, following my url, can you write a demo?

lforst commented 1 year ago

I recommend you just play around with it a bit. The name of your uploaded artifacts must match with the filename of the stackframe. In your case you probably need the iteratee option.

lforst commented 1 year ago

Closing because stale