Source Maps
Upload source maps to de-minify JavaScript stack traces
Source maps allow Cased to show original source code locations instead of minified JavaScript in error stack traces.
Quick Start
Section titled “Quick Start”1. Upload Source Maps
Section titled “1. Upload Source Maps”Use the Cased CLI to upload source maps during your build/deploy process:
# Install the CLIuv tool install cased-cli
# Set your API keyexport CASED_API_KEY=your-api-key
# Upload source maps for a releasecased sourcemaps upload -p my-project -r v1.2.3 dist/*.map2. Tag Releases in Your SDK
Section titled “2. Tag Releases in Your SDK”Ensure your Sentry SDK is configured with a release tag that matches:
import sentry_sdk
sentry_sdk.init( dsn="https://abc123@telemetry.cased.com/1", release="v1.2.3", # Must match the --release used in upload)Sentry.init({ dsn: "https://abc123@telemetry.cased.com/1", release: "v1.2.3",});3. View De-minified Stack Traces
Section titled “3. View De-minified Stack Traces”When errors occur, stack traces will automatically show original source locations:
src/components/Checkout.tsx:142 → (minified: main.abc123.js:1)src/utils/api.ts:89 → (minified: main.abc123.js:1)CLI Commands
Section titled “CLI Commands”Upload
Section titled “Upload”cased sourcemaps upload -p <project> -r <release> <files...>Options:
--project, -p- Telemetry project ID or slug (required)--release, -r- Release version, should match SDK config (required)--url-prefix- URL prefix to strip when matching files (optional)
cased sourcemaps list -p <project> [-r <release>]Delete
Section titled “Delete”cased sourcemaps delete -p <project> -r <release>API Endpoints
Section titled “API Endpoints”Upload Source Maps
Section titled “Upload Source Maps”POST /api/v1/telemetry/projects/{project_id}/sourcemaps/Authorization: Bearer {api_key}Content-Type: multipart/form-data
Fields: release: string (required) url_prefix: string (optional) files: file[] (required, .map files)List Source Maps
Section titled “List Source Maps”GET /api/v1/telemetry/projects/{project_id}/sourcemaps/GET /api/v1/telemetry/projects/{project_id}/sourcemaps/?release=v1.0.0Authorization: Bearer {api_key}Delete Source Maps
Section titled “Delete Source Maps”DELETE /api/v1/telemetry/projects/{project_id}/sourcemaps/{release}/Authorization: Bearer {api_key}CI/CD Integration
Section titled “CI/CD Integration”GitHub Actions
Section titled “GitHub Actions”- name: Install Cased CLI run: uv pip install cased-cli
- name: Upload Source Maps env: CASED_API_KEY: ${{ secrets.CASED_API_KEY }} run: cased sourcemaps upload -p my-app -r ${{ github.sha }} dist/*.mapBuild Tool Integration
Section titled “Build Tool Integration”Most bundlers can generate source maps automatically:
Vite:
export default { build: { sourcemap: true, },};Webpack:
module.exports = { devtool: "source-map",};How It Works
Section titled “How It Works”- During build, your bundler generates
.mapfiles alongside minified JS - You upload these maps to Cased, tagged with a release version
- Your SDK sends errors with the same release tag
- When displaying stack traces, Cased maps minified locations back to original source
Source maps are stored securely and only accessible to your organization.