![]() |
VOOZH | about |
Code Coverage events are available as a data source in Datadog dashboards. This page describes the event model, the facets you can query, and the query patterns for the most common widgets.
Each report uploaded with datadog-ci coverage upload produces several events in Datadog:
@service, @codeowner, or @report.flag tag.@service.@codeowner.@report.flag.Any dashboard query that doesn’t isolate one of these event types ends up combining all of them and counting the same report multiple times. The query examples below demonstrate selecting exactly one event type at a time.
| Facet | Description |
|---|---|
@git.repository.id | URL-style repository identifier in lowercase, without the scheme; for example, github.com/datadog/documentation. Scope every widget query to a single repository. |
@git.default_branch | true on events from the repository’s default branch. Add this only when a widget should report on the default branch. Use it instead of @git.branch when the default branch name differs across repositories. |
@git.branch | Branch name; for example, main. Use to target a specific named branch. |
@git.commit.sha | Commit the report was uploaded for. Useful as a group by for per-commit timeseries. |
@service | Service name. Present only on per-service events. |
@codeowner | Code owner team. Present only on per-code-owner events. |
@report.flag | Flag name. Present only on per-flag events. |
Each example is the query filter for one widget. Replace <REPOSITORY_ID> with the lowercase, URL-style identifier of your repository (for example, github.com/datadog/documentation).
@git.default_branch:true or @git.branch:<BRANCH_NAME> to limit a widget to a specific branch.Use this filter in a Query Value widget for the current coverage number, or a Timeseries widget for a trend line over time.
@git.repository.id:<REPOSITORY_ID> @git.default_branch:true -@split:true -@report.flag:*-@split:true excludes per-service and per-code-owner events, and -@report.flag:* excludes per-flag events, leaving only the repository event.
Compare coverage across the services in a monorepo. Use this filter in a Top List or a Timeseries widget, grouped by @service.
@git.repository.id:<REPOSITORY_ID> @service:*Compare coverage across teams. Use this filter in a Top List or a Timeseries widget, grouped by @codeowner.
@git.repository.id:<REPOSITORY_ID> @codeowner:*Compare coverage across flags, for example by test type or runtime version. Use this filter in a Top List or a Timeseries widget, grouped by @report.flag.
@git.repository.id:<REPOSITORY_ID> @report.flag:*main for a specific repository@git.repository.id:github.com/datadog/documentation @git.branch:main -@split:true -@report.flag:*This example uses @git.branch:main to target a named branch. To follow the default branch on any repository, use @git.default_branch:true instead.
Additional helpful documentation, links, and articles:
| |