Skip to content

Add Datadog code coverage upload#3702

Merged
bwoebi merged 4 commits intoDataDog:masterfrom
ManuelPalenzuelaDD:add-datadog-coverage
Mar 23, 2026
Merged

Add Datadog code coverage upload#3702
bwoebi merged 4 commits intoDataDog:masterfrom
ManuelPalenzuelaDD:add-datadog-coverage

Conversation

@ManuelPalenzuelaDD
Copy link
Contributor

@ManuelPalenzuelaDD ManuelPalenzuelaDD commented Mar 12, 2026

Summary

We're migrating code coverage reporting from Codecov to Datadog Code Coverage across DataDog repositories. This PR adds Datadog coverage uploads alongside the existing Codecov setup — nothing is removed or changed about your current workflow.

What this PR does

  • Adds a datadog-ci coverage upload step to the "appsec code coverage" GitLab CI job, right after the existing Codecov uploads
  • Both LCOV reports (appsec-extension and appsec-helper) are uploaded to Datadog in addition to Codecov
  • Adds a code-coverage.datadog.yml config file that mirrors your existing codecov.yml ignore paths and PR gate thresholds

What this means for you

  • No changes to your existing workflow — Codecov continues to work exactly as before
  • No CI breakage risk — the Datadog upload is wrapped with || true and continue-on-error so it can never fail your pipeline
  • No action needed — once merged, coverage data will start flowing into Datadog automatically

Once we've validated that Datadog coverage numbers match Codecov, we'll follow up with a separate PR to remove the Codecov integration.

Changes

File Change
.gitlab/generate-appsec.php Added Datadog coverage upload step after existing Codecov uploads
code-coverage.datadog.yml New config mirroring codecov.yml ignore paths and thresholds

If you have any questions about this migration, feel free to ask!

🤖 Generated with Claude Code

Add datadog-ci coverage upload steps to the "appsec code coverage" CI job
to run side-by-side with existing Codecov uploads. Both LCOV reports
(extension and helper) are uploaded to Datadog for coverage parity validation.

Also adds code-coverage.datadog.yml mirroring codecov.yml ignore paths and
PR gate thresholds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ManuelPalenzuelaDD ManuelPalenzuelaDD marked this pull request as ready for review March 12, 2026 14:12
@ManuelPalenzuelaDD ManuelPalenzuelaDD requested a review from a team as a code owner March 12, 2026 14:12
@datadog-prod-us1-6
Copy link

datadog-prod-us1-6 bot commented Mar 12, 2026

⚠️ Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

🧪 13 Tests failed

testSearchPhpBinaries from integration.DDTrace\Tests\Integration\PHPInstallerTest   View in Datadog   (Fix with Cursor)
DDTrace\Tests\Integration\PHPInstallerTest::testSearchPhpBinaries
Test code or tested code printed unexpected output: Searching for available php binaries, this operation might take a while.
testSimplePushAndProcess from laravel-58-test.DDTrace\Tests\Integrations\Laravel\V5_8\QueueTest   View in Datadog   (Fix with Cursor)
Risky Test
phpvfscomposer://tests/vendor/phpunit/phpunit/phpunit:60
testSimplePushAndProcess from laravel-8x-test.DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest   View in Datadog   (Fix with Cursor)
DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest::testSimplePushAndProcess
Test code or tested code printed unexpected output: spanLinksTraceId: 69c16e87000000006548ca4ebfd9f433
tid: 69c16e8700000000
hexProcessTraceId: 6548ca4ebfd9f433
hexProcessSpanId: 2ac489da59a71f81
processTraceId: 7298305635728880691
processSpanId: 3081739615928262529

phpvfscomposer://tests/vendor/phpunit/phpunit/phpunit:106
View all

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 60.66%

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: abf876d | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

ManuelPalenzuelaDD and others added 3 commits March 16, 2026 17:52
The CI runner doesn't have write permissions to /usr/local/bin.
Write the binary to /tmp instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The coverage upload command is not available in v2.48.0. Updating to
v5.9.1 which includes the coverage plugin.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bwoebi bwoebi merged commit d1f109e into DataDog:master Mar 23, 2026
1906 of 1911 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants