Link errors to source code in Datadog
masterTo enable direct links from Datadog errors to your source code (e.g., GitHub, GitLab, Bitbucket, Azure DevOps), the upload command must be able to associate sourcemaps with your repository.
Requirements for automatic linking:
- The
gitexecutable must be installed. datadog-cimust be run within the git repository.--disable-gitmust not be set.
Manual Configuration (Bypassing Git):
If your build environment lacks a .git/ folder, you can still enable linking by providing:
--repository-url <url>(orDD_GIT_REPOSITORY_URL)--commit-sha <sha>(orDD_GIT_COMMIT_SHA)
Note: In this mode, source files are extracted directly from the sourcemap sources field, so untracked files may be sent to Datadog.
Handling Path Prefixes:
If your sourcemap references paths with a prefix before the repository root (e.g., webpack://MyProject/src/file.js), use the --project-path MyProject/ flag so files are correctly matched to the repository.