Skip to content

Fix kafka flakiness#8629

Merged
NachoEchevarria merged 2 commits into
masterfrom
nacho/fix-kafka-flaky
May 20, 2026
Merged

Fix kafka flakiness#8629
NachoEchevarria merged 2 commits into
masterfrom
nacho/fix-kafka-flaky

Conversation

@NachoEchevarria

@NachoEchevarria NachoEchevarria commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Summary of changes

Fix the DataStreamsMonitoringKafkaTests.HandlesBatchProcessing (and related) flake by making the test sample wait for Kafka metadata to propagate after topic creation, and by hardening the partition-picker in the producer helper against a transient 0 partition count.

Reason for change

The HandlesBatchProcessing test failed in CI with a Verify mismatch where every kafka_produce backlog entry collapsed onto partition:0:

- partition:1, topic:data-streams-batch-processing-1-..., type:kafka_produce
- partition:1, topic:data-streams-batch-processing-2-..., type:kafka_produce
- partition:2, topic:data-streams-batch-processing-1-..., type:kafka_produce
- partition:2, topic:data-streams-batch-processing-2-..., type:kafka_produce

The four missing entries are all producer-side backlogs for partitions 1 and 2. Consumer-side kafka_commit backlogs are present for all partitions, and the per-topic in/out DSM edges are present too — only the producer collapsed onto partition 0.

Direct confirmation in the sample's stdout — every produce went to partition [[0]]:

Produced message to: data-streams-batch-processing-1-HandlesBatchProcessing [[0]] @0
Produced message to: data-streams-batch-processing-1-HandlesBatchProcessing [[0]] @1
Produced message to: data-streams-batch-processing-1-HandlesBatchProcessing [[0]] @2
...
Produced message to: data-streams-batch-processing-2-HandlesBatchProcessing [[0]] @0
Produced message to: data-streams-batch-processing-2-HandlesBatchProcessing [[0]] @1
Produced message to: data-streams-batch-processing-2-HandlesBatchProcessing [[0]] @2

…instead of the expected [[0]], [[1]], [[2]] distribution. Topic creation took 4.2s (Finished creating topics: 0:00:04.2190968) and producing started ~1s later — well within the metadata-propagation window where AdminClient.GetMetadata can return the topic with zero partitions.

Root cause is a race in the test sample:

  1. TopicHelpers.TryCreateTopic returns as soon as Kafka acks the CreateTopics request, but broker metadata propagation can lag.
  2. Producer.GetPartition calls AdminClient.GetMetadata(topic, 5s) to learn the partition count. If metadata hasn't propagated yet, the topic comes back with zero partitions and GetTopicPartitionCount returns 0.
  3. That 0 gets cached in a static ConcurrentDictionary<string,int> for the lifetime of the sample process via GetOrAdd.
  4. With numPartitions == 0, the partition >= numPartitions guard is always true, so every subsequent produce is pinned to partition 0 — for the entire run.

This is timing-dependent (flaky, not always failing), and once it loses the race the whole run is doomed.

This is the same family of flake addressed in #7211 ("Alternative approach to fixing flaky DSM Kafka tests"), but the partition-count race in the sample wasn't covered there.

Implementation details

Two changes, both in the test sample only — no tracer code touched.

Samples.Kafka/TopicHelpers.cs — fix the root cause. After CreateTopicsAsync succeeds (or returns TopicAlreadyExists), poll GetMetadata until the topic is visible with the expected partition count, with a 30s bounded timeout. If metadata never propagates, throw a descriptive exception instead of silently returning. The original throw-on-exhausted-retries behavior is preserved.

