Skip to content

Prevent invalid JSON in AWS Lambda payloads#8662

Merged
andrewlock merged 4 commits into
masterfrom
andrew/serverless-escape-content
May 20, 2026
Merged

Prevent invalid JSON in AWS Lambda payloads#8662
andrewlock merged 4 commits into
masterfrom
andrew/serverless-escape-content

Conversation

@andrewlock

Copy link
Copy Markdown
Member

Summary of changes

  • Add helper for automatically escaping string for inclusion in JSON
  • Update serverless injection to use the new helper
  • Refactor serverless usages of StringBuilder to avoid allocation

Reason for change

The serverless context injection has to modify JSON to add additional headers. It's currently doing that using a StringBuilder approach, but it's not currently accounting for any potential characters in the injected payloads that might need escaping. This is rare and unlikely, but theoretically possible.

Additionally, there's some inefficiencies in how the StringBuilder is used in some cases, which is doing more allocation than necessary (e.g. using multiple StringBuilders, using interpolation, using AppendFormat)

Implementation details

  • Created a new JsonHelper.WriteEscapedJavaScriptString() based on the vendored Newtonsoft.JSon version
    • The vendored version is more generalised than we need, and potentially allocates char[], which the new version avoids.
    • The simple iteration of the input string is generally sub optimal, but these are generally going to be small strings, so it's likely as good as anything, given no SearchValues availability
  • Updated the ContextPropagation implementations to use it
  • Fix the ContextPropagation implementation usages of StringBuilder

Test coverage

  • Added unit tests for the helper + behaviour of context propagation
  • Covered by existing integration tests

@andrewlock
andrewlock requested review from a team as code owners May 20, 2026 09:42
@andrewlock andrewlock added the area:automatic-instrumentation Automatic instrumentation managed C# code (Datadog.Trace.ClrProfiler.Managed) label May 20, 2026
@andrewlock
andrewlock requested a review from vandonr May 20, 2026 09:42
@pr-commenter

pr-commenter Bot commented May 20, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-20 10:40:25

Comparing candidate commit f35a67b in PR branch andrew/serverless-escape-content with baseline commit 05f3138 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_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net472

Found 3 performance improvements and 4 performance regressions! Performance is the same for 49 metrics, 16 unstable metrics, 84 known flaky benchmarks, 42 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 [-144 bytes; -143 bytes] or [-9.188%; -9.180%]

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

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

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

  • 🟥 throughput [-35437.757op/s; -21234.228op/s] or [-22.386%; -13.413%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net472

  • 🟥 throughput [-6363.516op/s; -5564.992op/s] or [-7.264%; -6.353%]

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

  • 🟥 throughput [-65269.664op/s; -60016.241op/s] or [-44.339%; -40.770%]
  • 🟩 execution_time [-50.970ms; -39.195ms] or [-25.293%; -19.450%]

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

  • 🟩 execution_time [-100.068ms; -97.796ms] or [-49.974%; -48.839%]

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 [+3.581ms; +34.600ms] or [+2.416%; +23.340%]
  • unstable throughput [-13550.036op/s; +17288.840op/s] or [-8.342%; +10.644%]

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

  • unstable execution_time [-19.124ms; +14.959ms] or [-16.517%; +12.919%]

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

  • unstable execution_time [-22.120ms; +3.888ms] or [-14.217%; +2.499%]
  • unstable throughput [-9239.687op/s; +14901.436op/s] or [-6.708%; +10.818%]

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

  • unstable execution_time [+11.235ms; +36.912ms] or [+12.905%; +42.398%]

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

  • unstable execution_time [-19.317ms; +5.897ms] or [-13.687%; +4.178%]
  • unstable throughput [-11195.219op/s; +13619.665op/s] or [-6.396%; +7.781%]

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

  • unstable execution_time [-13.112ms; +9.809ms] or [-8.777%; +6.566%]
  • unstable throughput [-5718.883op/s; +10075.850op/s] or [-4.404%; +7.760%]

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

  • unstable execution_time [-31.247ms; -5.988ms] or [-27.725%; -5.313%]

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

  • unstable execution_time [-19.749ms; +5.602ms] or [-14.116%; +4.004%]
  • unstable throughput [-32441.726op/s; +5400.449op/s] or [-16.516%; +2.749%]

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

  • unstable execution_time [-60.041ms; -29.419ms] or [-44.751%; -21.927%]

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

  • unstable execution_time [-13716.440µs; +12035.676µs] or [-9.949%; +8.730%]
  • unstable throughput [-12571.404op/s; +10533.080op/s] or [-7.473%; +6.262%]

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

  • unstable execution_time [-59.573ms; -29.529ms] or [-44.149%; -21.883%]

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

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-7.698%; -7.691%]
  • unstable execution_time [+1.330ms; +27.519ms] or [+0.944%; +19.545%]
  • unstable throughput [-13561.851op/s; +16368.342op/s] or [-9.495%; +11.459%]

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

  • unstable execution_time [-26.699ms; -11.645ms] or [-18.770%; -8.186%]

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 [-30.855ms; -7.978ms] or [-21.130%; -5.464%]
  • unstable throughput [+1459.017op/s; +20490.242op/s] or [+1.436%; +20.167%]

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

  • unstable execution_time [-65.564ms; -33.058ms] or [-48.482%; -24.445%]

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

  • unstable execution_time [+8.082ms; +36.846ms] or [+5.773%; +26.320%]
  • unstable throughput [-18199.611op/s; -4472.945op/s] or [-14.248%; -3.502%]

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

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-8.741%; -8.734%]
  • unstable execution_time [+53.521ms; +79.514ms] or [+40.877%; +60.729%]
  • unstable throughput [-41191.601op/s; -21672.252op/s] or [-27.397%; -14.415%]

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

  • unstable execution_time [-62.831ms; -32.373ms] or [-47.637%; -24.544%]

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

  • unstable execution_time [-9.160ms; +13.581ms] or [-6.636%; +9.838%]
  • unstable throughput [-16217.910op/s; +4195.263op/s] or [-9.785%; +2.531%]

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

  • unstable execution_time [-18.910ms; +16.498ms] or [-16.953%; +14.791%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-5310.925op/s; -4860.662op/s] or [-6.297%; -5.763%]

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

  • unstable execution_time [-61.200ms; -24.816ms] or [-30.533%; -12.381%]
  • unstable throughput [-48474.246op/s; -31569.985op/s] or [-40.745%; -26.536%]

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

  • 🟩 execution_time [-100.052ms; -97.666ms] or [-50.323%; -49.123%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+315.426ms; +331.065ms] or [+156.525%; +164.286%]
  • 🟥 throughput [-54.916op/s; -42.568op/s] or [-9.880%; -7.659%]

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

  • 🟥 execution_time [+99.462ms; +101.419ms] or [+78.581%; +80.127%]
  • 🟩 throughput [+83.937op/s; +91.067op/s] or [+11.067%; +12.007%]

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

  • 🟥 execution_time [+84.501ms; +86.167ms] or [+74.780%; +76.255%]

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.306ms; -44.619ms] or [-30.033%; -20.839%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.500%; +27.510%]
  • 🟩 execution_time [-31.029ms; -14.009ms] or [-14.776%; -6.671%]

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

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.743%; +105.758%]
  • 🟥 throughput [-281939.006op/s; -275750.424op/s] or [-28.787%; -28.155%]

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

  • 🟥 allocated_mem [+439 bytes; +440 bytes] or [+35.945%; +35.954%]
  • unstable execution_time [-105.758ms; -76.846ms] or [-47.163%; -34.270%]
  • unstable throughput [-178106.166op/s; -63214.149op/s] or [-19.027%; -6.753%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.288%; +105.304%]
  • unstable execution_time [-60.730ms; -36.667ms] or [-30.314%; -18.303%]
  • 🟥 throughput [-133476.997op/s; -117113.485op/s] or [-19.178%; -16.827%]

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

  • 🟩 execution_time [-43.646ms; -28.013ms] or [-22.022%; -14.134%]

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

  • 🟩 execution_time [-69.104ms; -65.057ms] or [-35.232%; -33.169%]
  • 🟩 throughput [+10645.531op/s; +13280.477op/s] or [+8.481%; +10.580%]

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

  • unstable execution_time [-58.312ms; -35.378ms] or [-28.831%; -17.492%]
  • unstable throughput [-301926.707op/s; +64481.869op/s] or [-10.068%; +2.150%]

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

  • 🟩 execution_time [-42.490ms; -23.651ms] or [-19.586%; -10.902%]
  • 🟩 throughput [+130762.088op/s; +199886.905op/s] or [+5.190%; +7.934%]

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

  • 🟥 execution_time [+300.384ms; +314.879ms] or [+150.092%; +157.334%]

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

  • unstable execution_time [+148.442ms; +186.725ms] or [+74.859%; +94.166%]

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

  • 🟥 execution_time [+301.627ms; +308.508ms] or [+151.936%; +155.402%]

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

  • 🟥 execution_time [+299.153ms; +312.769ms] or [+146.932%; +153.620%]

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

  • 🟥 execution_time [+249.013ms; +264.026ms] or [+121.733%; +129.072%]

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

  • 🟥 execution_time [+289.712ms; +303.172ms] or [+144.798%; +151.525%]

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

  • 🟥 execution_time [+21.214µs; +44.847µs] or [+6.773%; +14.317%]
  • 🟥 throughput [-418.964op/s; -220.101op/s] or [-13.060%; -6.861%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.914ms; +300.701ms] or [+149.688%; +150.081%]

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

  • unstable execution_time [+359.181ms; +371.420ms] or [+390.265%; +403.564%]
  • 🟥 throughput [-7043.146op/s; -6885.001op/s] or [-57.875%; -56.575%]

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

  • unstable execution_time [+288.283ms; +318.973ms] or [+218.891%; +242.193%]
  • 🟥 throughput [-1677.917op/s; -1451.260op/s] or [-16.243%; -14.049%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+304.649ms; +322.068ms] or [+140.075%; +148.084%]
  • 🟥 throughput [-683.271op/s; -665.923op/s] or [-61.911%; -60.339%]

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

  • unstable execution_time [-50.138ms; +83.541ms] or [-21.367%; +35.602%]
  • 🟥 throughput [-686.767op/s; -597.604op/s] or [-45.808%; -39.860%]

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

  • 🟥 allocated_mem [+2.305KB; +2.308KB] or [+5.442%; +5.450%]
  • 🟥 execution_time [+343.187ms; +352.375ms] or [+205.266%; +210.761%]
  • 🟥 throughput [-725.954op/s; -691.690op/s] or [-50.547%; -48.161%]

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

  • 🟩 execution_time [-210.766µs; -198.743µs] or [-10.677%; -10.068%]
  • 🟩 throughput [+56.807op/s; +60.593op/s] or [+11.214%; +11.962%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+306.784ms; +320.568ms] or [+154.490%; +161.432%]

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

  • unstable execution_time [+248.709ms; +269.252ms] or [+124.629%; +134.923%]

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

  • 🟥 execution_time [+295.909ms; +302.985ms] or [+148.652%; +152.207%]
  • 🟩 throughput [+29385.494op/s; +38593.768op/s] or [+6.190%; +8.130%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+303.953ms; +315.138ms] or [+152.635%; +158.252%]

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

  • 🟥 execution_time [+212.420ms; +222.329ms] or [+105.032%; +109.932%]

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

  • 🟥 execution_time [+305.448ms; +312.107ms] or [+154.814%; +158.190%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+306.400ms; +319.247ms] or [+153.785%; +160.233%]

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

  • 🟥 execution_time [+307.747ms; +315.213ms] or [+153.384%; +157.105%]
  • 🟩 throughput [+38356.648op/s; +47907.112op/s] or [+7.616%; +9.513%]

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

  • 🟥 execution_time [+300.185ms; +306.336ms] or [+149.339%; +152.400%]

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

  • unstable execution_time [-53.753ms; -28.967ms] or [-24.996%; -13.470%]
  • unstable throughput [-159281.239op/s; -118609.213op/s] or [-43.695%; -32.538%]

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

  • unstable execution_time [-89.606ms; -66.808ms] or [-44.948%; -33.512%]

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

  • 🟩 allocated_mem [-26.167KB; -26.143KB] or [-9.545%; -9.536%]
  • unstable execution_time [-79.341µs; -25.200µs] or [-15.681%; -4.981%]
  • 🟩 throughput [+122.677op/s; +317.626op/s] or [+6.122%; +15.850%]

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

  • 🟩 allocated_mem [-18.309KB; -18.289KB] or [-6.675%; -6.667%]
  • 🟩 execution_time [-91.171µs; -34.566µs] or [-15.799%; -5.990%]
  • 🟩 throughput [+127.384op/s; +283.105op/s] or [+7.278%; +16.174%]

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

  • unstable execution_time [+3.376µs; +8.455µs] or [+7.980%; +19.984%]
  • 🟥 throughput [-3731.198op/s; -1690.932op/s] or [-15.707%; -7.118%]

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

  • unstable execution_time [-13.548µs; -4.246µs] or [-21.019%; -6.588%]
  • unstable throughput [+1284.148op/s; +3228.948op/s] or [+7.879%; +19.811%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+304.996ms; +318.943ms] or [+154.162%; +161.211%]

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

  • unstable execution_time [+276.783ms; +297.841ms] or [+140.882%; +151.600%]

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

  • 🟥 execution_time [+300.449ms; +305.195ms] or [+150.412%; +152.788%]

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

  • unstable execution_time [-78.938ms; -48.992ms] or [-39.457%; -24.488%]
  • unstable throughput [-162552.513op/s; -89308.319op/s] or [-30.768%; -16.904%]

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

  • unstable execution_time [-33.213ms; -7.198ms] or [-16.836%; -3.648%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.145ms; +312.569ms] or [+149.595%; +155.787%]

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

  • 🟥 execution_time [+304.149ms; +310.652ms] or [+152.729%; +155.995%]

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

  • 🟥 execution_time [+307.925ms; +312.813ms] or [+156.160%; +158.638%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.841ms; +300.467ms] or [+149.562%; +149.874%]
  • 🟩 throughput [+60098189.887op/s; +60387767.374op/s] or [+43.767%; +43.978%]

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

  • unstable execution_time [+368.304ms; +389.132ms] or [+458.052%; +483.955%]
  • 🟥 throughput [-7564.463op/s; -7307.999op/s] or [-58.477%; -56.494%]

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

  • 🟥 execution_time [+302.180ms; +304.726ms] or [+150.721%; +151.990%]
  • 🟥 throughput [-29808904.707op/s; -28556158.032op/s] or [-13.203%; -12.649%]

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

  • unstable execution_time [-90.889ms; -69.853ms] or [-44.516%; -34.213%]
  • unstable throughput [-97444.129op/s; +29168.133op/s] or [-9.098%; +2.723%]

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

  • unstable execution_time [-91.473ms; -69.734ms] or [-46.286%; -35.286%]
  • 🟩 throughput [+55337.652op/s; +75457.506op/s] or [+6.405%; +8.734%]

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

  • unstable execution_time [-42.817ms; -13.850ms] or [-22.308%; -7.216%]
  • unstable throughput [-410267.382op/s; -226667.444op/s] or [-31.755%; -17.544%]

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

  • unstable execution_time [-57.311ms; -29.621ms] or [-28.158%; -14.554%]
  • 🟩 throughput [+92142.268op/s; +103490.096op/s] or [+9.151%; +10.278%]

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

  • unstable execution_time [-89.967ms; -67.201ms] or [-44.929%; -33.560%]
  • unstable throughput [-41024.988op/s; +22856.359op/s] or [-7.449%; +4.150%]

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

  • unstable execution_time [-71.360ms; -44.365ms] or [-35.854%; -22.291%]

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

  • unstable execution_time [-91.633ms; -52.670ms] or [-45.833%; -26.344%]
  • unstable throughput [-130918.350op/s; +4419.763op/s] or [-14.627%; +0.494%]

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

  • unstable execution_time [-51.768ms; -23.855ms] or [-26.292%; -12.116%]

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_GetContext_Sampled netcoreapp3.1
  • 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_SetStatus_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net472
  • 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_GetContext_Sampled netcoreapp3.1
  • 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_SetAttributes_Sampled netcoreapp3.1
  • 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.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

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8662) 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.46 ± (72.53 - 72.87) ms74.29 ± (74.00 - 74.51) ms+2.5%✅⬆️
.NET Framework 4.8 - Bailout
duration76.51 ± (76.49 - 76.87) ms77.31 ± (77.17 - 77.53) ms+1.1%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1107.18 ± (1106.07 - 1113.21) ms1109.06 ± (1108.46 - 1114.41) ms+0.2%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.45 ± (22.41 - 22.50) ms22.59 ± (22.53 - 22.65) ms+0.6%✅⬆️
process.time_to_main_ms83.92 ± (83.73 - 84.10) ms85.71 ± (85.46 - 85.95) ms+2.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.93 ± (10.93 - 10.93) MB10.91 ± (10.91 - 10.92) MB-0.1%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.72 ± (22.66 - 22.78) ms22.48 ± (22.44 - 22.51) ms-1.1%
process.time_to_main_ms87.86 ± (87.59 - 88.13) ms86.24 ± (86.03 - 86.45) ms-1.8%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.95 ± (10.95 - 10.96) MB10.94 ± (10.94 - 10.95) MB-0.1%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms212.72 ± (211.80 - 213.63) ms213.81 ± (212.62 - 215.00) ms+0.5%✅⬆️
process.time_to_main_ms539.67 ± (538.35 - 541.00) ms544.18 ± (542.49 - 545.88) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.49 ± (48.45 - 48.53) MB48.56 ± (48.52 - 48.59) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-1.1%
.NET 6 - Baseline
process.internal_duration_ms21.59 ± (21.53 - 21.65) ms21.17 ± (21.14 - 21.20) ms-1.9%
process.time_to_main_ms75.75 ± (75.46 - 76.04) ms73.28 ± (73.12 - 73.43) ms-3.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.62 ± (10.62 - 10.62) MB10.63 ± (10.63 - 10.63) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.11 ± (21.07 - 21.16) ms21.48 ± (21.43 - 21.54) ms+1.7%✅⬆️
process.time_to_main_ms74.61 ± (74.46 - 74.77) ms76.82 ± (76.56 - 77.08) ms+3.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.74 ± (10.74 - 10.75) MB10.73 ± (10.73 - 10.73) MB-0.1%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms367.80 ± (365.51 - 370.08) ms370.41 ± (368.36 - 372.47) ms+0.7%✅⬆️
process.time_to_main_ms550.57 ± (549.26 - 551.87) ms549.35 ± (548.02 - 550.68) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.96 ± (49.94 - 49.98) MB49.99 ± (49.96 - 50.01) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 8 - Baseline
process.internal_duration_ms19.32 ± (19.28 - 19.36) ms19.31 ± (19.27 - 19.36) ms-0.1%
process.time_to_main_ms72.56 ± (72.34 - 72.77) ms72.89 ± (72.67 - 73.12) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.69 ± (7.68 - 7.69) MB7.67 ± (7.66 - 7.67) MB-0.3%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.61 ± (19.56 - 19.66) ms19.25 ± (19.22 - 19.29) ms-1.8%
process.time_to_main_ms75.92 ± (75.64 - 76.20) ms73.65 ± (73.50 - 73.80) ms-3.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.73 ± (7.72 - 7.73) MB7.71 ± (7.71 - 7.72) MB-0.2%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms295.31 ± (293.17 - 297.45) ms294.96 ± (292.64 - 297.28) ms-0.1%
process.time_to_main_ms496.13 ± (495.09 - 497.16) ms499.23 ± (497.94 - 500.52) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.91 ± (36.88 - 36.94) MB36.88 ± (36.85 - 36.91) MB-0.1%
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.0%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration200.52 ± (200.12 - 200.99) ms201.37 ± (201.03 - 201.96) ms+0.4%✅⬆️
.NET Framework 4.8 - Bailout
duration204.83 ± (204.10 - 205.14) ms205.24 ± (204.94 - 205.93) ms+0.2%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1199.85 ± (1199.56 - 1206.11) ms1205.87 ± (1205.77 - 1213.25) ms+0.5%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms195.59 ± (195.12 - 196.06) ms195.31 ± (194.82 - 195.81) ms-0.1%
process.time_to_main_ms84.57 ± (84.26 - 84.89) ms83.95 ± (83.66 - 84.24) ms-0.7%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.02 ± (15.99 - 16.04) MB16.01 ± (15.99 - 16.03) MB-0.1%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.1%
.NET Core 3.1 - Bailout
process.internal_duration_ms195.05 ± (194.56 - 195.55) ms194.98 ± (194.46 - 195.51) ms-0.0%
process.time_to_main_ms85.42 ± (85.17 - 85.67) ms85.41 ± (85.14 - 85.68) ms-0.0%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.07 ± (16.05 - 16.09) MB16.04 ± (16.02 - 16.06) MB-0.2%
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (20 - 21)+0.0%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms387.17 ± (385.85 - 388.48) ms390.64 ± (389.35 - 391.94) ms+0.9%✅⬆️
process.time_to_main_ms539.00 ± (537.75 - 540.24) ms541.48 ± (540.33 - 542.62) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.71 ± (57.51 - 57.92) MB58.23 ± (58.02 - 58.45) MB+0.9%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.3%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms198.18 ± (197.70 - 198.66) ms199.52 ± (199.14 - 199.91) ms+0.7%✅⬆️
process.time_to_main_ms72.04 ± (71.84 - 72.23) ms73.23 ± (72.97 - 73.49) ms+1.7%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.28 ± (16.26 - 16.30) MB16.34 ± (16.31 - 16.37) MB+0.4%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.5%
.NET 6 - Bailout
process.internal_duration_ms198.40 ± (197.86 - 198.94) ms199.98 ± (199.47 - 200.49) ms+0.8%✅⬆️
process.time_to_main_ms73.85 ± (73.56 - 74.14) ms74.51 ± (74.27 - 74.74) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.38 ± (16.36 - 16.41) MB16.38 ± (16.35 - 16.41) MB-0.0%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.2%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms586.65 ± (584.33 - 588.97) ms586.28 ± (583.81 - 588.74) ms-0.1%
process.time_to_main_ms542.27 ± (541.31 - 543.24) ms548.00 ± (546.90 - 549.10) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.02 ± (60.93 - 61.10) MB61.05 ± (60.96 - 61.14) MB+0.1%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.3%
.NET 8 - Baseline
process.internal_duration_ms196.70 ± (196.23 - 197.16) ms198.11 ± (197.62 - 198.60) ms+0.7%✅⬆️
process.time_to_main_ms71.49 ± (71.26 - 71.73) ms72.47 ± (72.19 - 72.75) ms+1.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.76 - 11.79) MB11.62 ± (11.60 - 11.64) MB-1.4%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 19)+0.9%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms196.57 ± (196.02 - 197.13) ms196.76 ± (196.27 - 197.26) ms+0.1%✅⬆️
process.time_to_main_ms72.65 ± (72.36 - 72.95) ms73.71 ± (73.47 - 73.94) ms+1.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.76 ± (11.74 - 11.77) MB11.72 ± (11.71 - 11.74) MB-0.3%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.1%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms512.14 ± (509.80 - 514.48) ms513.19 ± (510.13 - 516.26) ms+0.2%✅⬆️
process.time_to_main_ms492.28 ± (491.26 - 493.29) ms494.80 ± (493.92 - 495.68) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.58 ± (50.54 - 50.62) MB50.65 ± (50.61 - 50.68) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (29 - 30)30 ± (29 - 30)+0.2%✅⬆️
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 (8662) - mean (74ms)  : 70, 78
    master - mean (73ms)  : 70, 75

    section Bailout
    This PR (8662) - mean (77ms)  : 75, 80
    master - mean (77ms)  : 74, 79

    section CallTarget+Inlining+NGEN
    This PR (8662) - mean (1,111ms)  : 1069, 1154
    master - mean (1,110ms)  : 1059, 1161

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 (8662) - mean (115ms)  : 110, 120
    master - mean (113ms)  : 109, 117

    section Bailout
    This PR (8662) - mean (116ms)  : 113, 118
    master - mean (118ms)  : 112, 124

    section CallTarget+Inlining+NGEN
    This PR (8662) - mean (797ms)  : 774, 819
    master - mean (788ms)  : 764, 812

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

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

    section CallTarget+Inlining+NGEN
    This PR (8662) - mean (949ms)  : 916, 982
    master - mean (946ms)  : 908, 984

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8662) - mean (100ms)  : 96, 104
    master - mean (100ms)  : 96, 103

    section Bailout
    This PR (8662) - mean (101ms)  : 98, 104
    master - mean (104ms)  : 99, 108

    section CallTarget+Inlining+NGEN
    This PR (8662) - mean (826ms)  : 784, 869
    master - mean (823ms)  : 789, 856

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 (8662) - mean (201ms)  : 196, 207
    master - mean (201ms)  : 195, 206

    section Bailout
    This PR (8662) - mean (205ms)  : 200, 210
    master - mean (205ms)  : 198, 211

    section CallTarget+Inlining+NGEN
    This PR (8662) - mean (1,210ms)  : 1156, 1263
    master - mean (1,203ms)  : 1156, 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 (8662) - mean (289ms)  : 282, 296
    master - mean (289ms)  : 282, 297

    section Bailout
    This PR (8662) - mean (289ms)  : 280, 299
    master - mean (289ms)  : 280, 298

    section CallTarget+Inlining+NGEN
    This PR (8662) - mean (971ms)  : 953, 989
    master - mean (965ms)  : 947, 983

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8662) - mean (281ms)  : 274, 289
    master - mean (279ms)  : 267, 291

    section Bailout
    This PR (8662) - mean (283ms)  : 274, 291
    master - mean (281ms)  : 274, 288

    section CallTarget+Inlining+NGEN
    This PR (8662) - mean (1,162ms)  : 1126, 1199
    master - mean (1,156ms)  : 1121, 1191

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8662) - mean (281ms)  : 275, 286
    master - mean (278ms)  : 270, 286

    section Bailout
    This PR (8662) - mean (280ms)  : 273, 287
    master - mean (280ms)  : 273, 286

    section CallTarget+Inlining+NGEN
    This PR (8662) - mean (1,041ms)  : 996, 1086
    master - mean (1,038ms)  : 1001, 1075

Loading

@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented May 20, 2026

Copy link
Copy Markdown

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 4 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-dotnet | Ubuntu_20_amd64.SI94: [test-app-dotnet-container]   View in Datadog   GitLab

🔧 Fix in code (Fix with Cursor). AssertionError: _container_tags_validator failed to validate trace_id: 40861686543945727 in tests/auto_inject/utils.py:79

DataDog/apm-reliability/dd-trace-dotnet | Ubuntu_23_10_arm64.SI94: [test-app-dotnet-container]   View in Datadog   GitLab

🔧 Fix in code (Fix with Cursor). 1 test failed. AssertionError: _container_tags_validator failed to validate trace_id: 45774457184891173 in tests/auto_inject/test_auto_inject_install.py:255.

DataDog/apm-reliability/dd-trace-dotnet | Ubuntu_24_10_amd64.SI94: [test-app-dotnet-container]   View in Datadog   GitLab

🔧 Fix in code (Fix with Cursor). 1 failed test. AssertionError: _container_tags_validator failed to validate trace_id: 92544705015000278 at tests/auto_inject/test_auto_inject_install.py:255.

View all 4 failed jobs.

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f35a67b | Docs | Datadog PR Page | Give us feedback!

@lucaspimentel lucaspimentel changed the title Prevent invalid JSON in Serverless payloads Prevent invalid JSON in AWS Lambda payloads May 20, 2026
@andrewlock
andrewlock merged commit 1c560a3 into master May 20, 2026
137 of 143 checks passed
@andrewlock
andrewlock deleted the andrew/serverless-escape-content branch May 20, 2026 15:18
@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

area:automatic-instrumentation Automatic instrumentation managed C# code (Datadog.Trace.ClrProfiler.Managed) area:serverless identified-by:ai

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants