Skip to main content
Juliano Alves
Back to blog

Sentry, source maps, and release health in Next.js

1 min read
By Juliano Alves

Without source maps, stack traces point to minified bundles—useless for triage. Sentry (and peers) ingest maps tied to releases so errors map back to TypeScript lines.

Releases and artifacts#

Tag each deploy with SENTRY_RELEASE=$GIT_SHA. Upload maps in CI after build using sentry-cli or the Webpack/Vite plugin. Ensure the same release string is set in the runtime SDK init.

Debug IDs (modern flow)#

Newer tooling embeds debug IDs in bundles and maps so uploads can be matched without fragile filename heuristics—prefer the current Sentry Next.js wizard defaults.

PII scrubbing#

Configure beforeSend to strip emails, tokens in URLs, and localStorage snapshots. Never send full request bodies by default in production.

Performance monitoring#

Enable transactions with sane sampling (5–20% baseline, higher for key flows). Watch overhead—cheap spans beat perfect coverage.

Summary#

Source maps + releases turn “minified line 1” into actionable frames. Automate uploads in CI and treat scrubbing as non-optional for GDPR-minded teams.

© 2026 Juliano Alves. All rights reserved.