Skip to content

[Debugger] Avoid resolving call tokens in exception replay IL scan#8815

Merged
dudikeleti merged 6 commits into
masterfrom
dudik/exception-replay-metadata-il-analysis
Jun 24, 2026
Merged

[Debugger] Avoid resolving call tokens in exception replay IL scan#8815
dudikeleti merged 6 commits into
masterfrom
dudik/exception-replay-metadata-il-analysis

Conversation

@dudikeleti

@dudikeleti dudikeleti commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

  • Replace Exception Replay IL call-token scanning based on Module.ResolveMethod(token) with metadata-reader inspection of MethodDefinition, MemberReference, and MethodSpecification tokens.
  • Expand IL operand skipping to use OpCode.OperandType, so scanning remains aligned across non-call instructions.
  • Add a regression test proving an unavailable dependency referenced by a callvirt token is not resolved or loaded while scanning.

Reason for change

Module.ResolveMethod(token) can force runtime method/type resolution for arbitrary call operands in customer IL. Exception Replay only needs to detect direct calls such as ExceptionDispatchInfo.Throw(), so this should be a metadata-only read and should not load unavailable dependencies or execute customer resolution side effects.

Implementation details

The analyzer now opens the declaring module's PE image with a metadata reader and compares call operands by token metadata. It matches method names and declaring type metadata against the requested target type, including base types and interfaces to preserve the previous assignability behavior used by inherited calls such as Exception.ToString() resolving to Object.ToString().

The metadata reader is created once per analyzed method. In production this path is already cached by MethodUniqueIdentifier.MightMisleadStacktrace, so the file metadata read happens once per method identity rather than per snapshot.

Test coverage

  • ILAnalyzerTests

@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 1 Pipeline job failed

DataDog/apm-reliability/dd-trace-dotnet | create-multiarch-lib-injection-image   View in Datadog   GitLab

Useful? React with 👍 / 👎

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Exception Replay IL scanning logic in the Debugger to avoid runtime resolution (Module.ResolveMethod(token)) by switching to a metadata-only approach using System.Reflection.Metadata/vendored equivalents. This prevents IL scanning from triggering assembly loads or other side effects when inspecting call tokens in customer code.

Changes:

  • Replaced call-token resolution with metadata-reader inspection of MethodDefinition, MemberReference, and MethodSpecification tokens.
  • Improved IL scanning alignment by skipping operands based on OpCode.OperandType.
  • Added a regression test ensuring scanning does not resolve/load an unavailable dependency referenced by a callvirt token.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tracer/src/Datadog.Trace/Debugger/ExceptionAutoInstrumentation/ILAnalyzer.cs Switches IL call-token detection from runtime resolution to metadata-only scanning; improves operand skipping logic.
tracer/test/Datadog.Trace.Tests/Debugger/ILAnalyzerTests.cs Adds regression coverage for “unavailable dependency should not be resolved/loaded while scanning”.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tracer/test/Datadog.Trace.Tests/Debugger/ILAnalyzerTests.cs Outdated
Comment thread tracer/src/Datadog.Trace/Debugger/ExceptionAutoInstrumentation/ILAnalyzer.cs Outdated
@pr-commenter

pr-commenter Bot commented Jun 22, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-06-23 11:05:46

Comparing candidate commit 8c2bb7c in PR branch dudik/exception-replay-metadata-il-analysis with baseline commit 44c1f80 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 1 performance regressions! Performance is the same for 71 metrics, 0 unstable metrics, 62 known flaky benchmarks, 64 flaky benchmarks without significant changes.

Explanation

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

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

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

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

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

More details about the CI and significant changes

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

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

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

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

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

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

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net472

  • 🟥 throughput [-5397.578op/s; -5107.813op/s] or [-6.162%; -5.831%]

