Last updated 26 November 2026. By Paul Badarau.
A fictional tea shop deploys once in the morning and again after lunch. Both builds are named tea-shop@main, and both serve their code as /js/shop.js. The shop uploads maps by release and file name, so the second upload replaces the first. A visitor who kept the shop open in a tab since the morning still runs the first bundle, and when it throws, Monitoring reads that error with the second build's map. The frame shows No original position in the source map, or a line that has nothing to do with the bug. With debug IDs, each bundle carries its own ID, and the morning error finds the morning map.
A debug ID travels like this:
- At build time,
sentry-cli sourcemaps injector the debug ID option of the Sentry bundler plugin gives each bundle an ID. It writes the ID into the map and adds a small snippet to the bundle that registers the ID when the page runs. - When an error happens, the SDK sends the registered IDs with the event. Monitoring stores the ID on each frame that came from an injected file.
- When you upload, Monitoring reads the ID from the map, from a
{ debugId, release, filename, sourceMap }wrapper, or from a zip'smanifest.json, and stores the map under it. - When you open an occurrence, each frame fetches its map by that ID.
Choose by how you build and deploy:
- Use debug IDs when you deploy often, when visitors keep pages open across deploys, or when you do not set a release in
Sentry.init. - Use release and file name when your build cannot run an inject step. Set
releaseinSentry.initto a value that changes with every build, such as the commit hash, and upload each map with thex-postdeploy-releaseandx-postdeploy-fileheaders. - Sending both works too. Monitoring stores the map under both keys and tries the debug ID first, but the map then counts twice toward the 200 maps a Project can hold.
A map stored by debug ID is permanent. It cannot be replaced or deleted. Uploading different contents for the same ID is refused with status 409, and the map counts toward the Project's 200 until the Workspace's data is deleted. Maps stored by release and file name can be replaced, which is what keeps the count down, and also what let the tea shop's morning map disappear.
The product page for this is Monitoring.