Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 1.59 KB

sourcemap-api.asciidoc

File metadata and controls

45 lines (34 loc) · 1.59 KB

Sourcemap Upload API

The APM Server exposes an API endpoint to upload source maps for real user monitoring (RUM).

Upload endpoint

Send a HTTP POST request with the Content-Type header set to multipart/form-data to the source map endpoint:

http(s)://{hostname}:{port}/v1/rum/sourcemaps

Request Fields

The request must include some fields needed to identify source map correctly later on:

  • service_name

  • service_version

  • bundle_filepath: needs to be the absolute path of the final bundle as it is used in the web application

The source map must follow the Source map revision 3 proposal spec and be attached as a file upload.

You can configure a secret token to upload sourcemaps.

Example

Example source map request including an optional secret token "mysecret":

curl -X POST http://127.0.0.1:8200/v1/rum/sourcemaps \
  -H "Authorization: Bearer mysecret" \
  -F service_name="test-service" \
  -F service_version="1.0" \
  -F bundle_filepath="http://localhost/static/js/bundle.js" \
  -F [email protected]