Uploading Source Maps
De-obfuscate minified JavaScript stack traces with source maps.
Why Source Maps?
Production JavaScript is typically minified:
Error at e.handleClick (main.abc123.js:1:2345)
With source maps, you see the original code:
Error at Button.handleClick (src/components/Button.tsx:45:12)
Upload Methods
CLI Upload
npm install -g @statly/observe
statly-observe sourcemaps upload \
--dsn="https://[email protected]/your-org" \
--release="1.2.3" \
./dist
API Upload
curl -X POST "https://statly.live/api/v1/observe/sourcemaps" \
-H "Authorization: Bearer sk_live_xxx" \
-F "release=1.2.3" \
-F "file=@./dist/main.js.map"
Requirements
- Source maps must be uploaded before errors occur
- The
releasevalue must match between SDK and upload - File names in source maps must match the URLs in stack traces
Security
Source maps are stored securely and never exposed to end users. They're only used server-side for stack trace processing.