datadog-ci icon indicating copy to clipboard operation
datadog-ci copied to clipboard

RUM sourcemaps don't work when bundle is loaded with query param

Open anttiviljami opened this issue 3 years ago • 0 comments

Describe what happened I've followed the steps to upload source maps for RUM logging, but don't see unminified errors in datadog logs.

My guess is that this is because we use a ?version= query parameter in the URLs when loading our frontend javascript bundles and datadog is not able to match the source map to the correct script.

Steps to reproduce the issue:

  1. Build a single-page-application with a bundle loaded using a query param <script src="/bundle.js?version=123">

  2. Set up Browser Log Collection with forwardErrorsToLogs: true

  3. Use datadog-ci to upload source maps for bundle.js as bundle.js.map:

npx @datadog/datadog-ci sourcemaps upload dist/ --service example-app --release-version 1.0.0 --minified-path-prefix=https://example-app.com
  1. Trigger an error in the console to push an error with a stack trace to datadog

Expected behaviour:

When observing the error in datadog logs, I expect to see the unminified stack trace for the error.

Actual behaviour:

The error stack trace is minified.

Additional context

The source maps for the same bundle work fine in browser dev tools, so the issue is not with the source maps themselves.

Not totally sure this is the right place to report this bug. Please let me know if I should post this somewhere else.

anttiviljami avatar Nov 03 '22 14:11 anttiviljami