Source maps is an experimental feature not intended for production usage at the moment.
The APM Server exposes an API Endpoint to upload source maps, helpful if you are using real user monitoring.
To upload a source map you need to send a
HTTP POST request
Content-Type set to
multipart/form-data to the APM Server source maps endpoint:
The request consists of some meta information and the actual source map. The meta information must contain the following fields:
bundle_filepath: needs to be the absolute path of the final bundle as it is used in the web application
The meta information is used to identify a
source map when source mapping is applied.
The actual source map must be attached to the request as a
and it must match the specification for
Source map revision 3 proposal.
Send an example source map to the APM Server:
curl -X POST http://127.0.0.1:8200/v1/client-side/sourcemaps \ -F service_name="test-service" \ -F service_version="1.0" \ -F bundle_filepath="http://localhost/static/js/bundle.js" \ -F email@example.com