Upload source maps
Readable JavaScript stack traces with sentry-cli, bundler plugins or the TypeScript CLI. Only environment variables change.
Readable JavaScript stack traces need your source maps. Supermetry accepts them from the standard Sentry upload tools; only environment variables change.
-
In the app project, open Settings, Installation, Upload source maps and create an upload token. It can only upload source maps and manage releases for that project, and it already contains your server address and organization, so it is the only secret you set. Copy it once; it is not shown again.
-
Inject debug IDs and upload with
sentry-cli(npm package@sentry/cli).Terminal window export SENTRY_AUTH_TOKEN=<upload token>export SENTRY_PROJECT=<project id>sentry-cli sourcemaps inject ./distsentry-cli sourcemaps upload --release <release> ./dist -
Or use a bundler plugin. With
@sentry/vite-plugin, seturl(your server address) andauthTokenin the plugin options; it injects debug IDs and uploads during the build. Other Sentry bundler plugins take the same options. -
Or use the TypeScript CLI (npm package
sentry), which reads the same variables:sentry sourcemap inject ./distandsentry sourcemap upload --release <release> ./dist.
Set the same release in your SDK’s init that you upload. Debug IDs match a frame to its map exactly; without them Supermetry falls back to the release and the file URL.
SENTRY_URL is only needed when you use a plain API key with the releases:write scope instead of an upload token. Set it to your server address without a path.
Tested versions
Section titled “Tested versions”Each tool is run against a fresh server with a Vite build in headless Chromium, and the upload is checked.
| Tool | Version |
|---|---|
@sentry/cli (Rust sentry-cli) |
3.8.2 |
@sentry/vite-plugin |
4.6.1 |
sentry (TypeScript CLI) |
0.49.0 |
Limits
Section titled “Limits”Native debug symbols and minidumps are not processed. See Migrate from Sentry.