Skip to content

Make exposure shutdown flush test deterministic - #9401

Merged
btthomas merged 1 commit into
masterfrom
dd/exposure-flush-test-synchronization-20261013
Oct 13, 2026
Merged

btthomas merged 1 commit into
masterfrom
dd/exposure-flush-test-synchronization-20261013

Conversation

@btthomas

Copy link
Copy Markdown
Contributor

Summary of changes

  • Make the exposure shutdown flush test use its send gates to control disposal completion.
  • Run its synchronous Dispose call on a dedicated thread so it does not occupy a worker needed by the send loop or test continuations.

Reason for change

DisposeFlushesEventsQueuedWhileAnEarlierBatchIsSending assumes Dispose remains blocked until the test releases the final request. However, the test configured a finite shutdown timeout. Dispose intentionally stops waiting when that deadline expires, even if a request remains blocked. If thread-pool scheduling delays the test's continuation, its assertion observes a completed Dispose task after the deadline and incorrectly reports a flush failure. The approximately five-second failed runs match the original five-second shutdown allowance.

Current master already contains #9396, which raised that allowance to one minute. That reduces the chance of failure but retains the same race. The send loop already awaits the final flush, and Dispose waits for that loop until the configured deadline; the separate bounded-shutdown test explicitly requires timeout expiry to release shutdown. This is a test synchronization issue.

Implementation details

  • Configure Timeout.InfiniteTimeSpan for this flush-ordering scenario so only the controlled request gates can release disposal. The finite waits that detect missing send/disposal progress and the finally block that releases both gates remain in place.
  • Use TaskCreationOptions.LongRunning with TaskScheduler.Default for the blocking Dispose call, leaving thread-pool workers available for asynchronous sends and assertions.
  • Preserve all existing assertions, including waiting for the final send and checking the second exposure's payload. Production shutdown behavior and the separate bounded-wait test are unchanged.

Test coverage

  • A package-free .NET 8 harness linked the actual ExposureApi, EVP transport, cache, exposure models, request factory, and ExposureApiTests sources. The corrected test method passed 100 consecutive executions, including its payload assertions. The other test methods also passed: bounded shutdown, faulted/canceled send loops, and enqueue after disposal.
  • In the same harness, withholding the test's final-send observation until the deadline reproduced Dispose completing while the final request remained blocked with both the historical five-second allowance and current master's one-minute allowance. Gate-controlled shutdown remained blocked across an observation delay exceeding five seconds and completed after releasing the final send.
  • A negative control that removed Dispose's wait was rejected by the corrected test's existing final-send assertion.
  • This isolated harness uses doubles for external dependencies, JSON/assertion adapters, and test attributes; it is not a full repository xUnit run. The focused dotnet test command could not start because global.json requires SDK 11.0.100-rc.1.26425.128 and only SDK 8.0.412 is installed. Validation on the affected .NET Core 3.0/3.1 CI jobs remains required.

Other details


PR by Bits - View session in Datadog

Comment @DataDog to request changes

Co-authored-by: btthomas <9452950+btthomas@users.noreply.github.com>
@btthomas
btthomas requested a review from a team as a code owner October 13, 2026 13:31
@datadog-official

datadog-official Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

View session in Datadog

Bits Code status: ✅ Done

Comment @DataDog to request changes

@btthomas
btthomas requested review from greghuels and leoromanovsky and removed request for a team October 13, 2026 13:31
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T13:32:37.829432Z 35d158f PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the area:tests unit tests, integration tests label Oct 13, 2026
@btthomas
btthomas enabled auto-merge (squash) October 13, 2026 13:32

@datadog-official datadog-official Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The send gates now control disposal completion without a shutdown-deadline race, and the completed static reviewer found no actionable regression in the assertions or cleanup. Full test execution remains unverified because the required .NET SDK is unavailable.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 35d158f

@bouwkast bouwkast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you link me the job where this failed with the one minute timer?

From what I can see in the logs the root cause appears to be threadpool starvation caused by ConcurrentSettingsUpdateAndLeaseAcquisition_ThreadSafe and the logs I've found so far are from the prior 5s timeout.