Known flaky benchmarks

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

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-6950.128op/s; -6405.665op/s] or [-8.241%; -7.595%]

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

  • 🟥 throughput [-6398.620op/s; -5155.643op/s] or [-6.506%; -5.242%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+318.608ms; +324.950ms] or [+158.105%; +161.252%]
  • 🟥 throughput [-43.980op/s; -40.350op/s] or [-7.913%; -7.260%]

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

  • 🟥 execution_time [+376.564ms; +378.622ms] or [+297.508%; +299.135%]
  • 🟩 throughput [+96.680op/s; +100.216op/s] or [+12.747%; +13.213%]

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

  • 🟥 execution_time [+394.686ms; +397.217ms] or [+349.282%; +351.522%]

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 [+471 bytes; +472 bytes] or [+9.976%; +9.987%]
  • 🟩 execution_time [-15.922ms; -11.736ms] or [-7.436%; -5.481%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.500%; +27.510%]

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

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.743%; +105.758%]
  • 🟥 throughput [-281188.184op/s; -275742.344op/s] or [-28.711%; -28.155%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+38.557%; +38.566%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.288%; +105.304%]
  • 🟥 throughput [-153866.931op/s; -137201.401op/s] or [-22.108%; -19.713%]

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

  • 🟩 throughput [+9879.140op/s; +12838.158op/s] or [+6.286%; +8.169%]

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

  • 🟩 throughput [+9056.306op/s; +11720.355op/s] or [+7.215%; +9.337%]

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

  • 🟩 throughput [+393050.620op/s; +465211.845op/s] or [+13.106%; +15.512%]

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

  • 🟩 execution_time [-19.172ms; -14.842ms] or [-8.837%; -6.842%]
  • 🟩 throughput [+192068.753op/s; +245241.766op/s] or [+7.624%; +9.734%]

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

  • 🟥 execution_time [+299.413ms; +300.309ms] or [+149.607%; +150.054%]

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

  • 🟥 execution_time [+299.202ms; +302.474ms] or [+150.888%; +152.539%]

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

  • 🟥 execution_time [+299.905ms; +302.377ms] or [+151.069%; +152.314%]

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

  • 🟥 execution_time [+296.971ms; +297.888ms] or [+145.860%; +146.311%]

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

  • 🟥 execution_time [+295.048ms; +296.586ms] or [+144.238%; +144.990%]

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

  • 🟥 execution_time [+302.084ms; +303.619ms] or [+150.981%; +151.748%]

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

  • 🟥 execution_time [+24.685µs; +28.939µs] or [+5.068%; +5.942%]

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

  • 🟥 execution_time [+25.030µs; +52.067µs] or [+5.741%; +11.942%]
  • 🟥 throughput [-252.880op/s; -131.364op/s] or [-10.994%; -5.711%]

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

  • 🟥 execution_time [+23.464µs; +47.169µs] or [+7.491%; +15.059%]
  • 🟥 throughput [-437.930op/s; -238.522op/s] or [-13.652%; -7.435%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.911ms; +300.692ms] or [+149.687%; +150.076%]

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

  • 🟥 execution_time [+418.967ms; +423.781ms] or [+455.225%; +460.456%]
  • 🟩 throughput [+614.734op/s; +781.981op/s] or [+5.051%; +6.426%]

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

  • unstable execution_time [+247.229ms; +311.490ms] or [+187.719%; +236.511%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+374.207ms; +426.742ms] or [+172.057%; +196.212%]
  • 🟥 throughput [-577.464op/s; -529.633op/s] or [-52.324%; -47.990%]

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

  • unstable execution_time [+207.446ms; +340.685ms] or [+88.405%; +145.186%]
  • 🟥 throughput [-666.624op/s; -583.185op/s] or [-44.464%; -38.899%]

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

  • 🟥 execution_time [+334.115ms; +346.499ms] or [+199.840%; +207.247%]
  • 🟥 throughput [-401.087op/s; -362.484op/s] or [-27.927%; -25.239%]

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

  • 🟩 execution_time [-193.047µs; -148.466µs] or [-9.779%; -7.521%]
  • 🟩 throughput [+42.851op/s; +54.980op/s] or [+8.459%; +10.854%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+305.976ms; +308.575ms] or [+154.084%; +155.393%]

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

  • 🟥 execution_time [+302.782ms; +304.069ms] or [+151.725%; +152.369%]

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

  • 🟥 execution_time [+301.732ms; +305.535ms] or [+151.578%; +153.488%]
  • 🟩 throughput [+25019.719op/s; +32746.279op/s] or [+5.270%; +6.898%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+300.006ms; +302.217ms] or [+150.653%; +151.763%]

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

  • 🟥 execution_time [+298.788ms; +301.436ms] or [+147.738%; +149.047%]

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

  • 🟥 execution_time [+303.006ms; +306.754ms] or [+153.577%; +155.476%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+300.673ms; +302.760ms] or [+150.911%; +151.958%]

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

  • 🟥 execution_time [+299.163ms; +301.595ms] or [+149.105%; +150.317%]
  • 🟩 throughput [+44415.725op/s; +53772.970op/s] or [+8.820%; +10.678%]

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

  • 🟥 execution_time [+301.284ms; +304.674ms] or [+149.886%; +151.573%]

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

  • 🟩 execution_time [-17.032ms; -13.360ms] or [-7.920%; -6.212%]
  • 🟩 throughput [+20065.877op/s; +27857.164op/s] or [+5.505%; +7.642%]

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

  • unstable execution_time [+10.788µs; +58.999µs] or [+2.665%; +14.573%]

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

  • 🟩 allocated_mem [-19.641KB; -19.618KB] or [-7.165%; -7.156%]
  • unstable execution_time [-49.151µs; +7.358µs] or [-9.714%; +1.454%]

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

  • unstable execution_time [-34.167µs; +29.674µs] or [-5.921%; +5.142%]

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

  • unstable execution_time [+9.998µs; +15.473µs] or [+23.632%; +36.573%]
  • 🟥 throughput [-6305.703op/s; -4235.676op/s] or [-26.545%; -17.831%]

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

  • unstable execution_time [-13.082µs; -5.056µs] or [-20.297%; -7.843%]
  • unstable throughput [+1205.783op/s; +2968.082op/s] or [+7.398%; +18.210%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+298.454ms; +300.399ms] or [+150.855%; +151.838%]

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

  • 🟥 execution_time [+303.870ms; +308.738ms] or [+154.669%; +157.147%]

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

  • 🟥 execution_time [+301.932ms; +306.149ms] or [+151.154%; +153.266%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472

  • 🟥 throughput [-26039.749op/s; -24387.186op/s] or [-7.209%; -6.751%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.159ms; +302.519ms] or [+149.602%; +150.779%]

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

  • 🟥 execution_time [+301.843ms; +304.177ms] or [+151.571%; +152.743%]

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

  • 🟥 execution_time [+302.674ms; +304.982ms] or [+153.497%; +154.667%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.757ms; +300.991ms] or [+149.520%; +150.136%]
  • 🟩 throughput [+61291474.093op/s; +61656005.999op/s] or [+44.636%; +44.902%]

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

  • 🟥 execution_time [+420.022ms; +426.809ms] or [+522.372%; +530.813%]

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

  • 🟥 execution_time [+299.587ms; +300.626ms] or [+149.427%; +149.945%]

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

  • 🟩 throughput [+79879.603op/s; +93605.931op/s] or [+7.458%; +8.740%]

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

  • 🟩 throughput [+61561.414op/s; +81279.943op/s] or [+7.126%; +9.408%]

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

  • 🟩 throughput [+93893.730op/s; +101202.117op/s] or [+9.325%; +10.051%]

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

  • 🟩 throughput [+50650.866op/s; +55462.149op/s] or [+9.197%; +10.071%]

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

  • 🟩 throughput [+24968.443op/s; +34594.950op/s] or [+5.589%; +7.743%]

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

  • 🟩 throughput [+71261.632op/s; +91447.146op/s] or [+7.962%; +10.217%]

Known flaky benchmarks without significant changes:

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

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8815) 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.32 ± (72.28 - 72.78) ms70.19 ± (70.18 - 70.54) ms-2.9%
.NET Framework 4.8 - Bailout
duration76.30 ± (76.30 - 76.71) ms76.11 ± (76.25 - 76.81) ms-0.3%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1075.36 ± (1075.68 - 1082.82) ms1080.10 ± (1078.28 - 1083.99) ms+0.4%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.39 ± (22.34 - 22.44) ms22.13 ± (22.10 - 22.16) ms-1.2%
process.time_to_main_ms83.57 ± (83.29 - 83.86) ms80.67 ± (80.50 - 80.85) ms-3.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.94 ± (10.94 - 10.94) MB10.92 ± (10.92 - 10.93) MB-0.2%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.14 ± (22.11 - 22.16) ms22.46 ± (22.41 - 22.52) ms+1.5%✅⬆️
process.time_to_main_ms82.87 ± (82.70 - 83.04) ms85.22 ± (84.93 - 85.52) ms+2.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.97 ± (10.97 - 10.98) MB10.97 ± (10.97 - 10.98) MB-0.0%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms209.31 ± (208.27 - 210.35) ms209.90 ± (208.93 - 210.87) ms+0.3%✅⬆️
process.time_to_main_ms527.08 ± (525.94 - 528.23) ms529.19 ± (527.85 - 530.53) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.84 ± (48.80 - 48.88) MB48.62 ± (48.58 - 48.65) MB-0.5%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.2%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.06 ± (21.01 - 21.11) ms21.24 ± (21.19 - 21.30) ms+0.9%✅⬆️
process.time_to_main_ms72.67 ± (72.43 - 72.92) ms72.88 ± (72.57 - 73.18) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.64 ± (10.63 - 10.64) MB10.62 ± (10.62 - 10.62) MB-0.2%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.78 ± (20.74 - 20.81) ms20.88 ± (20.84 - 20.91) ms+0.5%✅⬆️
process.time_to_main_ms71.85 ± (71.69 - 72.00) ms71.72 ± (71.58 - 71.87) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.75 ± (10.75 - 10.75) MB10.73 ± (10.73 - 10.73) MB-0.2%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms372.25 ± (370.15 - 374.36) ms372.18 ± (369.60 - 374.77) ms-0.0%
process.time_to_main_ms534.88 ± (533.87 - 535.90) ms534.73 ± (533.59 - 535.86) ms-0.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.20 ± (50.18 - 50.22) MB50.10 ± (50.08 - 50.13) MB-0.2%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.14 ± (19.11 - 19.17) ms19.09 ± (19.06 - 19.12) ms-0.3%
process.time_to_main_ms69.05 ± (68.91 - 69.19) ms69.36 ± (69.24 - 69.48) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.68 ± (7.67 - 7.68) MB7.70 ± (7.69 - 7.70) MB+0.3%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.19 ± (19.16 - 19.23) ms19.39 ± (19.35 - 19.43) ms+1.0%✅⬆️
process.time_to_main_ms71.71 ± (71.50 - 71.93) ms73.01 ± (72.76 - 73.27) ms+1.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.73 ± (7.72 - 7.73) MB7.72 ± (7.72 - 7.73) MB-0.0%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms302.60 ± (300.34 - 304.86) ms297.97 ± (295.78 - 300.17) ms-1.5%
process.time_to_main_ms483.22 ± (482.26 - 484.17) ms483.56 ± (482.57 - 484.55) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.16 ± (37.13 - 37.19) MB37.16 ± (37.14 - 37.19) MB+0.0%✅⬆️
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
duration203.43 ± (202.95 - 203.85) ms200.75 ± (200.75 - 201.71) ms-1.3%
.NET Framework 4.8 - Bailout
duration206.31 ± (206.11 - 207.13) ms206.86 ± (206.05 - 207.05) ms+0.3%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1209.20 ± (1208.50 - 1214.80) ms1209.13 ± (1205.21 - 1210.61) ms-0.0%
.NET Core 3.1 - Baseline
process.internal_duration_ms195.84 ± (195.42 - 196.25) ms196.61 ± (196.16 - 197.07) ms+0.4%✅⬆️
process.time_to_main_ms85.11 ± (84.85 - 85.38) ms85.21 ± (84.91 - 85.50) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.06 ± (16.03 - 16.08) MB16.04 ± (16.02 - 16.06) MB-0.1%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.1%
.NET Core 3.1 - Bailout
process.internal_duration_ms195.68 ± (195.18 - 196.18) ms195.21 ± (194.88 - 195.54) ms-0.2%
process.time_to_main_ms86.57 ± (86.29 - 86.84) ms85.78 ± (85.55 - 86.02) ms-0.9%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.10 ± (16.08 - 16.13) MB16.10 ± (16.09 - 16.12) MB-0.0%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (20 - 21)-0.4%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms389.53 ± (388.17 - 390.88) ms388.22 ± (386.80 - 389.64) ms-0.3%
process.time_to_main_ms543.56 ± (542.27 - 544.85) ms540.28 ± (539.19 - 541.38) ms-0.6%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.54 ± (58.33 - 58.75) MB58.12 ± (57.89 - 58.35) MB-0.7%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.4%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms202.15 ± (201.73 - 202.58) ms201.61 ± (201.16 - 202.05) ms-0.3%
process.time_to_main_ms74.40 ± (74.17 - 74.64) ms74.20 ± (73.91 - 74.50) ms-0.3%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.29 ± (16.27 - 16.31) MB16.39 ± (16.36 - 16.42) MB+0.6%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.1%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms202.42 ± (202.05 - 202.79) ms199.68 ± (199.25 - 200.11) ms-1.4%
process.time_to_main_ms75.89 ± (75.72 - 76.06) ms74.74 ± (74.51 - 74.97) ms-1.5%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.41 ± (16.38 - 16.44) MB16.48 ± (16.46 - 16.51) MB+0.4%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.9%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms585.52 ± (582.77 - 588.26) ms584.45 ± (581.91 - 586.98) ms-0.2%
process.time_to_main_ms554.61 ± (553.27 - 555.94) ms550.80 ± (549.78 - 551.81) ms-0.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.47 ± (61.36 - 61.58) MB61.32 ± (61.24 - 61.41) MB-0.2%
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.3%
.NET 8 - Baseline
process.internal_duration_ms199.59 ± (199.15 - 200.03) ms197.96 ± (197.47 - 198.45) ms-0.8%
process.time_to_main_ms73.40 ± (73.14 - 73.66) ms72.92 ± (72.71 - 73.12) ms-0.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.73 ± (11.71 - 11.76) MB11.73 ± (11.71 - 11.75) MB-0.0%
runtime.dotnet.threads.count19 ± (19 - 19)18 ± (18 - 18)-1.6%
.NET 8 - Bailout
process.internal_duration_ms198.72 ± (198.37 - 199.08) ms197.36 ± (196.90 - 197.82) ms-0.7%
process.time_to_main_ms74.43 ± (74.20 - 74.66) ms74.15 ± (73.94 - 74.37) ms-0.4%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.76 ± (11.74 - 11.78) MB11.79 ± (11.77 - 11.82) MB+0.3%✅⬆️
runtime.dotnet.threads.count20 ± (19 - 20)19 ± (19 - 19)-0.9%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms511.47 ± (508.53 - 514.42) ms509.85 ± (507.18 - 512.52) ms-0.3%
process.time_to_main_ms500.80 ± (499.92 - 501.69) ms502.55 ± (501.75 - 503.35) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.96 ± (50.92 - 50.99) MB50.96 ± (50.92 - 51.00) MB+0.0%✅⬆️
runtime.dotnet.threads.count30 ± (29 - 30)30 ± (30 - 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 (8815) - mean (70ms)  : 68, 73
    master - mean (73ms)  : 69, 76

    section Bailout
    This PR (8815) - mean (77ms)  : 72, 81
    master - mean (77ms)  : 74, 79

    section CallTarget+Inlining+NGEN
    This PR (8815) - mean (1,081ms)  : 1040, 1123
    master - mean (1,079ms)  : 1025, 1133

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 (8815) - mean (109ms)  : 106, 112
    master - mean (113ms)  : 108, 119

    section Bailout
    This PR (8815) - mean (115ms)  : 108, 122
    master - mean (112ms)  : 108, 116

    section CallTarget+Inlining+NGEN
    This PR (8815) - mean (775ms)  : 753, 796
    master - mean (773ms)  : 755, 791

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

    section Bailout
    This PR (8815) - mean (99ms)  : 95, 103
    master - mean (99ms)  : 96, 102

    section CallTarget+Inlining+NGEN
    This PR (8815) - mean (938ms)  : 894, 982
    master - mean (936ms)  : 897, 975

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8815) - mean (96ms)  : 93, 98
    master - mean (95ms)  : 92, 97

    section Bailout
    This PR (8815) - mean (100ms)  : 95, 106
    master - mean (98ms)  : 94, 103

    section CallTarget+Inlining+NGEN
    This PR (8815) - mean (812ms)  : 777, 846
    master - mean (815ms)  : 776, 855

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 (8815) - mean (201ms)  : 195, 207
    master - mean (203ms)  : 198, 208

    section Bailout
    This PR (8815) - mean (207ms)  : 201, 212
    master - mean (207ms)  : 201, 213

    section CallTarget+Inlining+NGEN
    This PR (8815) - mean (1,208ms)  : 1172, 1244
    master - mean (1,212ms)  : 1166, 1257

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 (8815) - mean (291ms)  : 283, 299
    master - mean (291ms)  : 282, 300

    section Bailout
    This PR (8815) - mean (291ms)  : 284, 297
    master - mean (292ms)  : 283, 301

    section CallTarget+Inlining+NGEN
    This PR (8815) - mean (971ms)  : 950, 992
    master - mean (973ms)  : 950, 995

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8815) - mean (286ms)  : 280, 291
    master - mean (286ms)  : 276, 295

    section Bailout
    This PR (8815) - mean (284ms)  : 279, 289
    master - mean (288ms)  : 283, 292

    section CallTarget+Inlining+NGEN
    This PR (8815) - mean (1,166ms)  : 1127, 1204
    master - mean (1,172ms)  : 1129, 1214

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8815) - mean (281ms)  : 274, 288
    master - mean (283ms)  : 274, 292

    section Bailout
    This PR (8815) - mean (281ms)  : 276, 286
    master - mean (284ms)  : 279, 288

    section CallTarget+Inlining+NGEN
    This PR (8815) - mean (1,044ms)  : 1002, 1087
    master - mean (1,045ms)  : 998, 1092

