Upload code coverage reports to Datadog#9425
Merged
nikita-tkachenko-datadog merged 13 commits intomasterfrom Aug 29, 2025
Merged
Upload code coverage reports to Datadog#9425nikita-tkachenko-datadog merged 13 commits intomasterfrom
nikita-tkachenko-datadog merged 13 commits intomasterfrom
Conversation
|
🎯 Code Coverage 🔗 Commit SHA: c0d713c | Docs | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 13 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.53.0-SNAPSHOT~c0d713c226, baseline=1.53.0-SNAPSHOT~8799a82b0a
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.047 s) : 0, 1046768
Total [baseline] (10.723 s) : 0, 10722565
Agent [candidate] (1.043 s) : 0, 1043361
Total [candidate] (10.734 s) : 0, 10734430
section appsec
Agent [baseline] (1.221 s) : 0, 1221397
Total [baseline] (10.862 s) : 0, 10862195
Agent [candidate] (1.224 s) : 0, 1224239
Total [candidate] (10.823 s) : 0, 10823245
section iast
Agent [baseline] (1.179 s) : 0, 1178936
Total [baseline] (10.922 s) : 0, 10921724
Agent [candidate] (1.187 s) : 0, 1186925
Total [candidate] (10.925 s) : 0, 10925448
section profiling
Agent [baseline] (1.197 s) : 0, 1196840
Total [baseline] (10.923 s) : 0, 10923049
Agent [candidate] (1.209 s) : 0, 1208977
Total [candidate] (10.992 s) : 0, 10992256
gantt
title petclinic - break down per module: candidate=1.53.0-SNAPSHOT~c0d713c226, baseline=1.53.0-SNAPSHOT~8799a82b0a
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.453 ms) : 0, 1453
crashtracking [candidate] (1.455 ms) : 0, 1455
BytebuddyAgent [baseline] (731.343 ms) : 0, 731343
BytebuddyAgent [candidate] (731.091 ms) : 0, 731091
GlobalTracer [baseline] (241.93 ms) : 0, 241930
GlobalTracer [candidate] (241.737 ms) : 0, 241737
AppSec [baseline] (30.098 ms) : 0, 30098
AppSec [candidate] (30.029 ms) : 0, 30029
Debugger [baseline] (6.035 ms) : 0, 6035
Debugger [candidate] (6.042 ms) : 0, 6042
Remote Config [baseline] (667.13 µs) : 0, 667
Remote Config [candidate] (654.56 µs) : 0, 655
Telemetry [baseline] (14.279 ms) : 0, 14279
Telemetry [candidate] (11.366 ms) : 0, 11366
section appsec
crashtracking [baseline] (1.445 ms) : 0, 1445
crashtracking [candidate] (1.44 ms) : 0, 1440
BytebuddyAgent [baseline] (754.505 ms) : 0, 754505
BytebuddyAgent [candidate] (756.219 ms) : 0, 756219
GlobalTracer [baseline] (235.043 ms) : 0, 235043
GlobalTracer [candidate] (235.314 ms) : 0, 235314
AppSec [baseline] (169.428 ms) : 0, 169428
AppSec [candidate] (169.393 ms) : 0, 169393
Debugger [baseline] (6.499 ms) : 0, 6499
Debugger [candidate] (6.541 ms) : 0, 6541
Remote Config [baseline] (667.361 µs) : 0, 667
Remote Config [candidate] (640.53 µs) : 0, 641
Telemetry [baseline] (9.235 ms) : 0, 9235
Telemetry [candidate] (9.927 ms) : 0, 9927
IAST [baseline] (23.556 ms) : 0, 23556
IAST [candidate] (23.644 ms) : 0, 23644
section iast
crashtracking [baseline] (1.448 ms) : 0, 1448
crashtracking [candidate] (1.456 ms) : 0, 1456
BytebuddyAgent [baseline] (850.829 ms) : 0, 850829
BytebuddyAgent [candidate] (856.998 ms) : 0, 856998
GlobalTracer [baseline] (233.217 ms) : 0, 233217
GlobalTracer [candidate] (235.072 ms) : 0, 235072
AppSec [baseline] (26.696 ms) : 0, 26696
AppSec [candidate] (27.897 ms) : 0, 27897
Debugger [baseline] (5.765 ms) : 0, 5765
Debugger [candidate] (6.655 ms) : 0, 6655
Remote Config [baseline] (595.431 µs) : 0, 595
Remote Config [candidate] (606.27 µs) : 0, 606
Telemetry [baseline] (8.326 ms) : 0, 8326
Telemetry [candidate] (8.358 ms) : 0, 8358
IAST [baseline] (30.988 ms) : 0, 30988
IAST [candidate] (28.667 ms) : 0, 28667
section profiling
crashtracking [baseline] (1.429 ms) : 0, 1429
crashtracking [candidate] (1.463 ms) : 0, 1463
BytebuddyAgent [baseline] (761.859 ms) : 0, 761859
BytebuddyAgent [candidate] (771.738 ms) : 0, 771738
GlobalTracer [baseline] (222.279 ms) : 0, 222279
GlobalTracer [candidate] (223.648 ms) : 0, 223648
AppSec [baseline] (30.957 ms) : 0, 30957
AppSec [candidate] (31.161 ms) : 0, 31161
Debugger [baseline] (6.255 ms) : 0, 6255
Debugger [candidate] (6.337 ms) : 0, 6337
Remote Config [baseline] (691.259 µs) : 0, 691
Remote Config [candidate] (707.222 µs) : 0, 707
Telemetry [baseline] (15.451 ms) : 0, 15451
Telemetry [candidate] (15.488 ms) : 0, 15488
ProfilingAgent [baseline] (108.289 ms) : 0, 108289
ProfilingAgent [candidate] (107.998 ms) : 0, 107998
Profiling [baseline] (108.944 ms) : 0, 108944
Profiling [candidate] (108.636 ms) : 0, 108636
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.53.0-SNAPSHOT~c0d713c226, baseline=1.53.0-SNAPSHOT~8799a82b0a
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.045 s) : 0, 1044681
Total [baseline] (8.622 s) : 0, 8622303
Agent [candidate] (1.049 s) : 0, 1048794
Total [candidate] (8.647 s) : 0, 8647487
section iast
Agent [baseline] (1.187 s) : 0, 1186978
Total [baseline] (9.335 s) : 0, 9334835
Agent [candidate] (1.197 s) : 0, 1197160
Total [candidate] (9.334 s) : 0, 9334103
gantt
title insecure-bank - break down per module: candidate=1.53.0-SNAPSHOT~c0d713c226, baseline=1.53.0-SNAPSHOT~8799a82b0a
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.457 ms) : 0, 1457
crashtracking [candidate] (1.449 ms) : 0, 1449
BytebuddyAgent [baseline] (732.648 ms) : 0, 732648
BytebuddyAgent [candidate] (735.247 ms) : 0, 735247
GlobalTracer [baseline] (242.658 ms) : 0, 242658
GlobalTracer [candidate] (242.873 ms) : 0, 242873
AppSec [baseline] (30.143 ms) : 0, 30143
AppSec [candidate] (30.129 ms) : 0, 30129
Debugger [baseline] (6.059 ms) : 0, 6059
Debugger [candidate] (6.053 ms) : 0, 6053
Remote Config [baseline] (668.869 µs) : 0, 669
Remote Config [candidate] (664.892 µs) : 0, 665
Telemetry [baseline] (10.071 ms) : 0, 10071
Telemetry [candidate] (11.405 ms) : 0, 11405
section iast
crashtracking [baseline] (1.464 ms) : 0, 1464
crashtracking [candidate] (1.482 ms) : 0, 1482
BytebuddyAgent [baseline] (857.403 ms) : 0, 857403
BytebuddyAgent [candidate] (867.381 ms) : 0, 867381
GlobalTracer [baseline] (233.975 ms) : 0, 233975
GlobalTracer [candidate] (234.114 ms) : 0, 234114
AppSec [baseline] (30.355 ms) : 0, 30355
AppSec [candidate] (28.381 ms) : 0, 28381
Debugger [baseline] (5.759 ms) : 0, 5759
Debugger [candidate] (6.67 ms) : 0, 6670
Remote Config [baseline] (599.192 µs) : 0, 599
Remote Config [candidate] (614.097 µs) : 0, 614
Telemetry [baseline] (8.431 ms) : 0, 8431
Telemetry [candidate] (8.447 ms) : 0, 8447
IAST [baseline] (27.867 ms) : 0, 27867
IAST [candidate] (28.803 ms) : 0, 28803
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 2 performance regressions! Performance is the same for 9 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~c0d713c226, baseline=1.53.0-SNAPSHOT~8799a82b0a
dateFormat X
axisFormat %s
section baseline
no_agent (4.503 ms) : 4453, 4554
. : milestone, 4503,
iast (9.249 ms) : 9099, 9399
. : milestone, 9249,
iast_FULL (14.178 ms) : 13892, 14463
. : milestone, 14178,
iast_GLOBAL (10.34 ms) : 10159, 10521
. : milestone, 10340,
profiling (9.161 ms) : 9015, 9307
. : milestone, 9161,
tracing (7.649 ms) : 7542, 7756
. : milestone, 7649,
section candidate
no_agent (4.418 ms) : 4362, 4473
. : milestone, 4418,
iast (9.486 ms) : 9333, 9639
. : milestone, 9486,
iast_FULL (13.838 ms) : 13558, 14118
. : milestone, 13838,
iast_GLOBAL (10.573 ms) : 10388, 10758
. : milestone, 10573,
profiling (8.7 ms) : 8561, 8840
. : milestone, 8700,
tracing (7.609 ms) : 7493, 7725
. : milestone, 7609,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~c0d713c226, baseline=1.53.0-SNAPSHOT~8799a82b0a
dateFormat X
axisFormat %s
section baseline
no_agent (37.477 ms) : 37179, 37775
. : milestone, 37477,
appsec (47.035 ms) : 46611, 47459
. : milestone, 47035,
code_origins (44.021 ms) : 43642, 44400
. : milestone, 44021,
iast (45.879 ms) : 45482, 46275
. : milestone, 45879,
profiling (48.329 ms) : 47867, 48792
. : milestone, 48329,
tracing (43.579 ms) : 43212, 43946
. : milestone, 43579,
section candidate
no_agent (38.295 ms) : 37989, 38602
. : milestone, 38295,
appsec (48.156 ms) : 47713, 48598
. : milestone, 48156,
code_origins (44.892 ms) : 44506, 45278
. : milestone, 44892,
iast (45.723 ms) : 45320, 46126
. : milestone, 45723,
profiling (50.21 ms) : 49682, 50738
. : milestone, 50210,
tracing (45.931 ms) : 45552, 46310
. : milestone, 45931,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~c0d713c226, baseline=1.53.0-SNAPSHOT~8799a82b0a
dateFormat X
axisFormat %s
section baseline
no_agent (1.471 ms) : 1460, 1483
. : milestone, 1471,
appsec (3.669 ms) : 3452, 3886
. : milestone, 3669,
iast (2.201 ms) : 2138, 2265
. : milestone, 2201,
iast_GLOBAL (2.23 ms) : 2168, 2293
. : milestone, 2230,
profiling (2.47 ms) : 2307, 2632
. : milestone, 2470,
tracing (2.017 ms) : 1968, 2065
. : milestone, 2017,
section candidate
no_agent (1.481 ms) : 1469, 1492
. : milestone, 1481,
appsec (3.668 ms) : 3450, 3887
. : milestone, 3668,
iast (2.196 ms) : 2133, 2259
. : milestone, 2196,
iast_GLOBAL (2.234 ms) : 2172, 2297
. : milestone, 2234,
profiling (2.025 ms) : 1975, 2075
. : milestone, 2025,
tracing (2.004 ms) : 1956, 2053
. : milestone, 2004,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~c0d713c226, baseline=1.53.0-SNAPSHOT~8799a82b0a
dateFormat X
axisFormat %s
section baseline
no_agent (15.027 s) : 15027000, 15027000
. : milestone, 15027000,
appsec (14.726 s) : 14726000, 14726000
. : milestone, 14726000,
iast (18.687 s) : 18687000, 18687000
. : milestone, 18687000,
iast_GLOBAL (18.034 s) : 18034000, 18034000
. : milestone, 18034000,
profiling (15.405 s) : 15405000, 15405000
. : milestone, 15405000,
tracing (14.882 s) : 14882000, 14882000
. : milestone, 14882000,
section candidate
no_agent (15.693 s) : 15693000, 15693000
. : milestone, 15693000,
appsec (14.893 s) : 14893000, 14893000
. : milestone, 14893000,
iast (18.85 s) : 18850000, 18850000
. : milestone, 18850000,
iast_GLOBAL (18.053 s) : 18053000, 18053000
. : milestone, 18053000,
profiling (15.301 s) : 15301000, 15301000
. : milestone, 15301000,
tracing (14.969 s) : 14969000, 14969000
. : milestone, 14969000,
|
2e80687 to
8093ae4
Compare
Contributor
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
daniel-mohedano
approved these changes
Aug 28, 2025
svc-squareup-copybara
pushed a commit
to cashapp/misk
that referenced
this pull request
Sep 4, 2025
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | [com.datadoghq:dd-trace-api](https://github.com/datadog/dd-trace-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `1.52.1` -> `1.53.0` | --- ### Release Notes <details> <summary>datadog/dd-trace-java (com.datadoghq:dd-trace-api)</summary> ### [`v1.53.0`](https://github.com/DataDog/dd-trace-java/releases/tag/v1.53.0): 1.53.0 ### Components #### Application Security Management (WAF) - 🐛 Fix NullPointerException log in AppSec ([#​9355](DataDog/dd-trace-java#9355) - [@​jandro996](https://github.com/jandro996)) - ✨ Add Forwarded header as a source to client IP resolution ([#​9310](DataDog/dd-trace-java#9310) - [@​jandro996](https://github.com/jandro996)) #### Build & Tooling - 📖 Update CODEOWNERS ([#​9294](DataDog/dd-trace-java#9294) - [@​mhlidd](https://github.com/mhlidd)) - ✨ Add dependency on Maven Central deployment to OCI publish jobs ([#​9204](DataDog/dd-trace-java#9204) - [@​sarahchen6](https://github.com/sarahchen6)) #### Continuous Integration Visibility - ✨ Upload code coverage reports to Datadog ([#​9425](DataDog/dd-trace-java#9425) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - ✨⚡ Do not follow symlinks by default when building repository index ([#​9318](DataDog/dd-trace-java#9318) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - ✨ Improve tag propagation between test event levels ([#​9278](DataDog/dd-trace-java#9278) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) #### Data Streams Monitoring - ✨ Create container hash tags propagation ([#​9282](DataDog/dd-trace-java#9282) - [@​ygree](https://github.com/ygree)) #### Database Monitoring - 🐛 Prevent crash in SQL Server's JDBC when tracing execute methods with generated keys ([#​9321](DataDog/dd-trace-java#9321) - [@​na-ji](https://github.com/na-ji)) - ✨ Create container hash tags propagation ([#​9282](DataDog/dd-trace-java#9282) - [@​ygree](https://github.com/ygree)) #### GraalVM native-image - 🐛 Update GraalVM config to reflect TempLocationManager's new package ([#​9337](DataDog/dd-trace-java#9337) - [@​luneo7](https://github.com/luneo7) - thanks for the contribution!) #### Metrics - 🐛 Add reflect config for CSS and graalvm ([#​9449](DataDog/dd-trace-java#9449) - [@​amarziali](https://github.com/amarziali)) - ✨ Align CSS health metrics ([#​9444](DataDog/dd-trace-java#9444) - [@​amarziali](https://github.com/amarziali)) - ✨ Aggregate peer tags for consumer span kind ([#​9442](DataDog/dd-trace-java#9442) - [@​amarziali](https://github.com/amarziali)) - ✨ Implement health metrics for client stats ([#​9377](DataDog/dd-trace-java#9377) - [@​amarziali](https://github.com/amarziali)) - ✨ Add peer tags, span kind and trace root flag to MetricKey bucket ([#​9178](DataDog/dd-trace-java#9178) - [@​bric3](https://github.com/bric3)) #### Profiling - ✨ Create a profile flare reporter (requires tracing or CI vis to be enabled) ([#​9433](DataDog/dd-trace-java#9433) - [@​MattAlp](https://github.com/MattAlp)) - 🐛 Properly fall-back on UDS profiling URL ([#​9401](DataDog/dd-trace-java#9401) - [@​jbachorik](https://github.com/jbachorik)) - 🐛 Properly handle trace agent IPv6 URL in profiling ([#​9334](DataDog/dd-trace-java#9334) - [@​jbachorik](https://github.com/jbachorik)) #### Realtime User Monitoring - 🐛 Avoid multiple injections on dispatch on jboss ([#​9392](DataDog/dd-trace-java#9392) - [@​amarziali](https://github.com/amarziali)) - ✨ Support async servlet for RUM injection ([#​9333](DataDog/dd-trace-java#9333) - [@​amarziali](https://github.com/amarziali)) - 🐛 Improve RUM injection matching and avoid truncating responses ([#​9323](DataDog/dd-trace-java#9323) - [@​amarziali](https://github.com/amarziali)) - 💡 Add telemetry for the RUM injector ([#​9267](DataDog/dd-trace-java#9267) - [@​sarahchen6](https://github.com/sarahchen6)) - ✨ Make rum injector stream/writer more resilient to errors ([#​9184](DataDog/dd-trace-java#9184) - [@​amarziali](https://github.com/amarziali)) #### Telemetry - 🐛 Remediate error logs ([#​9459](DataDog/dd-trace-java#9459) - [@​ygree](https://github.com/ygree)) - ✨ Report config\_id for Hands Off Config files ([#​9299](DataDog/dd-trace-java#9299) - [@​mtoffl01](https://github.com/mtoffl01)) - ✨ Adding Config Inversion Telemetry component ([#​9244](DataDog/dd-trace-java#9244) - [@​mhlidd](https://github.com/mhlidd)) #### Trace context propagation - 🧹 Migrate instrumentations to Context API ([#​9384](DataDog/dd-trace-java#9384), [#​9378](DataDog/dd-trace-java#9378), [#​9358](DataDog/dd-trace-java#9358) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) - ✨🔍 Add baggage propagation telemetry ([#​9289](DataDog/dd-trace-java#9289) - [@​rachelyangdog](https://github.com/rachelyangdog)) - 🧹 Improve Instrumenter API to use Context instead of Span ([#​9211](DataDog/dd-trace-java#9211) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) #### Tracer core - 💡:test\_tube: Enable process level tags for java 21 applications ([#​9458](DataDog/dd-trace-java#9458) - [@​amarziali](https://github.com/amarziali)) - ✨ Move base and peer service adder before span is published ([#​9408](DataDog/dd-trace-java#9408) - [@​amarziali](https://github.com/amarziali)) - ✨ Add ErrorPriorities level for manual instrumentation ([#​9387](DataDog/dd-trace-java#9387) - [@​cecile75](https://github.com/cecile75)) - ✨ Throw InvalidBooleanValueException in ConfigConverter.booleanValueOf ([#​9370](DataDog/dd-trace-java#9370) - [@​mtoffl01](https://github.com/mtoffl01)) - 🐛 Avoid NPE on featureDiscovery creation ([#​9353](DataDog/dd-trace-java#9353) - [@​amarziali](https://github.com/amarziali)) - ✨ Stable Config improvements ([#​9259](DataDog/dd-trace-java#9259) - [@​mtoffl01](https://github.com/mtoffl01)) ### Instrumentations #### gRPC instrumentation - 🐛 Changing GRPC instrumentation codes from `status.code` to `grpc.status.code` ([#​9367](DataDog/dd-trace-java#9367) - [@​mhlidd](https://github.com/mhlidd)) #### JDBC instrumentation - 🐛 Prevent crash in SQL Server's JDBC when tracing execute methods with generated keys ([#​9321](DataDog/dd-trace-java#9321) - [@​na-ji](https://github.com/na-ji)) #### Kotlin instrumentation - 🐛 Take defensive copy of original scope stack when restoring on different thread ([#​9403](DataDog/dd-trace-java#9403) - [@​mcculls](https://github.com/mcculls)) #### OpenTelemetry instrumentation - 🐛 Fix using SpanAttribute annotation on multiple parameters ([#​9412](DataDog/dd-trace-java#9412) - [@​cecile75](https://github.com/cecile75)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am every weekday" in timezone Australia/Melbourne, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). GitOrigin-RevId: e23ec866cef91afc6b5226d5f0dc7da538d947e8
gnufede
added a commit
to DataDog/dd-trace-py
that referenced
this pull request
Jan 30, 2026
## Description This PR implements code coverage report upload functionality for pytest v3 plugin (`ddtrace/testing`), enabling automatic upload of LCOV coverage reports to Datadog's Code Coverage backend. This feature simplifies onboarding to Code Coverage for existing Test Optimization customers by automatically collecting and uploading coverage data during test execution. The implementation follows the approach established in the Java tracer (PR [#9425](DataDog/dd-trace-java#9425)) and includes: - **Coverage.py Integration**: Enhanced patching and wrapper system for coverage.py to capture coverage percentages and generate LCOV reports - **Report Generation**: Support for pytest-cov with LCOV report generation - **Upload Functionality**: Gzipped LCOV report upload to intake (`/api/v2/cicovreprt` endpoint), with proper event metadata - **Configuration Support**: Backend setting `coverage_report_upload_enabled` with environment variable `DD_CIVISIBILITY_CODE_COVERAGE_REPORT_UPLOAD_ENABLED` override - **Git/CI Metadata**: Automatic inclusion of repository, commit, branch, and CI provider tags in coverage reports ## Testing Comprehensive test suite covering multiple layers: ### Unit Tests - **Coverage.py Integration** (`tests/testing/internal/coverage/test_patch.py`): - Coverage lifecycle management (start/stop/erase) - LCOV report generation with percentage caching - Patching safety (double patch/unpatch scenarios) - Error handling for invalid paths and missing coverage data - Custom coverage parameters and instance management ### Integration Tests - **End-to-End Upload** (`tests/testing/internal/pytest/test_pytest_coverage_report_upload.py`): - Upload with pytest-cov and ModuleCodeCollector - LCOV format validation and gzip compression verification - Git metadata inclusion in event payloads - Upload failure resilience ### Configuration Edge Cases - **Settings Precedence**: Backend settings vs environment variable interactions - **Custom Coverage Configs**: Support for .coveragerc files with branch coverage - **Multiple Source Paths**: Coverage collection across different directories ### API Client Tests - **Upload Mechanism** (`tests/testing/internal/test_api_client.py`): - Multipart form-data structure validation - CI tag propagation and telemetry recording - HTTP error handling and retry logic ## Risks **Low Risk**: - Feature is controlled by backend setting (disabled by default) - Environment variable override provides user control - Upload failures don't affect test execution (fail-safe design) - Coverage collection uses existing ddtrace mechanisms, and can only be triggered if `coverage.py` is present. - Extensive error handling prevents crashes **Potential Considerations**: - Additional I/O during test runs for LCOV generation and upload - Network dependency for upload functionality (mitigated by error handling) - Coverage.py version compatibility (tested with standard versions) ## Additional Notes - **Backward Compatibility**: All coverage.py integration maintains existing behavior when upload is disabled - **Performance**: Minimal overhead during test execution; coverage generation happens at session end - **Format Support**: Currently supports LCOV format, extensible for future formats
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What Does This Do
Implements uploading code coverage reports to Datadog's Code Coverage directly from the tracer.
If Jacoco coverage data is detected, it is either uploaded as is or, if there were tests skipped by ITR, is augmented with the coverage of the skipped tests (received from the backend) and is uploaded as an LCOV report (as it is simpler that reconstruct a Jacoco report).
Motivation
Simplify onboarding to Code Coverage for existing Test Optimization customers.
Contributor Checklist
type:and (comp:orinst:) labels in addition to any usefull labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: SDTEST-2562