Samples.Kafka/Producer.cs — defense in depth. GetPartition no longer caches a 0 partition count. If GetTopicPartitionCount returns 0 (shouldn't happen anymore after the TopicHelpers fix, but in case anyone calls this without going through TryCreateTopic), we fall back to partition 0 for that single call and re-query on the next produce instead of pinning the whole run.

Test coverage

Existing DataStreamsMonitoringKafkaTests cover the scenario; the failure mode this PR fixes is exactly the one observed in the failing build. No new tests added — this is a flake fix in a sample app, not a behavior change in the tracer.

Other details

  • Test sample code only; no tracer / production code changes.
  • Samples.Kafka/TopicHelpers.cs is used by every Kafka-producing sample test, so it broadly hardens that family of tests against the metadata-propagation race.

@github-actions github-actions Bot added the area:tests unit tests, integration tests label May 13, 2026
@pr-commenter

pr-commenter Bot commented May 13, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-14 14:12:43

Comparing candidate commit 8fc8077 in PR branch nacho/fix-kafka-flaky with baseline commit 9c344fa in branch master.

Some scenarios are present only in baseline or only in candidate runs. If you didn't create or remove some scenarios in your branch, this maybe a sign of crashed benchmarks 💥💥💥
Check Gitlab CI job log to find if any benchmark has crashed.

Scenarios present only in baseline:

  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net472

Found 4 performance improvements and 4 performance regressions! Performance is the same for 47 metrics, 17 unstable metrics, 85 known flaky benchmarks, 41 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.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartActiveSpan net6.0

  • 🟥 throughput [-26871.898op/s; -11215.825op/s] or [-14.808%; -6.181%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartRootSpan net6.0

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-9.188%; -9.180%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartSpan net6.0

  • 🟩 allocated_mem [-96 bytes; -95 bytes] or [-6.126%; -6.119%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net472

  • 🟥 throughput [-5421.243op/s; -4600.452op/s] or [-6.189%; -5.252%]

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

  • 🟥 throughput [-75541.050op/s; -68508.241op/s] or [-51.316%; -46.539%]
  • 🟩 execution_time [-31.367ms; -16.177ms] or [-15.566%; -8.028%]

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

  • 🟥 throughput [-40919.517op/s; -35842.094op/s] or [-20.517%; -17.971%]
  • 🟩 execution_time [-88.123ms; -82.664ms] or [-44.567%; -41.805%]

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.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net6.0

  • unstable execution_time [-5.885ms; +17.625ms] or [-4.293%; +12.856%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan netcoreapp3.1

  • unstable execution_time [+8.989ms; +34.325ms] or [+9.882%; +37.733%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0

  • unstable execution_time [-36.657ms; -2.101ms] or [-24.771%; -1.420%]
  • unstable throughput [-2171.166op/s; +19687.446op/s] or [-1.411%; +12.795%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0

  • unstable execution_time [-0.839ms; +27.870ms] or [-0.600%; +19.932%]
  • unstable throughput [-38212.471op/s; -17851.843op/s] or [-19.958%; -9.324%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1

  • unstable execution_time [-18.833ms; +16.611ms] or [-16.862%; +14.872%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0

  • unstable execution_time [-32.739ms; -4.726ms] or [-21.045%; -3.038%]
  • unstable throughput [+1251.140op/s; +16727.533op/s] or [+0.952%; +12.724%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1

  • unstable execution_time [-0.061ms; +39.576ms] or [-0.053%; +34.492%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0

  • unstable execution_time [+0.774ms; +48.740ms] or [+0.539%; +33.939%]
  • unstable throughput [-21799.088op/s; +10496.665op/s] or [-12.170%; +5.860%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1

  • unstable execution_time [+12.652ms; +38.470ms] or [+14.647%; +44.535%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0

  • unstable execution_time [-40.079ms; -2.217ms] or [-22.534%; -1.246%]
  • unstable throughput [-3379.548op/s; +28776.998op/s] or [-2.086%; +17.759%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+10.108%; +10.117%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1

  • unstable execution_time [-41.017ms; -2.070ms] or [-30.741%; -1.552%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0

  • unstable execution_time [+10.627ms; +27.242ms] or [+8.458%; +21.681%]
  • 🟥 throughput [-28399.170op/s; -16092.542op/s] or [-17.985%; -10.191%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1

  • unstable execution_time [-19.847ms; +15.390ms] or [-17.727%; +13.746%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0

  • unstable execution_time [-14.111ms; +10.984ms] or [-10.165%; +7.912%]
  • unstable throughput [-11109.325op/s; +11360.804op/s] or [-6.909%; +7.066%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1

  • unstable execution_time [-61.374ms; -29.610ms] or [-46.294%; -22.335%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-5.210%; -5.202%]
  • unstable execution_time [-38.330ms; -15.932ms] or [-26.762%; -11.124%]
  • unstable throughput [+12369.800op/s; +30873.936op/s] or [+12.023%; +30.008%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1

  • unstable execution_time [+7.937ms; +35.153ms] or [+9.037%; +40.026%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-6.927%; -6.920%]
  • unstable execution_time [-28.091ms; -8.725ms] or [-17.629%; -5.476%]
  • unstable throughput [+4223.299op/s; +17995.838op/s] or [+3.669%; +15.635%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1

  • unstable execution_time [+13.144ms; +38.161ms] or [+14.780%; +42.910%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+9.570%; +9.578%]
  • unstable execution_time [+21.669ms; +42.470ms] or [+17.609%; +34.514%]
  • unstable throughput [-51240.437op/s; -26973.478op/s] or [-29.502%; -15.530%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0

  • unstable execution_time [-63.488ms; -25.670ms] or [-37.675%; -15.233%]
  • unstable throughput [+14597.809op/s; +41163.155op/s] or [+9.701%; +27.356%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-12400.360op/s; -10954.953op/s] or [-14.703%; -12.989%]

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

  • unstable execution_time [-55.146ms; -30.205ms] or [-27.512%; -15.069%]
  • unstable throughput [-40170.946op/s; -25333.092op/s] or [-33.765%; -21.293%]

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

  • unstable execution_time [-92.445ms; -69.305ms] or [-46.497%; -34.858%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+316.468ms; +331.894ms] or [+157.043%; +164.698%]
  • 🟥 throughput [-55.848op/s; -43.483op/s] or [-10.048%; -7.823%]

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

  • 🟥 execution_time [+96.616ms; +98.201ms] or [+76.333%; +77.585%]
  • 🟩 throughput [+96.001op/s; +101.770op/s] or [+12.657%; +13.418%]

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

  • 🟥 execution_time [+83.360ms; +86.958ms] or [+73.771%; +76.955%]

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

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.528%; +27.540%]

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

  • 🟥 allocated_mem [+439 bytes; +440 bytes] or [+9.299%; +9.310%]
  • 🟩 execution_time [-63.125ms; -43.182ms] or [-29.481%; -20.167%]
  • 🟥 throughput [-22099.796op/s; -8436.868op/s] or [-16.132%; -6.158%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.500%; +27.510%]
  • 🟩 execution_time [-60.501ms; -41.116ms] or [-28.810%; -19.579%]

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

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.743%; +105.758%]
  • 🟥 throughput [-271521.871op/s; -266985.423op/s] or [-27.724%; -27.261%]

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

  • 🟥 allocated_mem [+439 bytes; +440 bytes] or [+35.945%; +35.954%]
  • 🟩 execution_time [-115.400ms; -110.534ms] or [-51.464%; -49.293%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.288%; +105.304%]
  • 🟩 execution_time [-74.793ms; -55.773ms] or [-37.334%; -27.840%]
  • 🟥 throughput [-131820.328op/s; -114838.082op/s] or [-18.940%; -16.500%]

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

  • 🟩 execution_time [-42.446ms; -23.868ms] or [-21.416%; -12.043%]

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

  • 🟩 execution_time [-58.290ms; -42.588ms] or [-29.718%; -21.713%]
  • 🟩 throughput [+8798.241op/s; +11565.302op/s] or [+7.009%; +9.213%]

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

  • unstable execution_time [-68.774ms; -48.232ms] or [-34.004%; -23.847%]
  • unstable throughput [-29310.489op/s; +289816.128op/s] or [-0.977%; +9.664%]

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

  • unstable execution_time [-63.918ms; -39.006ms] or [-29.464%; -17.981%]
  • 🟩 throughput [+168705.927op/s; +222959.064op/s] or [+6.696%; +8.850%]

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

  • 🟥 execution_time [+301.954ms; +315.744ms] or [+150.876%; +157.767%]

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

  • 🟥 execution_time [+130.254ms; +136.615ms] or [+65.687%; +68.895%]

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

  • unstable execution_time [+256.214ms; +293.785ms] or [+129.061%; +147.986%]

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

  • 🟥 execution_time [+297.470ms; +311.203ms] or [+146.105%; +152.850%]

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

  • 🟥 execution_time [+238.607ms; +245.707ms] or [+116.646%; +120.117%]

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

  • 🟥 execution_time [+269.565ms; +283.846ms] or [+134.728%; +141.866%]

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

  • 🟥 execution_time [+17.503µs; +41.115µs] or [+5.588%; +13.126%]
  • 🟥 throughput [-387.581op/s; -188.850op/s] or [-12.082%; -5.887%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+300.104ms; +301.935ms] or [+149.783%; +150.696%]

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

  • unstable execution_time [+368.976ms; +388.080ms] or [+400.908%; +421.664%]
  • 🟥 throughput [-7023.034op/s; -6815.352op/s] or [-57.709%; -56.003%]

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

  • unstable execution_time [+260.334ms; +306.877ms] or [+197.669%; +233.009%]
  • 🟥 throughput [-1281.021op/s; -1044.151op/s] or [-12.401%; -10.108%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+300.724ms; +314.558ms] or [+138.270%; +144.631%]
  • 🟥 throughput [-684.466op/s; -667.993op/s] or [-62.019%; -60.527%]

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

  • unstable execution_time [-61.178ms; +72.502ms] or [-26.072%; +30.897%]
  • 🟥 throughput [-687.273op/s; -597.900op/s] or [-45.841%; -39.880%]

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

  • 🟥 allocated_mem [+2.305KB; +2.308KB] or [+5.442%; +5.450%]
  • 🟥 execution_time [+342.554ms; +351.514ms] or [+204.887%; +210.246%]
  • 🟥 throughput [-724.853op/s; -690.766op/s] or [-50.470%; -48.097%]

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

  • 🟩 execution_time [-220.271µs; -202.711µs] or [-11.158%; -10.269%]
  • 🟩 throughput [+58.171op/s; +63.738op/s] or [+11.483%; +12.582%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+303.413ms; +315.998ms] or [+152.793%; +159.131%]

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

  • 🟥 execution_time [+257.291ms; +272.939ms] or [+128.929%; +136.770%]

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

  • 🟥 execution_time [+301.695ms; +308.733ms] or [+151.559%; +155.095%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+303.277ms; +314.198ms] or [+152.296%; +157.780%]

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

  • unstable execution_time [+214.219ms; +235.581ms] or [+105.922%; +116.484%]

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

  • 🟥 execution_time [+297.959ms; +305.420ms] or [+151.019%; +154.801%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+305.271ms; +319.909ms] or [+153.219%; +160.565%]

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

  • 🟥 execution_time [+304.832ms; +311.893ms] or [+151.931%; +155.450%]
  • 🟩 throughput [+44222.815op/s; +54685.708op/s] or [+8.781%; +10.859%]

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

  • 🟥 execution_time [+301.014ms; +308.421ms] or [+149.752%; +153.437%]

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

  • unstable execution_time [-87.965ms; -60.600ms] or [-40.904%; -28.180%]
  • unstable throughput [-101759.254op/s; -52782.832op/s] or [-27.915%; -14.480%]

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

  • unstable execution_time [-87.502ms; -65.119ms] or [-43.892%; -32.664%]

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

  • 🟩 allocated_mem [-19.356KB; -19.332KB] or [-7.061%; -7.052%]
  • unstable execution_time [-67.075µs; -10.890µs] or [-13.257%; -2.152%]
  • unstable throughput [+61.144op/s; +264.520op/s] or [+3.051%; +13.200%]

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

  • unstable execution_time [-90.266µs; -31.627µs] or [-15.643%; -5.481%]
  • 🟩 throughput [+120.889op/s; +284.505op/s] or [+6.907%; +16.254%]

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

  • unstable execution_time [+2.442µs; +7.597µs] or [+5.771%; +17.957%]
  • 🟥 throughput [-3325.333op/s; -1255.918op/s] or [-13.999%; -5.287%]

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

  • unstable execution_time [-13.556µs; -3.866µs] or [-21.031%; -5.999%]
  • unstable throughput [+1264.080op/s; +3272.344op/s] or [+7.756%; +20.077%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.442ms; +316.249ms] or [+152.871%; +159.850%]

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

  • unstable execution_time [+280.513ms; +301.088ms] or [+142.780%; +153.253%]

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

  • 🟥 execution_time [+301.193ms; +305.462ms] or [+150.784%; +152.922%]

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

  • unstable throughput [-260187.356op/s; -188412.152op/s] or [-49.248%; -35.662%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+301.130ms; +314.479ms] or [+150.086%; +156.740%]

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

  • unstable execution_time [+252.785ms; +283.968ms] or [+126.936%; +142.595%]

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

  • 🟥 execution_time [+305.874ms; +312.116ms] or [+155.120%; +158.285%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.661ms; +301.424ms] or [+149.971%; +150.352%]
  • 🟩 throughput [+64693450.152op/s; +65021332.347op/s] or [+47.114%; +47.353%]

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

  • unstable execution_time [+373.177ms; +387.316ms] or [+464.112%; +481.696%]
  • 🟥 throughput [-7328.622op/s; -7111.639op/s] or [-56.654%; -54.976%]

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

  • 🟥 execution_time [+298.168ms; +300.921ms] or [+148.719%; +150.092%]
  • 🟥 throughput [-18470772.037op/s; -17058130.726op/s] or [-8.181%; -7.556%]

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

  • 🟩 execution_time [-97.032ms; -76.666ms] or [-47.525%; -37.550%]
  • unstable throughput [-85288.904op/s; +37495.558op/s] or [-7.963%; +3.501%]

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

  • 🟩 execution_time [-97.369ms; -92.973ms] or [-49.270%; -47.045%]

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

  • unstable execution_time [-82.512ms; -62.220ms] or [-42.989%; -32.417%]
  • unstable throughput [-112493.248op/s; +34636.022op/s] or [-8.707%; +2.681%]

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

  • unstable execution_time [-77.392ms; -50.177ms] or [-38.024%; -24.653%]
  • 🟩 throughput [+88968.361op/s; +98868.783op/s] or [+8.836%; +9.819%]

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

  • unstable execution_time [-57.329ms; -26.691ms] or [-28.630%; -13.330%]
  • unstable throughput [-159592.965op/s; -74916.485op/s] or [-28.979%; -13.603%]

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

  • unstable execution_time [-86.770ms; -65.008ms] or [-43.596%; -32.663%]

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

  • unstable execution_time [-51.307ms; -14.255ms] or [-25.663%; -7.130%]
  • unstable throughput [-317724.792op/s; -165357.246op/s] or [-35.498%; -18.475%]

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

  • unstable execution_time [-54.148ms; -25.686ms] or [-27.501%; -13.046%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • 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_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • 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_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • 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 netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack 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.ILoggerBenchmark.EnrichedLog net472
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net472
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472

@NachoEchevarria NachoEchevarria added the AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos label May 14, 2026
@NachoEchevarria NachoEchevarria marked this pull request as ready for review May 14, 2026 11:54
@NachoEchevarria NachoEchevarria requested review from a team as code owners May 14, 2026 11:54

@andrewlock andrewlock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

// see a topic with zero partitions.
if (!await WaitForTopicMetadata(topicName, numPartitions, config, TimeSpan.FromSeconds(30)))
{
throw new Exception($"Topic {topicName} metadata did not propagate with {numPartitions} partitions");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If this is thrown, it's infra flake, right, so should we actually catch this in the sample and exit with our special "flake" exit code if so? what do you think? 🤔

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Nice catch! Thanks! Added!

@dd-trace-dotnet-ci-bot

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

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

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration72.47 ± (72.47 - 72.81) ms74.55 ± (74.50 - 75.03) ms+2.9%✅⬆️
.NET Framework 4.8 - Bailout
duration76.56 ± (76.54 - 76.90) ms77.63 ± (77.58 - 78.03) ms+1.4%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1093.34 ± (1092.53 - 1098.09) ms1098.29 ± (1095.92 - 1103.20) ms+0.5%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.39 ± (22.35 - 22.44) ms22.65 ± (22.59 - 22.70) ms+1.1%✅⬆️
process.time_to_main_ms83.83 ± (83.62 - 84.03) ms85.89 ± (85.60 - 86.18) ms+2.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.90 ± (10.90 - 10.91) MB10.92 ± (10.92 - 10.92) MB+0.2%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.57 ± (22.51 - 22.62) ms22.26 ± (22.22 - 22.30) ms-1.3%
process.time_to_main_ms87.32 ± (87.01 - 87.62) ms85.73 ± (85.53 - 85.94) ms-1.8%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.94 ± (10.93 - 10.94) MB10.96 ± (10.96 - 10.97) MB+0.2%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms211.80 ± (210.95 - 212.65) ms211.19 ± (210.23 - 212.14) ms-0.3%
process.time_to_main_ms537.76 ± (536.41 - 539.10) ms536.36 ± (534.78 - 537.93) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.43 ± (48.39 - 48.46) MB48.28 ± (48.24 - 48.32) MB-0.3%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 6 - Baseline
process.internal_duration_ms21.30 ± (21.26 - 21.34) ms21.22 ± (21.19 - 21.26) ms-0.4%
process.time_to_main_ms73.81 ± (73.63 - 73.99) ms73.78 ± (73.60 - 73.96) ms-0.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.63 ± (10.63 - 10.64) MB10.66 ± (10.65 - 10.66) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.20 ± (21.16 - 21.24) ms21.05 ± (21.02 - 21.09) ms-0.7%
process.time_to_main_ms74.75 ± (74.58 - 74.93) ms74.70 ± (74.54 - 74.86) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.75 ± (10.74 - 10.75) MB10.77 ± (10.76 - 10.77) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms375.90 ± (373.83 - 377.97) ms378.24 ± (376.00 - 380.47) ms+0.6%✅⬆️
process.time_to_main_ms542.86 ± (541.30 - 544.42) ms538.61 ± (537.28 - 539.95) ms-0.8%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.73 ± (49.70 - 49.76) MB49.93 ± (49.91 - 49.95) MB+0.4%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.1%
.NET 8 - Baseline
process.internal_duration_ms19.63 ± (19.57 - 19.69) ms19.78 ± (19.72 - 19.85) ms+0.8%✅⬆️
process.time_to_main_ms74.56 ± (74.26 - 74.85) ms75.24 ± (74.91 - 75.57) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.69 ± (7.68 - 7.69) MB7.68 ± (7.68 - 7.68) MB-0.1%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.39 ± (19.35 - 19.43) ms19.55 ± (19.50 - 19.59) ms+0.8%✅⬆️
process.time_to_main_ms73.53 ± (73.34 - 73.73) ms74.73 ± (74.50 - 74.96) ms+1.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.72 ± (7.71 - 7.72) MB7.73 ± (7.72 - 7.73) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms292.31 ± (290.21 - 294.40) ms296.20 ± (294.02 - 298.38) ms+1.3%✅⬆️
process.time_to_main_ms496.16 ± (495.02 - 497.30) ms497.25 ± (496.09 - 498.42) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.91 ± (36.88 - 36.94) MB37.00 ± (36.97 - 37.03) MB+0.2%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.2%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration198.82 ± (198.63 - 199.62) ms199.64 ± (199.17 - 200.16) ms+0.4%✅⬆️
.NET Framework 4.8 - Bailout
duration203.89 ± (203.56 - 204.57) ms202.86 ± (202.71 - 203.69) ms-0.5%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1199.24 ± (1200.43 - 1206.78) ms1198.05 ± (1198.35 - 1203.94) ms-0.1%
.NET Core 3.1 - Baseline
process.internal_duration_ms195.00 ± (194.54 - 195.47) ms194.18 ± (193.65 - 194.71) ms-0.4%
process.time_to_main_ms84.08 ± (83.79 - 84.36) ms83.53 ± (83.24 - 83.81) ms-0.7%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.03 ± (16.01 - 16.05) MB16.06 ± (16.04 - 16.08) MB+0.2%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.1%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms194.54 ± (193.98 - 195.10) ms194.11 ± (193.59 - 194.62) ms-0.2%
process.time_to_main_ms85.36 ± (85.12 - 85.60) ms84.87 ± (84.60 - 85.15) ms-0.6%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.11 ± (16.09 - 16.13) MB16.06 ± (16.03 - 16.08) MB-0.3%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)+0.9%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms388.26 ± (386.86 - 389.66) ms390.57 ± (389.30 - 391.84) ms+0.6%✅⬆️
process.time_to_main_ms538.01 ± (536.65 - 539.38) ms536.41 ± (535.13 - 537.68) ms-0.3%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.98 ± (57.75 - 58.21) MB57.84 ± (57.63 - 58.06) MB-0.2%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms199.85 ± (199.39 - 200.30) ms201.66 ± (201.16 - 202.17) ms+0.9%✅⬆️
process.time_to_main_ms73.31 ± (73.05 - 73.57) ms73.96 ± (73.63 - 74.29) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.29 ± (16.25 - 16.32) MB16.31 ± (16.29 - 16.33) MB+0.2%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.8%
.NET 6 - Bailout
process.internal_duration_ms198.52 ± (198.17 - 198.86) ms200.52 ± (200.10 - 200.95) ms+1.0%✅⬆️
process.time_to_main_ms74.04 ± (73.84 - 74.24) ms74.31 ± (74.06 - 74.57) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.35 ± (16.32 - 16.38) MB16.36 ± (16.34 - 16.39) MB+0.1%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.6%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms592.11 ± (589.13 - 595.09) ms592.07 ± (589.16 - 594.98) ms-0.0%
process.time_to_main_ms534.39 ± (533.32 - 535.45) ms538.79 ± (537.71 - 539.88) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.20 ± (61.10 - 61.30) MB61.30 ± (61.19 - 61.40) MB+0.2%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.3%
.NET 8 - Baseline
process.internal_duration_ms195.26 ± (194.79 - 195.74) ms197.61 ± (197.16 - 198.07) ms+1.2%✅⬆️
process.time_to_main_ms71.46 ± (71.24 - 71.67) ms72.37 ± (72.16 - 72.59) ms+1.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.73 ± (11.71 - 11.74) MB11.68 ± (11.67 - 11.70) MB-0.4%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)+0.3%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms195.40 ± (194.90 - 195.91) ms196.92 ± (196.37 - 197.47) ms+0.8%✅⬆️
process.time_to_main_ms72.55 ± (72.35 - 72.74) ms73.72 ± (73.50 - 73.94) ms+1.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.76 ± (11.74 - 11.77) MB11.76 ± (11.74 - 11.78) MB-0.0%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.5%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms514.61 ± (511.73 - 517.48) ms513.44 ± (511.04 - 515.83) ms-0.2%
process.time_to_main_ms491.11 ± (490.18 - 492.04) ms493.15 ± (492.13 - 494.17) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.69 ± (50.66 - 50.72) MB50.63 ± (50.60 - 50.67) MB-0.1%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.7%✅⬆️
Comparison explanation

Execution-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:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

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 charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8629) - mean (75ms)  : 71, 79
    master - mean (73ms)  : 70, 75

    section Bailout
    This PR (8629) - mean (78ms)  : 74, 81
    master - mean (77ms)  : 75, 79

    section CallTarget+Inlining+NGEN
    This PR (8629) - mean (1,100ms)  : 1045, 1154
    master - mean (1,095ms)  : 1055, 1136

Loading
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 (8629) - mean (116ms)  : 109, 122
    master - mean (113ms)  : 110, 116

    section Bailout
    This PR (8629) - mean (115ms)  : 112, 117
    master - mean (117ms)  : 111, 122

    section CallTarget+Inlining+NGEN
    This PR (8629) - mean (784ms)  : 758, 809
    master - mean (787ms)  : 764, 811

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8629) - mean (101ms)  : 98, 105
    master - mean (101ms)  : 98, 105

    section Bailout
    This PR (8629) - mean (102ms)  : 99, 105
    master - mean (102ms)  : 100, 105

    section CallTarget+Inlining+NGEN
    This PR (8629) - mean (951ms)  : 901, 1000
    master - mean (952ms)  : 908, 995

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8629) - mean (103ms)  : 97, 110
    master - mean (102ms)  : 96, 109

    section Bailout
    This PR (8629) - mean (102ms)  : 98, 106
    master - mean (101ms)  : 98, 103

    section CallTarget+Inlining+NGEN
    This PR (8629) - mean (824ms)  : 789, 858
    master - mean (821ms)  : 781, 861

Loading
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 (8629) - mean (200ms)  : 193, 206
    master - mean (199ms)  : 192, 206

    section Bailout
    This PR (8629) - mean (203ms)  : 198, 208
    master - mean (204ms)  : 199, 209

    section CallTarget+Inlining+NGEN
    This PR (8629) - mean (1,201ms)  : 1162, 1240
    master - mean (1,204ms)  : 1158, 1250

Loading
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 (8629) - mean (287ms)  : 279, 294
    master - mean (288ms)  : 279, 297

    section Bailout
    This PR (8629) - mean (288ms)  : 280, 296
    master - mean (289ms)  : 281, 298

    section CallTarget+Inlining+NGEN
    This PR (8629) - mean (969ms)  : 949, 989
    master - mean (966ms)  : 938, 994

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8629) - mean (284ms)  : 277, 291
    master - mean (282ms)  : 276, 288

    section Bailout
    This PR (8629) - mean (283ms)  : 278, 289
    master - mean (281ms)  : 277, 286

    section CallTarget+Inlining+NGEN
    This PR (8629) - mean (1,166ms)  : 1120, 1211
    master - mean (1,157ms)  : 1116, 1198

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8629) - mean (281ms)  : 271, 290
    master - mean (277ms)  : 267, 286

    section Bailout
    This PR (8629) - mean (281ms)  : 275, 287
    master - mean (278ms)  : 268, 288

    section CallTarget+Inlining+NGEN
    This PR (8629) - mean (1,039ms)  : 996, 1083
    master - mean (1,039ms)  : 981, 1097

Loading

@NachoEchevarria NachoEchevarria merged commit 05f3138 into master May 20, 2026
138 checks passed
@NachoEchevarria NachoEchevarria deleted the nacho/fix-kafka-flaky branch May 20, 2026 09:20
@github-actions github-actions Bot added this to the vNext-v3 milestone May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos area:tests unit tests, integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants