RUM Error Tracking
New announcements from Dash: Incident Management, Continuous Profiler, and more! New announcements from Dash!

RUM Error Tracking

The EU region is not yet available for Error Tracking. If you have any feedback or question, contact Datadog support.

What is Error Tracking?

Datadog collects a lot of errors. It’s critical to the health of your system to monitor these errors, but there can be so many individual error events that it’s hard to identify which ones matter the most and should be fixed first.

Error Tracking makes it easier to monitor these errors by:

  • Grouping similar errors into issues to reduce the noise and help identify the most important ones.
  • Following issues over time to know when they first started, if they are still ongoing, and how often they are occurring.
  • Getting all the context needed in one place to facilitate troubleshooting the issue.

Getting started

Error Tracking processes errors collected from the browser by the RUM SDK (errors with source origin).

To quickly get started with error tracking:

  1. Download the v1.11.5+ version of the RUM Browser SDK.
  2. Configure the version, the env and the service when initializing your SDK.

Upload mapping files

The source code of some applications is obfuscated or minified when deployed to production for performance optimization and security concerns. The consequence is that stack traces of errors fired from those applications are also obfuscated, making the troubleshooting process much more difficult because the stack traces cannot be used to understand which file and which line of code are responsible for a given error.

Datadog allows you to securely upload your source maps to deobfuscate your stack traces:

Javascript source maps

Source maps are mapping files generated when minifying Javascript source code. The Datadog CLI can be used to upload those mapping files from your build directory: it scans the build directory and its subdirectories to automatically upload the source maps with their related minified files. Upload your source maps directly from your CI pipeline:

  1. Add @datadog/datadog-ci to your package.json file, you must use the v0.5.2 version and onwards of the CLI.
  2. Export your Datadog API key as an environment variable named DATADOG_API_KEY.
  3. Run the following command:
    datadog-ci sourcemaps upload /path/to/build/directory \
      --service=my-service \
      --release-version=v35.2395005 \
      --minified-path-prefix=https://hostname.com/static/js

For more information about CLI parameters, see the official Github repository.

You must configure your Javascript bundler to create source maps that directly include the related source code. You should make sure the sourcesContent attribute in your source maps is not empty before uploading them.

Further Reading

Additional helpful documentation, links, and articles: