Skip to content

Add handling of OutOfMemoryException to runtime metrics polyfill#8609

Merged
andrewlock merged 2 commits into
masterfrom
andrew/handle-oom-in-polyfill
May 12, 2026
Merged

Add handling of OutOfMemoryException to runtime metrics polyfill#8609
andrewlock merged 2 commits into
masterfrom
andrew/handle-oom-in-polyfill

Conversation

@andrewlock

Copy link
Copy Markdown
Member

Summary of changes

Adds explicit handling of OutOfMemoryException to runtime metrics polyfill added in #8457

Reason for change

Doing anything when you have an OutOfMemoryException is liable to cause allocation, and trigger a full-on crash. We have guards for this today in RuntimeMetricsWriter, so we should probably do something similar with our pollyfill too.

Implementation details

  • Add an explicit guard to the handler for OutOfMemoryException
  • Use try-finally to ensure we definitely reset _handlingFirstChanceException

Test coverage

Not easy to test in practice, and relatively self explanatory so meh

@andrewlock andrewlock requested a review from a team as a code owner May 12, 2026 10:50
@github-actions github-actions Bot added the area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) label May 12, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 347590c5f5

ℹ️ 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".

Comment on lines +283 to +287
if (e.Exception is OutOfMemoryException)
{
// We have a special path for OOM because we can't allocate
// Doing anything here is liable to throw exceptions
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Count OOM exceptions instead of dropping them

On .NET 6-8, this polyfill is the source of the OpenTelemetry dotnet.exceptions runtime metric, but this fast path returns before recording anything for OutOfMemoryException. The existing runtime metrics writer handles the same low-memory case by incrementing a preallocated counter (RuntimeMetricsWriter.FirstChanceException), so after this change OOM throws become invisible only for the polyfilled System.Runtime meter even though the instrument is documented here as counting exceptions thrown in managed code. Please keep an allocation-safe count/tag for OOMs rather than skipping them.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

But what are we supposed to do with that count eh? eh AI? What do you say to that? Also, you wrote this yourself, so don't give me any of that sass

@pr-commenter

pr-commenter Bot commented May 12, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-12 14:39:04

Comparing candidate commit d054d9b in PR branch andrew/handle-oom-in-polyfill with baseline commit d9fd663 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.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0

Found 3 performance improvements and 4 performance regressions! Performance is the same for 49 metrics, 16 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.StartRootSpan net6.0

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+6.518%; +6.526%]

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

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

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

  • 🟥 throughput [-73223.677op/s; -66216.821op/s] or [-49.742%; -44.982%]
  • 🟩 execution_time [-32.253ms; -17.033ms] or [-16.005%; -8.452%]

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

  • 🟩 execution_time [-98.905ms; -96.990ms] or [-49.393%; -48.436%]

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

  • 🟥 throughput [-72909.414op/s; -54361.894op/s] or [-36.557%; -27.257%]

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

  • 🟩 execution_time [-94.858ms; -92.108ms] or [-48.275%; -46.876%]

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 [+26.820ms; +45.715ms] or [+22.107%; +37.681%]
  • 🟥 throughput [-46527.353op/s; -27329.479op/s] or [-23.847%; -14.008%]

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

  • unstable execution_time [+8.135ms; +33.021ms] or [+8.920%; +36.210%]

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

  • unstable execution_time [-9.668ms; +29.132ms] or [-6.117%; +18.433%]
  • unstable throughput [-15591.120op/s; +10963.039op/s] or [-11.423%; +8.032%]

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

  • unstable execution_time [+7.073ms; +31.790ms] or [+7.697%; +34.596%]

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

  • unstable execution_time [-6.992ms; +17.515ms] or [-5.024%; +12.585%]
  • unstable throughput [-63868.558op/s; -26645.882op/s] or [-32.077%; -13.382%]

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

  • unstable execution_time [-39.554ms; +0.377ms] or [-29.649%; +0.282%]

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

  • unstable execution_time [-4.580ms; +31.219ms] or [-2.852%; +19.440%]
  • unstable throughput [-18526.345op/s; +2878.140op/s] or [-14.725%; +2.288%]

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

  • unstable execution_time [+12.199ms; +31.692ms] or [+10.087%; +26.205%]
  • 🟥 throughput [-30148.412op/s; -11670.389op/s] or [-15.397%; -5.960%]

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

  • unstable execution_time [-18935.730µs; +17731.526µs] or [-17.196%; +16.103%]

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

  • unstable execution_time [-11.671ms; +18.210ms] or [-7.682%; +11.986%]
  • unstable throughput [-5451.293op/s; +21242.264op/s] or [-3.217%; +12.536%]

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

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-9.188%; -9.180%]
  • unstable execution_time [+28.213ms; +61.955ms] or [+23.068%; +50.657%]
  • unstable throughput [-45283.979op/s; -22548.284op/s] or [-24.788%; -12.343%]

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

  • unstable execution_time [-51.021ms; -14.231ms] or [-30.266%; -8.442%]
  • unstable throughput [+3735.757op/s; +27431.082op/s] or [+2.929%; +21.505%]

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

  • unstable execution_time [-21.439ms; +31.075ms] or [-11.180%; +16.206%]
  • unstable throughput [-24806.184op/s; +9200.319op/s] or [-19.575%; +7.260%]

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

  • unstable execution_time [-33.544ms; -9.873ms] or [-30.499%; -8.977%]

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

  • unstable execution_time [-19.839ms; -2.365ms] or [-17.435%; -2.078%]
  • unstable throughput [+2507.007op/s; +20162.075op/s] or [+1.966%; +15.814%]

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

  • unstable execution_time [-37.218ms; -11.114ms] or [-33.834%; -10.104%]

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 [-27.448ms; +11.735ms] or [-15.970%; +6.828%]
  • unstable throughput [-9922.846op/s; +9156.516op/s] or [-8.890%; +8.204%]

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

  • unstable execution_time [+10.336ms; +34.627ms] or [+11.312%; +37.897%]

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 [-24.568ms; +1.686ms] or [-16.094%; +1.105%]
  • unstable throughput [-19209.821op/s; -1394.681op/s] or [-12.568%; -0.912%]

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

  • unstable execution_time [+11.097ms; +36.578ms] or [+12.740%; +41.993%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+6.518%; +6.526%]
  • unstable execution_time [-6.863ms; +31.557ms] or [-4.943%; +22.725%]
  • unstable throughput [-19666.304op/s; +6732.844op/s] or [-11.846%; +4.056%]

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

  • unstable execution_time [+2.038ms; +41.258ms] or [+1.817%; +36.780%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-7715.432op/s; -6712.816op/s] or [-9.148%; -7.959%]

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

  • 🟩 execution_time [-61.280ms; -44.193ms] or [-30.573%; -22.048%]
  • 🟥 throughput [-49594.805op/s; -39813.744op/s] or [-41.686%; -33.465%]

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

  • unstable execution_time [-51.561ms; -23.751ms] or [-25.933%; -11.946%]
  • 🟥 throughput [-9530.502op/s; -7437.968op/s] or [-9.690%; -7.563%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+316.031ms; +331.511ms] or [+156.826%; +164.507%]
  • 🟥 throughput [-55.467op/s; -43.052op/s] or [-9.980%; -7.746%]

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

  • 🟥 execution_time [+97.516ms; +98.635ms] or [+77.043%; +77.928%]
  • 🟩 throughput [+94.159op/s; +98.397op/s] or [+12.415%; +12.973%]

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

  • 🟥 execution_time [+83.019ms; +84.320ms] or [+73.469%; +74.620%]

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 [-64.823ms; -46.422ms] or [-30.274%; -21.681%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.500%; +27.510%]
  • 🟩 execution_time [-31.979ms; -15.033ms] or [-15.228%; -7.158%]

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

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.743%; +105.758%]
  • 🟥 throughput [-259170.417op/s; -253891.866op/s] or [-26.463%; -25.924%]

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

  • 🟥 allocated_mem [+439 bytes; +440 bytes] or [+35.945%; +35.954%]
  • 🟩 execution_time [-113.706ms; -108.789ms] or [-50.708%; -48.515%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.288%; +105.304%]
  • unstable execution_time [-78.819ms; -58.499ms] or [-39.343%; -29.200%]
  • 🟥 throughput [-144895.086op/s; -128477.119op/s] or [-20.819%; -18.460%]

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

  • 🟥 throughput [-46434.333op/s; -32571.577op/s] or [-29.545%; -20.725%]

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

  • unstable execution_time [-47.665ms; -27.857ms] or [-24.301%; -14.202%]
  • 🟩 throughput [+9664.961op/s; +12373.978op/s] or [+7.699%; +9.857%]

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

  • unstable execution_time [-42.514ms; -19.285ms] or [-21.020%; -9.535%]
  • unstable throughput [-334929.569op/s; +50195.193op/s] or [-11.168%; +1.674%]

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

  • unstable execution_time [-65.559ms; -39.850ms] or [-30.221%; -18.369%]
  • 🟩 throughput [+171407.259op/s; +226854.987op/s] or [+6.804%; +9.004%]

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

  • 🟥 execution_time [+301.115ms; +315.041ms] or [+150.457%; +157.415%]

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

  • unstable execution_time [+175.282ms; +221.764ms] or [+88.395%; +111.836%]

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

  • 🟥 execution_time [+299.253ms; +305.706ms] or [+150.740%; +153.991%]

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

  • 🟥 execution_time [+297.896ms; +311.518ms] or [+146.315%; +153.005%]

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

  • 🟥 execution_time [+224.839ms; +233.751ms] or [+109.916%; +114.272%]

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

  • 🟥 execution_time [+272.170ms; +285.803ms] or [+136.030%; +142.844%]

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

  • 🟥 execution_time [+20.021µs; +43.633µs] or [+6.392%; +13.930%]
  • 🟥 throughput [-408.885op/s; -210.161op/s] or [-12.746%; -6.551%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+300.145ms; +300.899ms] or [+149.803%; +150.180%]

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

  • unstable execution_time [+370.825ms; +395.321ms] or [+402.916%; +429.532%]
  • 🟥 throughput [-7076.561op/s; -6822.816op/s] or [-58.149%; -56.064%]

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

  • unstable execution_time [+302.891ms; +348.309ms] or [+229.982%; +264.467%]
  • 🟥 throughput [-1274.050op/s; -1046.730op/s] or [-12.334%; -10.133%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+298.819ms; +314.215ms] or [+137.394%; +144.473%]
  • 🟥 throughput [-683.703op/s; -666.520op/s] or [-61.950%; -60.393%]

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

  • unstable execution_time [-52.795ms; +80.999ms] or [-22.499%; +34.518%]
  • 🟥 throughput [-702.679op/s; -611.851op/s] or [-46.869%; -40.811%]

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

  • 🟥 allocated_mem [+2.305KB; +2.308KB] or [+5.442%; +5.450%]
  • 🟥 execution_time [+338.578ms; +347.059ms] or [+202.509%; +207.581%]
  • 🟥 throughput [-725.087op/s; -691.010op/s] or [-50.487%; -48.114%]

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

  • 🟩 execution_time [-223.833µs; -211.688µs] or [-11.339%; -10.723%]
  • 🟩 throughput [+60.953op/s; +64.823op/s] or [+12.033%; +12.797%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+303.831ms; +317.066ms] or [+153.003%; +159.668%]

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

  • 🟥 execution_time [+264.920ms; +284.262ms] or [+132.752%; +142.444%]

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

  • 🟥 execution_time [+302.340ms; +309.481ms] or [+151.883%; +155.470%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+302.859ms; +316.873ms] or [+152.085%; +159.123%]

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

  • unstable execution_time [+164.390ms; +212.705ms] or [+81.284%; +105.173%]

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

  • 🟥 execution_time [+299.591ms; +307.077ms] or [+151.846%; +155.640%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+304.333ms; +318.499ms] or [+152.748%; +159.858%]

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

  • 🟥 execution_time [+305.808ms; +314.125ms] or [+152.417%; +156.563%]

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

  • 🟥 execution_time [+299.221ms; +306.953ms] or [+148.860%; +152.706%]

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

  • unstable execution_time [-58.106ms; -22.861ms] or [-27.019%; -10.631%]
  • unstable throughput [-158661.425op/s; -109882.050op/s] or [-43.525%; -30.144%]

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

  • 🟩 execution_time [-98.935ms; -94.736ms] or [-49.627%; -47.521%]

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

  • 🟩 allocated_mem [-15.396KB; -15.374KB] or [-5.616%; -5.608%]
  • unstable execution_time [-56.714µs; -2.211µs] or [-11.209%; -0.437%]

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

  • 🟩 allocated_mem [-19.136KB; -19.119KB] or [-6.976%; -6.970%]
  • 🟩 execution_time [-86.070µs; -30.071µs] or [-14.915%; -5.211%]
  • 🟩 throughput [+109.063op/s; +262.774op/s] or [+6.231%; +15.013%]

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

  • unstable execution_time [+5.781µs; +11.785µs] or [+13.666%; +27.857%]
  • 🟥 throughput [-4824.562op/s; -2695.876op/s] or [-20.310%; -11.349%]

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

  • unstable execution_time [-11.043µs; -0.859µs] or [-17.133%; -1.333%]
  • unstable throughput [+438.787op/s; +2425.325op/s] or [+2.692%; +14.880%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+305.541ms; +320.046ms] or [+154.437%; +161.769%]

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

  • 🟥 execution_time [+278.980ms; +297.887ms] or [+142.000%; +151.623%]

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

  • 🟥 execution_time [+300.851ms; +305.089ms] or [+150.613%; +152.735%]

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

  • unstable execution_time [-56.267ms; -25.651ms] or [-28.125%; -12.822%]
  • unstable throughput [-231538.986op/s; -167013.893op/s] or [-43.825%; -31.612%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.322ms; +315.645ms] or [+150.680%; +157.321%]

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

  • unstable execution_time [+259.239ms; +295.709ms] or [+130.177%; +148.491%]

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

  • unstable execution_time [+236.322ms; +290.080ms] or [+119.847%; +147.110%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.186ms; +300.744ms] or [+149.735%; +150.013%]
  • 🟩 throughput [+64621324.713op/s; +64874708.666op/s] or [+47.061%; +47.246%]

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

  • unstable execution_time [+374.851ms; +386.933ms] or [+466.194%; +481.220%]
  • 🟥 throughput [-7456.721op/s; -7251.836op/s] or [-57.644%; -56.060%]

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

  • 🟥 execution_time [+300.873ms; +302.921ms] or [+150.069%; +151.090%]
  • 🟥 throughput [-29434973.559op/s; -28215642.715op/s] or [-13.038%; -12.498%]

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

  • unstable execution_time [-95.973ms; -74.633ms] or [-47.006%; -36.554%]
  • unstable throughput [-106109.302op/s; +19761.358op/s] or [-9.907%; +1.845%]

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

  • 🟩 execution_time [-97.547ms; -93.303ms] or [-49.360%; -47.212%]

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

  • unstable execution_time [-63.927ms; -39.649ms] or [-33.306%; -20.657%]
  • unstable throughput [-276778.204op/s; -99694.321op/s] or [-21.423%; -7.717%]

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

  • unstable execution_time [-55.641ms; -28.673ms] or [-27.337%; -14.088%]
  • 🟩 throughput [+77783.251op/s; +86901.288op/s] or [+7.725%; +8.631%]

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

  • unstable execution_time [-88.152ms; -67.329ms] or [-44.022%; -33.624%]
  • unstable throughput [-45165.475op/s; +17598.468op/s] or [-8.201%; +3.196%]

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

  • unstable execution_time [-72.028ms; -44.572ms] or [-36.190%; -22.395%]

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

  • unstable execution_time [-57.481ms; -29.561ms] or [-28.751%; -14.786%]
  • unstable throughput [-330390.284op/s; -204795.558op/s] or [-36.913%; -22.881%]

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

  • unstable execution_time [-91.913ms; -68.763ms] or [-46.681%; -34.923%]

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_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • 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_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 netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • 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_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_UpdateName_Sampled net472
  • 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

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented May 12, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

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

