Browser monitoring supports the uploading of source maps.
Browser gives you two options for using source maps:
- Upload source maps via the browser UI
- Publish source maps to browser via the API
This document will explain the first method: how to upload source maps via the UI, along with general troubleshooting help. For instructions on using the API method, see Push source maps via the API.
Import source maps via the New Relic UI
To drag in or upload a source map to browser, the source map must be on your local machine.
To associate a source map with an error stack trace on the JS errors page:
Go to one.newrelic.com > Browser > (select an app) > JS Errors, then select a JS error group. (Don't select an Errors without a stack trace group.)
From the selected JS error group, select the error instance details tab (next to the Summary tab).
An error frame with a gray strip on the left side indicate minified JS; a blue strip indicates it has had a source map applied.
Other JS error frame features include:
If you want to...
See more of the surrounding code
See original, minified file information
Remove a source map
From an expanded stack trace frame, select Remove file.
Stack traces are still minified
If you have uploaded source maps to New Relic and still see minified stack traces, there are a few things to check. Using the API is the best way to investigate potential issues, by listing or deleting published source maps.
Release name/ID mismatch
To resolve this, delete the source map that has NULL release name and ID values and re-upload all versions for that URL including those parameters. This will allow multiple versions of source maps for a particular JS URL.
Your mapping file must contain the
Can't generate source maps
Having trouble even generating source maps? Every build system has its own instructions for generating source maps. For more specific details, please see the documentation for your particular tool. Below are source map generation instructions for two popular build systems: