-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add Code Coverage Data Collected page #30830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nikita-tkachenko-datadog
merged 5 commits into
master
from
nikita-tkachenko/code-cov-accessed-data
Aug 1, 2025
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c255fcf
Add Code Coverage Data Collected page
nikita-tkachenko-datadog cda5bb7
Minor improvement
nikita-tkachenko-datadog a39ce50
Fix a typo
nikita-tkachenko-datadog 03c3ae7
Apply suggestions from code review
nikita-tkachenko-datadog fbce2b5
Merge branch 'master' into nikita-tkachenko/code-cov-accessed-data
nikita-tkachenko-datadog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| --- | ||
| title: Code Coverage Data Collected | ||
| further_reading: | ||
| - link: "/code_coverage" | ||
| tag: "Documentation" | ||
| text: "Code Coverage" | ||
| - link: "/code_coverage/setup" | ||
| tag: "Documentation" | ||
| text: "Set up Code Coverage" | ||
| --- | ||
|
|
||
| {{< callout url="http://datadoghq.com/product-preview/code-coverage/" >}} | ||
| Code Coverage is in Preview. This product replaces Test Optimization's <a href="https://docs.datadoghq.com/tests/code_coverage">code coverage</a> feature, which is being deprecated. Complete the form to request access for the new Code Coverage product. | ||
| {{< /callout >}} | ||
|
|
||
| ## Source Code Provider Integration | ||
|
|
||
| The exact data received by Datadog depends on your source code provider type: | ||
|
|
||
| {{< tabs >}} | ||
| {{% tab "GitHub" %}} | ||
|
|
||
| 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, only metadata about the pull request, such as: title, description, author, labels, commit SHAs. | ||
|
|
||
| You can check GitHub's [webhook events and payloads documentation][1] for detailed description of the data sent by these webhooks. | ||
nikita-tkachenko-datadog marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| [1]: https://docs.github.com/en/webhooks/webhook-events-and-payloads | ||
|
|
||
| {{% /tab %}} | ||
| {{< /tabs >}} | ||
|
|
||
| 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][1] 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. Git metadata upload can be disabled 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. Diff data upload can be disabled 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. | ||
nikita-tkachenko-datadog marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| No source code is uploaded to Datadog. | ||
|
|
||
| ## Further reading | ||
|
|
||
| {{< partial name="whats-next/whats-next.html" >}} | ||
|
|
||
| [1]: /integrations/guide/source-code-integration | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.