Loading

@dudikeleti
dudikeleti marked this pull request as ready for review June 23, 2026 08:58
@dudikeleti
dudikeleti requested a review from a team as a code owner June 23, 2026 08:58
@dudikeleti
dudikeleti requested a review from jpbempel June 23, 2026 08:58
@dudikeleti
dudikeleti enabled auto-merge (squash) June 23, 2026 08:58

@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: 9258f47779

ℹ️ 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 thread tracer/src/Datadog.Trace/Debugger/ExceptionAutoInstrumentation/ILAnalyzer.cs Outdated
dudikeleti and others added 6 commits June 23, 2026 11:47
Scan exception replay call operands through metadata instead of Module.ResolveMethod so unavailable dependencies are not loaded while detecting ExceptionDispatchInfo.Throw frames.

Co-authored-by: Cursor <[email protected]>
@dudikeleti
dudikeleti force-pushed the dudik/exception-replay-metadata-il-analysis branch from 9258f47 to 8c2bb7c Compare June 23, 2026 10:11
@dudikeleti
dudikeleti merged commit d5dd09f into master Jun 24, 2026
79 of 85 checks passed
@dudikeleti
dudikeleti deleted the dudik/exception-replay-metadata-il-analysis branch June 24, 2026 22:19
@github-actions github-actions Bot added this to the vNext-v3 milestone Jun 24, 2026
dudikeleti added a commit that referenced this pull request Jul 1, 2026
## Summary of changes
- Add a single debugger safety boundaries guide covering
reflection/type-loading risks and customer-code execution policy.
- Make the safety guide visible from `AGENTS.md` so future agents and
reviewers check it before changing debugger safety-sensitive paths.
- Add focused snapshot tests for the current policy around default
object getters, selected exception properties, and supported collection
enumeration.

## Reason for change
Define safety boundaries for debugger code running inside customer
processes. Keeping the reflection audit, customer-code execution policy,
and agent-facing guidance in one document gives reviewers one place to
evaluate the current contract and the representative tests that lock it
in.

## Implementation details
This branch intentionally does not change capture behavior. The tests
document that default object capture reads backing fields without
invoking arbitrary getters, exception capture reads selected
`System.Exception` properties, and supported collection serialization
reads `Count` and enumerates under existing limits. The merged safety
guide classifies related debugger reflection paths and defines when code
may invoke getters, enumerators, exception overrides, attributes, or
`ToString()`.

## Test coverage
- `DebuggerSnapshotCreatorTests.Policy_`
- `DebuggerSnapshotCreatorTests`

Related follow-up PRs:
- #8814: static member capture guard
- #8815: metadata-only Exception Replay IL call scanning
- #8816: metadata-only state-machine attribute checks

---------

Co-authored-by: Cursor <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants