Type to search.

Source maps

Serverless Unavailable

Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.

Availability

  • Unavailable

    This functionality is not available in Elastic Cloud Serverless.

Stack

The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

Minifying JavaScript bundles is a common practice in production as it can improve the load time and network latency of your application. However, minified code by itself can be hard to debug. For this reason, Elastic APM supports source maps. A source map is a file that maps minified files back to the original source code, allowing you to maintain the speed advantage of minified code, without losing the ability to quickly and easily debug your applications.

There are three steps required to enable, upload, and apply a source map to error stack traces. An overview is listed below, and a complete walk-through is available in the generate and upload a source map guide.

  1. Set the serviceVersion when initializing the RUM Agent.
  2. Generate a source map for your application with the serviceVersion from step one.
  3. Enable and upload the source map file to APM Server.

You can also configure a secret token or API key to restrict the uploading of sourcemaps.

Tip

Don’t forget, you must enable RUM support in the APM Server for this endpoint to work.