datadog-ci sourcemaps upload for RUM Stack Traces
datadog-ci sourcemaps upload uploads JavaScript source maps tagged with a service and version so Datadog RUM can resolve minified error frames.
Datadog RUM groups front-end errors by service and version. Uploading the matching source maps from CI is what turns minified frames into real file and line references.
What it does
datadog-ci sourcemaps upload uploads .map files from a directory, tagging them with --service, --release-version, and the public path they map to (--minified-path-prefix). It uses DATADOG_API_KEY and DATADOG_SITE for auth and routing.
Common usage
export DATADOG_API_KEY=...
export DATADOG_SITE=datadoghq.com
datadog-ci sourcemaps upload ./dist \
--service web-app \
--release-version "$GIT_SHA" \
--minified-path-prefix https://app.example.com/static/Options
| Flag / env | What it does |
|---|---|
| --service <name> | RUM service the maps belong to (required) |
| --release-version <v> | Version tag matching the deployed build (required) |
| --minified-path-prefix <url> | Public URL prefix of the bundles (required) |
| DATADOG_API_KEY | API key (required) |
| DATADOG_SITE | Datadog site (datadoghq.eu, us3, etc.) |
| --dry-run | Validate without uploading |
In CI
The --release-version must equal the version your RUM SDK reports at runtime, or Datadog will not pair errors with the maps. Derive both from the same git SHA. Run with --dry-run first in a new pipeline to confirm the path prefix is right before consuming API quota.
Common errors in CI
"Missing API key. Please set DATADOG_API_KEY" means the secret is unset. "Invalid API key" / HTTP 403 means a wrong key or a site mismatch (EU key against the US site). A 400 on upload usually means a malformed --minified-path-prefix (it must be the absolute public URL prefix). Errors stay minified when --release-version differs from the SDK's reported version.