• English日本語한국어
  • Log inStart now

Upload source maps via API

Our supports the uploading of source maps, which are used to un-minify error stack traces on the Errors page. This document explains how to use the API to upload source maps using the browser API.

Prepare for using the source map API

In order to upload source maps to browser via the API, you'll need:

Push source maps to New Relic

Now that you have one or more source maps, you are ready to publish it to browser. You can use any of these methods to send source maps to browser:

Use npm module via command line or client-side script

The easiest and recommended way to upload source maps to browser is to use the our new @newrelic/publish-sourcemap npm module. It provides a command line tool and Javascript API to accomplish this task. More documentation is available in the npm repo.

Here are some examples of using the npm module via the command line.

Important

The following examples are for US accounts. For EU accounts, the endpoint is https://sourcemaps.service.eu.newrelic.com. For more information, see Introduction to the EU region data center.

Here are some examples of using the npm module to publish from client-side JavaScript:

When you're done, go to the JS errors page in browser, select an error grouping, and see if your error stack traces have been un-minified.

Use API via curl

Below are some examples of using curl to publish, list, and delete source maps:

When you're done, go to the JS errors page in browser, select an error grouping, and see if your error stack traces have been un-minified.

Troubleshoot source maps

If you are having trouble generating source maps from your build system, or if your errors in browser are remaining minified, see the source maps troubleshooting documentation.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.