Fix ADO.NET dropped trace test flakes#8871
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af7e798624
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8871) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8871) - mean (72ms) : 69, 76
master - mean (71ms) : 68, 73
section Bailout
This PR (8871) - mean (75ms) : 72, 79
master - mean (78ms) : 74, 83
section CallTarget+Inlining+NGEN
This PR (8871) - mean (1,083ms) : 1026, 1141
master - mean (1,085ms) : 1039, 1131
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8871) - mean (112ms) : 106, 118
master - mean (112ms) : 105, 119
section Bailout
This PR (8871) - mean (110ms) : 107, 112
master - mean (113ms) : 108, 117
section CallTarget+Inlining+NGEN
This PR (8871) - mean (779ms) : 757, 802
master - mean (774ms) : 751, 797
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8871) - mean (96ms) : 93, 98
master - mean (101ms) : 95, 106
section Bailout
This PR (8871) - mean (96ms) : 95, 98
master - mean (99ms) : 94, 103
section CallTarget+Inlining+NGEN
This PR (8871) - mean (938ms) : 902, 975
master - mean (939ms) : 894, 985
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8871) - mean (99ms) : 94, 104
master - mean (95ms) : 92, 97
section Bailout
This PR (8871) - mean (97ms) : 93, 102
master - mean (99ms) : 94, 104
section CallTarget+Inlining+NGEN
This PR (8871) - mean (813ms) : 773, 852
master - mean (814ms) : 775, 853
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8871) - mean (201ms) : 196, 205
master - mean (203ms) : 196, 210
section Bailout
This PR (8871) - mean (203ms) : 199, 206
master - mean (207ms) : 202, 212
section CallTarget+Inlining+NGEN
This PR (8871) - mean (1,211ms) : 1172, 1251
master - mean (1,222ms) : 1177, 1268
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8871) - mean (288ms) : 281, 295
master - mean (291ms) : 284, 299
section Bailout
This PR (8871) - mean (291ms) : 286, 296
master - mean (292ms) : 283, 301
section CallTarget+Inlining+NGEN
This PR (8871) - mean (971ms) : 948, 993
master - mean (977ms) : 947, 1007
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8871) - mean (281ms) : 273, 289
master - mean (285ms) : 278, 291
section Bailout
This PR (8871) - mean (280ms) : 273, 288
master - mean (284ms) : 278, 290
section CallTarget+Inlining+NGEN
This PR (8871) - mean (1,168ms) : 1137, 1199
master - mean (1,172ms) : 1134, 1209
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8871) - mean (279ms) : 274, 285
master - mean (283ms) : 276, 290
section Bailout
This PR (8871) - mean (280ms) : 273, 287
master - mean (283ms) : 276, 290
section CallTarget+Inlining+NGEN
This PR (8871) - mean (1,047ms) : 1004, 1091
master - mean (1,051ms) : 1002, 1101
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BenchmarksBenchmark execution time: 2026-07-08 19:50:34 Comparing candidate commit 97167bd in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 71 metrics, 0 unstable metrics, 59 known flaky benchmarks, 67 flaky benchmarks without significant changes.
|
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
67835c0 to
97167bd
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
## Summary of changes
Flushes the large `RunAllAsync` trace before starting the `SqlCommandVb`
trace
## Reason for change
`SystemDataSqlClientTests.SubmitsTraces` intermittently received 105
spans, consistent with the entire initial `RunAllAsync` trace being
absent.
The previous mitigation flushed only after both traces had completed,
leaving a timing window for the first trace.
## Implementation details
Moved the flush
## Test coverage
This is it
## Other details
<!-- Fixes #{issue} -->
Follow-up to #8871
#incident-57303
<!-- ⚠️ Note:
Where possible, please obtain 2 approvals prior to merging. Unless
CODEOWNERS specifies otherwise, for external teams it is typically best
to have one review from a team member, and one review from apm-dotnet.
Trivial changes do not require 2 reviews.
MergeQueue is NOT enabled in this repository. If you have write access
to the repo, the PR has 1-2 approvals (see above), and all of the
required checks have passed, you can use the Squash and Merge button to
merge the PR. If you don't have write access, or you need help, reach
out in the #apm-dotnet channel in Slack.
-->
Summary of changes
Fix flaky ADO.NET integration tests where large sample traces can be dropped locally before reaching the mock tracer agent.
Reason for change
Sql tests flaked and in the log file was
1 traces were dropped since the last flush operationwhich doesn't give us much to go on at all. Saw the same pattern over the past month with the other ADO.NET integration tests.This attempts to force a flush sooner after that first trace is sent (as the first trace was dropped).
Implementation details
Fix
SampleHelpers.ForceTracerFlushAsync()to callDatadog.Trace.Tracer.FlushAsync()Previously it reflected
ForceFlushAsync()which does not exist, so the helper was effectively a no-op.Flush between large ADO.NET sample phases
Replace
Task.Delay(2000)with a manual flushTest coverage
Other details
We unfortunately don't know why it was dropped, so modifying logic to attempt to help with that.
Investigating the dropped traces seems like a different issue we should investigate later
#incident-57303