This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
Publish source maps to Sentry on release #754
Labels
🤖 aspect: dx
Concerns developers' experience with the codebase
✨ goal: improvement
Improvement to an existing user-facing feature
🟨 priority: medium
Not blocking but should be addressed soon
🚦 status: awaiting triage
Has not been triaged & therefore, not ready for work
Problem
Currently our stack traces in Sentry are awful because Sentry does not have access to our source maps.
There are two recommended ways of getting source maps to Sentry:
Sentry "strongly recommends" the second, for whatever reason. The first seems preferrable/fine for our application as there's absolutely zero reason for us to obfuscate any of the client code.
I would prefer we just publish the sourcemaps alongside the code in production for a couple reasons:
Additionally, there is no hit to performance for users of the site because source maps that are split from the bundles aren't loaded unless dev tools are opened. Casual navigation of the site would not take any hit.
Sentry so strongly recommends that you upload source maps directly that they have a Sentry webpack plugin for configuring this, but again, it wouldn't benefit security/privacy researchers looking at our site's code and would also require managing another secret, which would be nice to avoid.
Instead I believe we can just publish production source maps like we would normally and Sentry will still pick them up:
https://docs.sentry.io/platforms/javascript/sourcemaps/generating/#advanced-usage
Description
Publishing the source maps would fix the issue of unhelpful stack traces in Sentry issues.
Implementation
The text was updated successfully, but these errors were encountered: