• /
  • ログイン
  • 無料アカウント

Upload source maps via API

Browser monitoring supports the uploading of source maps, which are used to un-minify error stack traces on the JS errors page. This document explains how to use the API to publish (upload) source maps to browser.

Prepare for using the source map API

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

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.

重要

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 © 2020 New Relic Inc.