We have followed the instructions in the documentation so we can upload source maps to Sentry without them being available on the web as outlined here: uploading source maps to sentry
As far as I can tell we have configured this correctly yet Sentry is not using the source map.
I can see the source map name in the public main.js file on our server.
//# sourceMappingURL=main.js.map
We are initializing Raven with the release id:
…I can only upload 1 image as a new user… see link above please.
NOTE
main.js.map is NOT hosted on our static server, and the location of main.js is hashed, and would live at something like static/da94f5ffc8cff78aca266ed057cc823a53d460a3/js/main.js. It may be possible that Sentry sees the sourceMappingUrl directive and ignores the uploaded artifacts, but I would like someone to confirm this before I go about changing our build process.
Just to confirm, will this work even if main.js.map is not actually at that location? As noted the map file is not publicly available on the web, and we will not be putting it out there.
Ok so I resolved the issue with some help from Sentry support. There was a bit of a terminology confusion, when referring to “naming your sourcemap”. This is referring to the name of the sourcemap as a Sentry artifact, not how it is named in in the sourceMappingURL directive. So the solution should look like this:
Directive in file: //# sourceMappingURL=main.js.map
Artifact name in sentry: ~/static/da94f5ffc8cff78aca266ed057cc823a53d460a3/js/main.js.map
The artifact name was what took some time to understand. We use the sentry-cli tool, which also needs a bit of explaination. You can use upload-sourcemaps like this to get it named right in the release artifacts:
We should probably make the docs clearer on this. I was also wondering if it makes sense to have sentry-cli have an auto discover mode where you point it to the URL of a minified file and it explains you the command to run to upload the sourcemaps correctly.