@bouwkast bouwkast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ConcurrentSettingsUpdateAndLeaseAcquisition_ThreadSafe likely needs to be moved to a non-parallel collection and can be done in a different PR (I think it is the cause of this test failing before)

@dd-trace-dotnet-ci-bot

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (9401) and master.

⚠️ Potential regressions detected

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Bailout
duration76.33 ± (76.21 - 76.58) ms83.14 ± (82.71 - 83.26) ms+8.9%❌⬆️

📄 View the full report (charts + all metrics) →

@pr-commenter

pr-commenter Bot commented Oct 13, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-10-13 14:41:48

Comparing candidate commit 35d158f in PR branch dd/exposure-flush-test-synchronization-20261013 with baseline commit 9aa3cb3 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 11 performance regressions! Performance is the same for 61 metrics, 0 unstable metrics, 74 known flaky benchmarks, 52 flaky benchmarks without significant changes.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery net472

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+10.133%; +10.144%]
  • 🟥 throughput [-28044.700op/s; -25398.516op/s] or [-7.899%; -7.154%]

scenario:Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery net6.0

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+9.750%; +9.761%]

scenario:Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+9.830%; +9.841%]
  • 🟥 throughput [-32890.982op/s; -24795.709op/s] or [-8.130%; -6.129%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net472

  • 🟥 allocated_mem [+271 bytes; +272 bytes] or [+9.338%; +9.348%]
  • 🟥 throughput [-11233.308op/s; -11028.726op/s] or [-12.824%; -12.590%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net6.0

  • 🟥 allocated_mem [+199 bytes; +200 bytes] or [+9.426%; +9.438%]
  • 🟥 throughput [-8847.623op/s; -7544.700op/s] or [-6.010%; -5.125%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync netcoreapp3.1

  • 🟥 allocated_mem [+199 bytes; +200 bytes] or [+7.569%; +7.581%]
  • 🟥 throughput [-13456.263op/s; -12272.562op/s] or [-10.678%; -9.739%]

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-9316.894op/s; -8885.318op/s] or [-11.047%; -10.535%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0

  • 🟥 throughput [-8587.729op/s; -6305.784op/s] or [-7.218%; -5.300%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild netcoreapp3.1

  • 🟥 throughput [-13338.130op/s; -12011.182op/s] or [-13.562%; -12.213%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 allocated_mem [+1.541KB; +1.541KB] or [+46.817%; +46.831%]
  • 🟥 execution_time [+306.310ms; +310.064ms] or [+152.002%; +153.865%]
  • 🟥 throughput [-55.928op/s; -51.022op/s] or [-10.063%; -9.180%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • 🟥 allocated_mem [+1.013KB; +1.013KB] or [+37.563%; +37.575%]
  • 🟥 execution_time [+380.167ms; +385.021ms] or [+300.356%; +304.190%]
  • 🟩 throughput [+62.609op/s; +67.213op/s] or [+8.255%; +8.862%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 allocated_mem [+1.088KB; +1.088KB] or [+40.343%; +40.355%]
  • 🟥 execution_time [+394.611ms; +399.025ms] or [+349.216%; +353.122%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net472

  • 🟥 allocated_mem [+4.758KB; +4.758KB] or [+100.159%; +100.174%]
  • 🟥 throughput [-64388.665op/s; -63825.288op/s] or [-50.098%; -49.659%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net6.0

  • 🟥 allocated_mem [+3.880KB; +3.880KB] or [+82.058%; +82.072%]
  • 🟩 execution_time [-15.774ms; -11.596ms] or [-7.367%; -5.416%]
  • 🟥 throughput [-61462.078op/s; -58687.595op/s] or [-44.864%; -42.839%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody netcoreapp3.1

  • 🟥 allocated_mem [+4.608KB; +4.608KB] or [+99.641%; +99.654%]
  • 🟥 throughput [-49019.703op/s; -46719.402op/s] or [-44.319%; -42.240%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net472

  • 🟥 allocated_mem [+1.380KB; +1.380KB] or [+111.648%; +111.662%]
  • 🟥 throughput [-355987.291op/s; -350057.495op/s] or [-36.348%; -35.743%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net6.0

  • 🟥 allocated_mem [+543 bytes; +544 bytes] or [+44.437%; +44.446%]
  • 🟩 execution_time [-26.223ms; -21.343ms] or [-11.694%; -9.518%]
  • 🟥 throughput [-102597.539op/s; -79402.947op/s] or [-10.961%; -8.483%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody netcoreapp3.1

  • 🟥 allocated_mem [+1.344KB; +1.344KB] or [+111.253%; +111.267%]
  • 🟥 throughput [-189554.718op/s; -166539.108op/s] or [-27.235%; -23.928%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472

  • 🟥 allocated_mem [+3.378KB; +3.378KB] or [+89.003%; +89.017%]
  • 🟥 throughput [-77395.397op/s; -76627.826op/s] or [-52.086%; -51.570%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net6.0

  • 🟥 allocated_mem [+3.336KB; +3.336KB] or [+88.150%; +88.161%]
  • 🟥 throughput [-76032.556op/s; -73145.661op/s] or [-48.378%; -46.541%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody netcoreapp3.1

  • 🟥 allocated_mem [+3.264KB; +3.264KB] or [+88.493%; +88.506%]
  • 🟥 throughput [-56462.141op/s; -53841.775op/s] or [-44.979%; -42.892%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472

  • 🟥 throughput [-360581.747op/s; -323066.026op/s] or [-10.969%; -9.828%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net6.0

  • 🟩 throughput [+230235.263op/s; +254245.524op/s] or [+7.677%; +8.478%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1

  • 🟩 execution_time [-18.838ms; -14.504ms] or [-8.684%; -6.686%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net472

  • 🟩 allocated_mem [-13.759KB; -13.757KB] or [-42.326%; -42.318%]
  • 🟥 execution_time [+300.792ms; +301.716ms] or [+150.295%; +150.757%]
  • 🟩 throughput [+719.492op/s; +817.669op/s] or [+7.947%; +9.031%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net6.0

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+300.837ms; +304.803ms] or [+151.713%; +153.713%]
  • 🟩 throughput [+2122.913op/s; +2343.776op/s] or [+16.237%; +17.926%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs netcoreapp3.1

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+301.011ms; +304.538ms] or [+151.626%; +153.403%]
  • 🟩 throughput [+1610.191op/s; +1754.425op/s] or [+15.546%; +16.938%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net472

  • 🟥 execution_time [+295.594ms; +296.504ms] or [+145.184%; +145.631%]
  • 🟩 throughput [+558.621op/s; +568.911op/s] or [+14.809%; +15.082%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0

  • 🟥 execution_time [+298.506ms; +300.844ms] or [+145.929%; +147.072%]
  • 🟩 throughput [+2793.879op/s; +2860.656op/s] or [+40.590%; +41.560%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1

  • 🟥 execution_time [+299.334ms; +300.833ms] or [+149.607%; +150.356%]
  • 🟩 throughput [+1342.742op/s; +1390.345op/s] or [+26.652%; +27.597%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472

  • 🟩 execution_time [-145.792µs; -141.860µs] or [-29.933%; -29.126%]
  • 🟩 throughput [+847.972op/s; +873.723op/s] or [+41.300%; +42.554%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net6.0

  • 🟩 execution_time [-136.913µs; -110.246µs] or [-31.401%; -25.285%]
  • 🟩 throughput [+840.091op/s; +962.487op/s] or [+36.524%; +41.845%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1

  • 🟩 execution_time [-143.744µs; -121.740µs] or [-30.798%; -26.083%]
  • 🟩 throughput [+786.732op/s; +869.737op/s] or [+36.317%; +40.149%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472

  • 🟩 execution_time [-126.904µs; -122.864µs] or [-34.263%; -33.172%]
  • 🟩 throughput [+1352.149op/s; +1396.627op/s] or [+50.077%; +51.725%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net6.0

  • 🟩 execution_time [-96.786µs; -72.941µs] or [-30.899%; -23.286%]
  • 🟩 throughput [+1069.380op/s; +1280.601op/s] or [+33.336%; +39.920%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1

  • 🟩 execution_time [-138.540µs; -116.172µs] or [-37.899%; -31.780%]
  • 🟩 throughput [+1344.297op/s; +1480.323op/s] or [+48.241%; +53.123%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.095ms; +300.088ms] or [+149.279%; +149.775%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0

  • 🟥 execution_time [+410.987ms; +418.822ms] or [+446.554%; +455.067%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest netcoreapp3.1

  • unstable execution_time [+197.352ms; +261.811ms] or [+149.848%; +198.791%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+232.491ms; +293.536ms] or [+106.897%; +134.965%]
  • 🟥 throughput [-542.554op/s; -485.457op/s] or [-49.161%; -43.987%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • unstable execution_time [+203.589ms; +336.994ms] or [+86.761%; +143.613%]
  • 🟥 throughput [-672.806op/s; -589.359op/s] or [-44.876%; -39.310%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+344.507ms; +356.444ms] or [+206.055%; +213.195%]
  • 🟥 throughput [-452.118op/s; -415.292op/s] or [-31.480%; -28.916%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net6.0

  • 🟩 execution_time [-180.959µs; -163.134µs] or [-9.167%; -8.264%]
  • 🟩 throughput [+45.827op/s; +51.233op/s] or [+9.047%; +10.114%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 allocated_mem [+96 bytes; +97 bytes] or [+12.092%; +12.103%]
  • 🟥 execution_time [+305.004ms; +307.434ms] or [+153.594%; +154.818%]
  • 🟥 throughput [-26658.892op/s; -24915.950op/s] or [-8.578%; -8.017%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net6.0

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+12.114%; +12.124%]
  • 🟥 execution_time [+302.648ms; +304.881ms] or [+151.658%; +152.777%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+12.114%; +12.124%]
  • 🟥 execution_time [+300.817ms; +304.160ms] or [+151.118%; +152.797%]
  • 🟥 throughput [-40912.229op/s; -33517.766op/s] or [-8.618%; -7.061%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+11.165%; +11.177%]
  • 🟥 execution_time [+300.328ms; +302.181ms] or [+150.815%; +151.745%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net6.0

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+12.493%; +12.506%]
  • 🟥 execution_time [+298.961ms; +301.438ms] or [+147.823%; +149.048%]
  • 🟥 throughput [-60753.583op/s; -53736.669op/s] or [-9.789%; -8.658%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+11.422%; +11.434%]
  • 🟥 execution_time [+302.545ms; +306.041ms] or [+153.343%; +155.115%]
  • 🟥 throughput [-44319.126op/s; -35910.352op/s] or [-9.570%; -7.755%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 allocated_mem [+96 bytes; +97 bytes] or [+11.197%; +11.208%]
  • 🟥 execution_time [+297.518ms; +301.474ms] or [+149.327%; +151.313%]
  • 🟥 throughput [-35302.583op/s; -32169.633op/s] or [-9.158%; -8.346%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net6.0

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+10.618%; +10.631%]
  • 🟥 execution_time [+300.896ms; +306.714ms] or [+149.969%; +152.869%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+10.618%; +10.631%]
  • 🟥 execution_time [+299.372ms; +302.145ms] or [+148.935%; +150.314%]
  • 🟥 throughput [-32654.126op/s; -27659.568op/s] or [-7.729%; -6.547%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472

  • 🟥 allocated_mem [+96 bytes; +97 bytes] or [+6.002%; +6.011%]
  • 🟥 throughput [-16701.114op/s; -15436.052op/s] or [-6.716%; -6.207%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+5.627%; +5.636%]
  • 🟩 execution_time [-16.875ms; -13.196ms] or [-7.847%; -6.136%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+5.605%; +5.617%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net472

  • unstable execution_time [-11.591µs; +30.825µs] or [-2.863%; +7.614%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net6.0

  • 🟩 allocated_mem [-19.251KB; -19.228KB] or [-7.022%; -7.014%]
  • unstable execution_time [-58.458µs; -0.599µs] or [-11.554%; -0.118%]
  • unstable throughput [+20.124op/s; +226.483op/s] or [+1.004%; +11.302%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark netcoreapp3.1

  • unstable execution_time [-106.243µs; -44.878µs] or [-18.411%; -7.777%]
  • 🟩 throughput [+179.683op/s; +351.708op/s] or [+10.266%; +20.094%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net6.0

  • 🟥 throughput [-2842.092op/s; -1189.827op/s] or [-11.964%; -5.009%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark netcoreapp3.1

  • unstable execution_time [-17.013µs; -10.101µs] or [-26.395%; -15.671%]
  • 🟩 throughput [+2726.316op/s; +4190.051op/s] or [+16.727%; +25.707%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.954ms; +302.283ms] or [+152.119%; +152.791%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+305.413ms; +308.418ms] or [+155.454%; +156.984%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 execution_time [+298.208ms; +300.623ms] or [+149.290%; +150.499%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+9.197%; +9.208%]
  • 🟥 throughput [-41917.328op/s; -40211.386op/s] or [-11.604%; -11.132%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+9.226%; +9.238%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+9.226%; +9.238%]
  • 🟥 throughput [-38031.118op/s; -29458.924op/s] or [-9.001%; -6.972%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.684ms; +302.705ms] or [+149.864%; +150.871%]
  • 🟥 throughput [-9658.473op/s; -8621.723op/s] or [-6.378%; -5.693%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net6.0

  • 🟥 allocated_mem [+96 bytes; +96 bytes] or [+6.000%; +6.010%]
  • 🟥 execution_time [+300.035ms; +302.038ms] or [+150.663%; +151.669%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+5.819%; +5.828%]
  • 🟥 execution_time [+303.412ms; +305.735ms] or [+153.871%; +155.049%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.570ms; +301.064ms] or [+149.926%; +150.173%]
  • 🟩 throughput [+61378332.684op/s; +61600161.910op/s] or [+44.700%; +44.861%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0

  • unstable execution_time [+338.081ms; +395.715ms] or [+420.464%; +492.142%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore netcoreapp3.1

  • 🟥 execution_time [+299.206ms; +300.143ms] or [+149.237%; +149.705%]
  • 🟩 throughput [+18976765.385op/s; +19919718.700op/s] or [+8.405%; +8.823%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472

  • 🟥 allocated_mem [+31 bytes; +32 bytes] or [+5.244%; +5.256%]
  • 🟥 throughput [-95348.105op/s; -90874.890op/s] or [-10.641%; -10.142%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472

  • 🟥 allocated_mem [+31 bytes; +32 bytes] or [+6.037%; +6.047%]
  • 🟥 throughput [-162063.380op/s; -155781.525op/s] or [-14.835%; -14.260%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0

  • 🟥 allocated_mem [+31 bytes; +32 bytes] or [+6.057%; +6.065%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan netcoreapp3.1

  • 🟥 allocated_mem [+31 bytes; +32 bytes] or [+6.059%; +6.069%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472

  • 🟥 throughput [-34491.920op/s; -31553.350op/s] or [-7.685%; -7.030%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+15.733%; +15.745%]
  • 🟥 throughput [-61583.773op/s; -56107.352op/s] or [-9.013%; -8.212%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+14.810%; +14.823%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+14.810%; +14.821%]
  • 🟥 throughput [-54747.322op/s; -39273.579op/s] or [-7.644%; -5.484%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net6.0
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net6.0
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1

@btthomas
btthomas merged commit 2578bcf into master Oct 13, 2026
147 of 149 checks passed
@btthomas
btthomas deleted the dd/exposure-flush-test-synchronization-20261013 branch October 13, 2026 15:03
@github-actions github-actions Bot added this to the vNext-v3 milestone Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tests unit tests, integration tests Bits AI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants