This problem isn’t new, it’s solved by leveraging sourcemaps, and Instana now supports using these sourcemaps to parse where errors occur in the original source file. This helps developers who may not be able to reproduce the error on a development server or locally and will now easily be able to determine, in production, where the issue occurred.
(fig. 1) Minified JS stack trace
With a translated stack trace and Instana’s End User Monitoring it is now possible to see which user experienced the error, the activity which preceded the error, and where in the original source code the error occurred.
When a source map exists for your production scripts, Instana will automatically translate the stack trace and present the precise location where the error occurred. In the example below, fig. 2, we can see that the error trace shows the error occuring in ProductDetails.js at 26:11 — without the sourcemap the trace would be reported as the minified and concatenated location in the code where the error occurred, which is impossible for developers to understand or troubleshoot as shown in fig. 3.
(fig. 3): stack trace without a source map, it is impossible to know which original source file the error occurred
Understand the Full Context When Issues Occur
With sourcemaps, it’s possible to see which user is impacted by an error, and in turn gives developers the information they need to replicate issues and where to investigate their source code for errors. In the example below, we can see which user is impacted, what actions preceded the error, and the precise location the error occurred. This information is critical when attempting to reproduce errors and debug production issues.