Source Map Production Error Triage Runbook Builder

Create a frontend production error triage runbook for source maps, minified stack traces, release artifacts, monitoring tools, and privacy-safe debugging.

Prompt Template

You are a senior frontend platform engineer creating a production error triage runbook for source maps and minified stack traces.

Application stack: [React, Next.js, Vue, Angular, Svelte, mobile web, microfrontend, etc.]
Build system and bundler: [Webpack, Vite, Turbopack, Rollup, esbuild, custom]
Hosting and CDN: [Vercel, Netlify, Cloudflare, AWS, Akamai, self-hosted]
Monitoring tool: [Sentry, Datadog, New Relic, Bugsnag, Rollbar, browser logs]
Release strategy: [git SHA, semantic version, build ID, deploy environment]
Source map storage: [uploaded to monitoring tool, private bucket, public files, disabled, unknown]
Error samples: [paste stack traces, event IDs, affected routes, browser versions]
Recent changes: [deploy, dependency upgrade, feature flag, CDN change]
Privacy and security rules: [do not expose source maps publicly, redact PII, restricted logs]
Team workflow: [on-call, frontend platform, product team, release manager]
CI/CD access: [build logs, artifact upload step, release creation, deploy logs]
Constraints: [no rollback, missing artifacts, multiple deploys, sourcemaps unavailable]

Create:
1. Triage decision tree for unreadable production stack traces.
2. Checklist to verify release ID, build ID, artifact upload, path prefixes, and CDN asset versions.
3. Common source map failure modes with symptoms, checks, and fixes.
4. Monitoring-tool setup checklist for release tracking and source map upload.
5. Privacy-safe policy for storing, uploading, and deleting source maps.
6. Steps for mapping a minified frame back to source when automated symbolication fails.
7. CI/CD guardrails to fail builds when source maps are missing or mismatched.
8. Rollback, hotfix, and owner-escalation rules.
9. Post-incident prevention tasks and regression tests.
10. Copy-paste issue template for engineering handoff.

Prioritize accurate diagnosis before code changes, and avoid exposing private source maps to public users.

Example Output

Triage Flow

1. Confirm the error event release matches the deployed build ID.

2. Check whether source maps were uploaded for the same commit SHA and asset filename hash.

3. Compare the minified file URL in the stack trace with the artifact path prefix in the monitoring tool.

4. If the release is missing artifacts, rerun the upload job from the exact build output.

5. If artifacts exist but frames are unmapped, inspect path rewriting and hidden-source-map settings.

Failure Mode Table

| Symptom | Likely Cause | Check | Fix |

|---|---|---|---|

| All frames show app.min.js | Source maps not uploaded | Release artifacts tab is empty | Upload maps during CI |

| Only vendor frames map | App map path prefix mismatch | Compare CDN path to artifact path | Set urlPrefix correctly |

| Old line numbers | CDN served previous assets | Compare asset hash | Purge CDN or rollback |

CI Guardrail

Fail the deploy if the build creates JavaScript bundles without matching .map files or if the monitoring upload step returns zero artifacts.

Tips for Best Results

  • 💡Always tie source maps to an immutable release ID; timestamps alone make triage unreliable.
  • 💡Keep source maps private unless the team has explicitly accepted the code exposure risk.
  • 💡Check CDN asset hashes before debugging application logic; stale bundles can mimic new bugs.
  • 💡Add a CI smoke check that verifies at least one known source file maps correctly after upload.