- Legacy APM Server Reference:
- Overview
- Getting Started With APM Server
- Setting up APM Server
- Upgrading APM Server
- Configuring APM Server
- General configuration options
- Configure the output
- Parse data using ingest node pipelines
- SSL/TLS settings
- Load the Elasticsearch index template
- Index lifecycle management (ILM)
- Configure logging
- Configure the Kibana endpoint
- Set up Real User Monitoring (RUM) support
- Jaeger integration
- Use environment variables in the configuration
- Configure project paths
- Securing APM Server
- Monitoring APM Server
- Real User Monitoring (RUM)
- Tune Data Ingestion
- Storage Management
- API
- Exploring data in Elasticsearch
- Exported fields
- Troubleshooting
- Release notes
- APM Server version 7.6
- APM Server version 7.5
- APM Server version 7.4
- APM Server version 7.3
- APM Server version 7.2
- APM Server version 7.1
- APM Server version 7.0
- APM Server version 6.8
- APM Server version 6.7
- APM Server version 6.6
- APM Server version 6.5
- APM Server version 6.4
- APM Server version 6.3
- APM Server version 6.2
- APM Server version 6.1
Source map upload APIedit
You must enable RUM support in the APM Server for this endpoint to work.
The APM Server exposes an API endpoint to upload source maps for real user monitoring (RUM). See the create and upload source maps guide to get started.
Upload endpointedit
Send a HTTP POST
request with the Content-Type
header set to multipart/form-data
to the source map endpoint:
http(s)://{hostname}:{port}/assets/v1/sourcemaps
Request Fieldsedit
The request must include some fields needed to identify source map
correctly later on:
-
service_name
-
service_version
-
sourcemap
- must follow the Source map revision 3 proposal spec and be attached as afile upload
. -
bundle_filepath
- the absolute path of the final bundle as it is used in the web application
You can configure an API key or secret token to restrict sourcemap uploads.
How source maps are appliededit
APM Server attempts to find the correct source map for each stack trace frame
in an event.
To do this, it tries the following:
-
Compare the event’s
service.name
with the source map’sservice_name
-
Compare the event’s
service.version
with the source map’sservice_version
-
Compare the stack trace frame’s
abs_path
with the source map’sbundle_filepath
If a source map is found, the stack trace frame
attributes filename
, function
, line number
, and column number
are overwritten,
and abs path
is cleaned to be the shortest path name equivalent to the given path name.
If multiple source maps are found,
the one with the latest upload timestamp is used.
Exampleedit
Example source map request including an optional secret token "mysecret":
curl -X POST http://127.0.0.1:8200/assets/v1/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 sourcemap=@bundle.js.map