⚠️ Potential regressions detected

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration196.85 ± (196.57 - 197.53) ms209.01 ± (208.56 - 209.42) ms+6.2%❌⬆️
.NET Framework 4.8 - Bailout
duration198.71 ± (198.52 - 199.19) ms212.60 ± (212.34 - 213.04) ms+7.0%❌⬆️
Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration72.43 ± (72.51 - 72.83) ms72.69 ± (72.72 - 73.09) ms+0.4%✅⬆️
.NET Framework 4.8 - Bailout
duration79.27 ± (79.27 - 79.89) ms79.34 ± (79.33 - 79.96) ms+0.1%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1095.78 ± (1094.83 - 1101.18) ms1099.36 ± (1097.32 - 1104.91) ms+0.3%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.64 ± (22.58 - 22.70) ms22.66 ± (22.62 - 22.70) ms+0.1%✅⬆️
process.time_to_main_ms85.61 ± (85.27 - 85.95) ms84.95 ± (84.77 - 85.12) ms-0.8%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.92 ± (10.92 - 10.92) MB10.93 ± (10.92 - 10.93) MB+0.1%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.71 ± (22.65 - 22.77) ms22.64 ± (22.60 - 22.68) ms-0.3%
process.time_to_main_ms88.65 ± (88.29 - 89.00) ms88.30 ± (87.99 - 88.60) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.96 ± (10.96 - 10.96) MB10.96 ± (10.95 - 10.96) MB-0.0%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms212.39 ± (211.53 - 213.24) ms213.45 ± (212.63 - 214.26) ms+0.5%✅⬆️
process.time_to_main_ms536.46 ± (535.01 - 537.91) ms537.12 ± (535.78 - 538.46) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.33 ± (48.29 - 48.36) MB48.29 ± (48.26 - 48.32) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 6 - Baseline
process.internal_duration_ms21.10 ± (21.05 - 21.14) ms21.20 ± (21.15 - 21.24) ms+0.5%✅⬆️
process.time_to_main_ms73.43 ± (73.22 - 73.63) ms73.93 ± (73.70 - 74.16) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.60 ± (10.60 - 10.61) MB10.63 ± (10.63 - 10.64) MB+0.3%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.34 ± (21.28 - 21.40) ms21.06 ± (21.01 - 21.11) ms-1.3%
process.time_to_main_ms76.66 ± (76.43 - 76.90) ms74.63 ± (74.45 - 74.81) ms-2.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.73 ± (10.73 - 10.74) MB10.75 ± (10.74 - 10.75) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms377.45 ± (375.36 - 379.54) ms378.59 ± (376.66 - 380.53) ms+0.3%✅⬆️
process.time_to_main_ms535.20 ± (533.89 - 536.51) ms541.36 ± (540.17 - 542.55) ms+1.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.87 ± (49.85 - 49.89) MB49.86 ± (49.83 - 49.88) MB-0.0%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.2%
.NET 8 - Baseline
process.internal_duration_ms19.64 ± (19.60 - 19.69) ms19.92 ± (19.87 - 19.98) ms+1.4%✅⬆️
process.time_to_main_ms73.28 ± (73.08 - 73.48) ms75.65 ± (75.38 - 75.91) ms+3.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.66 ± (7.66 - 7.67) MB7.66 ± (7.66 - 7.67) MB-0.0%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.43 ± (19.39 - 19.47) ms19.69 ± (19.65 - 19.73) ms+1.3%✅⬆️
process.time_to_main_ms73.61 ± (73.45 - 73.77) ms75.62 ± (75.45 - 75.80) ms+2.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.70 ± (7.70 - 7.71) MB7.71 ± (7.70 - 7.71) MB+0.0%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms293.71 ± (291.46 - 295.97) ms294.60 ± (292.13 - 297.06) ms+0.3%✅⬆️
process.time_to_main_ms500.67 ± (499.29 - 502.04) ms501.89 ± (500.56 - 503.23) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.88 ± (36.85 - 36.92) MB36.90 ± (36.87 - 36.93) MB+0.0%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.1%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration196.85 ± (196.57 - 197.53) ms209.01 ± (208.56 - 209.42) ms+6.2%❌⬆️
.NET Framework 4.8 - Bailout
duration198.71 ± (198.52 - 199.19) ms212.60 ± (212.34 - 213.04) ms+7.0%❌⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1170.01 ± (1170.25 - 1175.93) ms1230.62 ± (1230.07 - 1237.44) ms+5.2%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms187.39 ± (187.06 - 187.71) ms201.50 ± (201.05 - 201.94) ms+7.5%✅⬆️
process.time_to_main_ms81.76 ± (81.59 - 81.93) ms88.85 ± (88.56 - 89.14) ms+8.7%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.04 ± (16.02 - 16.07) MB15.94 ± (15.92 - 15.97) MB-0.6%
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+1.2%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms186.88 ± (186.56 - 187.20) ms201.76 ± (201.36 - 202.16) ms+8.0%✅⬆️
process.time_to_main_ms83.25 ± (83.11 - 83.38) ms90.64 ± (90.50 - 90.79) ms+8.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.13 ± (16.10 - 16.16) MB15.96 ± (15.94 - 15.98) MB-1.1%
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (21 - 21)+1.4%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms377.71 ± (376.63 - 378.79) ms397.45 ± (396.18 - 398.72) ms+5.2%✅⬆️
process.time_to_main_ms519.59 ± (518.46 - 520.72) ms554.37 ± (553.25 - 555.49) ms+6.7%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.06 ± (57.00 - 57.12) MB59.05 ± (58.98 - 59.12) MB+3.5%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+1.4%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms191.86 ± (191.52 - 192.20) ms206.56 ± (206.09 - 207.02) ms+7.7%✅⬆️
process.time_to_main_ms70.81 ± (70.66 - 70.96) ms77.11 ± (76.85 - 77.37) ms+8.9%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.22 ± (16.12 - 16.32) MB16.27 ± (16.24 - 16.29) MB+0.3%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)20 ± (19 - 20)+4.0%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms190.81 ± (190.61 - 191.01) ms207.16 ± (206.68 - 207.64) ms+8.6%✅⬆️
process.time_to_main_ms72.05 ± (71.95 - 72.14) ms78.10 ± (77.87 - 78.33) ms+8.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.32 ± (16.24 - 16.40) MB16.26 ± (16.23 - 16.29) MB-0.4%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+2.9%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms590.35 ± (587.13 - 593.56) ms596.13 ± (593.60 - 598.67) ms+1.0%✅⬆️
process.time_to_main_ms519.73 ± (518.91 - 520.55) ms555.13 ± (554.03 - 556.23) ms+6.8%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.18 ± (61.08 - 61.27) MB61.54 ± (61.45 - 61.64) MB+0.6%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)+0.2%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms188.75 ± (188.44 - 189.06) ms205.40 ± (204.90 - 205.91) ms+8.8%✅⬆️
process.time_to_main_ms70.23 ± (70.05 - 70.41) ms76.82 ± (76.59 - 77.06) ms+9.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.77 ± (11.74 - 11.81) MB11.60 ± (11.58 - 11.62) MB-1.5%
runtime.dotnet.threads.count18 ± (18 - 18)19 ± (19 - 19)+3.4%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms188.43 ± (188.21 - 188.64) ms204.88 ± (204.49 - 205.27) ms+8.7%✅⬆️
process.time_to_main_ms71.32 ± (71.22 - 71.41) ms77.41 ± (77.25 - 77.58) ms+8.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.80 ± (11.76 - 11.84) MB11.69 ± (11.66 - 11.71) MB-1.0%
runtime.dotnet.threads.count19 ± (19 - 19)20 ± (20 - 20)+3.4%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms510.64 ± (507.91 - 513.38) ms515.22 ± (511.46 - 518.97) ms+0.9%✅⬆️
process.time_to_main_ms478.34 ± (477.61 - 479.07) ms511.30 ± (510.45 - 512.16) ms+6.9%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.55 ± (50.52 - 50.59) MB50.68 ± (50.62 - 50.74) MB+0.3%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)30 ± (30 - 30)+2.1%✅⬆️
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 (8609) - mean (73ms)  : 70, 76
    master - mean (73ms)  : 70, 75

    section Bailout
    This PR (8609) - mean (80ms)  : 75, 85
    master - mean (80ms)  : 75, 84

    section CallTarget+Inlining+NGEN
    This PR (8609) - mean (1,101ms)  : 1048, 1154
    master - mean (1,098ms)  : 1053, 1143

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 (8609) - mean (115ms)  : 112, 118
    master - mean (115ms)  : 109, 122

    section Bailout
    This PR (8609) - mean (118ms)  : 112, 125
    master - mean (119ms)  : 112, 125

    section CallTarget+Inlining+NGEN
    This PR (8609) - mean (788ms)  : 757, 819
    master - mean (787ms)  : 762, 813

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

    section Bailout
    This PR (8609) - mean (102ms)  : 100, 105
    master - mean (105ms)  : 100, 109

    section CallTarget+Inlining+NGEN
    This PR (8609) - mean (951ms)  : 912, 990
    master - mean (942ms)  : 911, 973

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8609) - mean (104ms)  : 99, 108
    master - mean (101ms)  : 96, 105

    section Bailout
    This PR (8609) - mean (103ms)  : 100, 106
    master - mean (101ms)  : 98, 104

    section CallTarget+Inlining+NGEN
    This PR (8609) - mean (827ms)  : 788, 866
    master - mean (828ms)  : 779, 877

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 (8609) - mean (209ms)  : 204, 214
    master - mean (197ms)  : 192, 202

    section Bailout
    This PR (8609) - mean (213ms)  : crit, 209, 216
    master - mean (199ms)  : 196, 202

    section CallTarget+Inlining+NGEN
    This PR (8609) - mean (1,234ms)  : 1178, 1289
    master - mean (1,173ms)  : 1133, 1214

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 (8609) - mean (300ms)  : 294, 307
    master - mean (278ms)  : 274, 281

    section Bailout
    This PR (8609) - mean (302ms)  : crit, 296, 308
    master - mean (279ms)  : 275, 283

    section CallTarget+Inlining+NGEN
    This PR (8609) - mean (995ms)  : crit, 970, 1021
    master - mean (940ms)  : 923, 957

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8609) - mean (293ms)  : 285, 300
    master - mean (271ms)  : 267, 275

    section Bailout
    This PR (8609) - mean (294ms)  : crit, 288, 300
    master - mean (271ms)  : 269, 273

    section CallTarget+Inlining+NGEN
    This PR (8609) - mean (1,182ms)  : 1126, 1237
    master - mean (1,138ms)  : 1085, 1190

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8609) - mean (294ms)  : 285, 302
    master - mean (269ms)  : 264, 274

    section Bailout
    This PR (8609) - mean (293ms)  : crit, 287, 299
    master - mean (269ms)  : 266, 272

    section CallTarget+Inlining+NGEN
    This PR (8609) - mean (1,060ms)  : 1005, 1115
    master - mean (1,021ms)  : 979, 1064

Loading

@andrewlock andrewlock force-pushed the andrew/handle-oom-in-polyfill branch from 347590c to 439fa78 Compare May 12, 2026 12:16
Comment thread tracer/src/Datadog.Trace/RuntimeMetrics/RuntimeMetricsPolyfill.cs

@NachoEchevarria NachoEchevarria 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.

LGTM!

@andrewlock andrewlock merged commit 42c4df9 into master May 12, 2026
138 checks passed
@andrewlock andrewlock deleted the andrew/handle-oom-in-polyfill branch May 12, 2026 16:01
@github-actions github-actions Bot added this to the vNext-v3 milestone May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:opentelemetry OpenTelemetry support area:runtime-metrics area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) identified-by:ai

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants