Code Coverage Data Collected

This product is not supported for your selected Datadog site. ().
Join the Preview!

Code Coverage is in Preview. This product replaces Test Optimization's code coverage feature, which is being deprecated. Complete the form to request access for the new Code Coverage product.

Request Access

Source Code Provider Integration

The exact data received by Datadog depends on your source code provider type:

Code Coverage relies on the following GitHub webhooks:

  • Pull request
  • Pull request review
  • Pull request review comment
  • Push

None of the webhooks include your source code content; they only include metadata about the pull request, such as title, description, author, labels, and commit SHAs.

See GitHub’s webhook events and payloads documentation for a detailed description of the data sent by these webhooks.

By default, when synchronizing your repositories, Datadog doesn’t store the actual content of files in your repository, only the Git commit and tree objects.

See Datadog Source Code Integration for more information about how Datadog integrates with your source code provider.

Code Coverage Report Upload

The datadog-ci coverage upload command sends the following data to Datadog:

  • Coverage reports: The report files, which contain the coverage data for your codebase. The data depends on the coverage tool and report format you are using, and normally includes file paths, line numbers, and coverage percentages.
  • Git metadata: Git repository URL, branch name, commit SHA, timestamp, author information, and list of file paths that were changed in the commit. You can disable Git metadata upload by adding --skip-git-metadata-upload=1 to the command.
  • Git diff summary: List of file paths that were changed in the commit, along with the numbers of added and removed lines. You can disable Diff data upload by adding --upload-git-diff=0 to the command.
  • CI metadata: Information about the CI environment, such as the CI provider, job ID, and pipeline ID.

No source code is uploaded to Datadog.

Further reading

Additional helpful documentation, links, and articles: