datadog-ci sourcemaps upload reads sourceMappingURL values
Introduced 2026-01-08 · score 0.95
HOW TO USE IT
When minified JavaScript files in the directory use `sourceMappingURL` values instead of the legacy filename pattern, run `sourcemaps upload` on that directory; it uses those values to locate sourcemaps. Set the required service, release version, and minified path prefix, and provide a Datadog API key.
datadog-ci sourcemaps upload <directory> --service <service> --minified-path-prefix <URL-or-absolute-path> --release-version <version>WHY THIS HELPS
Upload source maps for minified JavaScript files in a directory when their map filenames do not follow the previous hardcoded naming pattern.
BEFORE THIS CHANGE
The mapping was hardcoded: `foo.min.js` → `foo.map.js`.
REQUIREMENTS AND LIMITATIONS
- Version: v5.2.0
- <directory> (required): Directory containing sourcemaps; searched recursively.
- --service <service> (required): Service name used to match the RUM SDK `service` tag.
- --release-version <version> (required): Version used to match the RUM SDK `version` tag.
- --minified-path-prefix <URL-or-absolute-path> (required): Common URL or absolute-path prefix for the served JavaScript files.
- Prerequisite: Set `DD_API_KEY` or `DATADOG_API_KEY` in the environment.
- Looks at the last non-empty lines of minified JS files in the given directory.
FIRST-PARTY EVIDENCE
- https://github.com/DataDog/datadog-ci/releases/tag/v5.2.0
- https://github.com/DataDog/datadog-ci/pull/2035
- https://github.com/DataDog/datadog-ci/pull/2048
- https://github.com/DataDog/datadog-ci/blob/v5.2.0/packages/datadog-ci/src/commands/sourcemaps/README.md
Check the installed version and the source before using it. Entry JSON