Blog |

Upload Source Maps to Rollbar

Upload Source Maps to Rollbar
Table of Contents

From https://michalzalecki.com/upload-source-maps-to-rollbar/

Upload source maps to Rollbar

In production, the most important advantage of using a build tool like webpack is a smaller size and thus improved overall application performance. Although beneficial for our users, the bundled and minified code is harder to debug for developers as the code they have written doesn't map 1:1 to error stack traces. Multiple tools for minifying, bundling and transpiring JavaScript modules can generate source maps along with the resulting code. Source maps allow developer tools (Chrome DevTools, test runners, error reporting software) to find a reverse mapping from the optimized code back to the source code.

Rollbar (and often other error tracking software) supports source maps to display error stack traces that point to the erroneous lines in the source code instead of an optimized client-size bundle your users download.

The easiest, although not recommended, way to provide Rollbar with source maps is to make them available for download from your production server. Once Rollbar receives the error, it will schedule the download of the source map file.

A reliable and recommended way to make source maps available for Rollbar is to upload them pre-deploy. It's also the only way if you don't wish to share the source code of your app by exposing it via publicly-available source maps. In this article, we will create a required configuration and write a script for uploading source maps to Rollbar.

Read Full Article at: https://michalzalecki.com/upload-source-maps-to-rollbar/

"Rollbar allows us to go from alerting to impact analysis and resolution in a matter of minutes. Without it we would be flying blind."

Error Monitoring

Start continuously improving your code today.

Get Started Shape