Skip to content

[DuckTyping] Generate proxies in target AssemblyLoadContext - #9167

Merged
tonyredondo merged 9 commits into
masterfrom
fix/ducktyping-assembly-load-context
Sep 7, 2026
Merged

tonyredondo merged 9 commits into
masterfrom
fix/ducktyping-assembly-load-context

Conversation

@tonyredondo

@tonyredondo tonyredondo commented Sep 2, 2026 •

Copy link
Copy Markdown
Member

Summary of changes

  • Generate DuckTyping proxy assemblies in the target assembly's load context.
  • Add compiled fixtures that model the Azure Functions load-context topology and cover both cross-ALC field access and proxy-cache isolation.

Reason for change

Azure Functions can load assemblies with the same identity into the default and a custom AssemblyLoadContext. DuckTyping previously generated its proxy in the default context, so the proxy could resolve a field dependency from the wrong context and throw MissingFieldException.

Implementation details

  • For the net6.0 tracer build, which is selected on .NET 6 and later, enter contextual reflection for the target assembly while defining the dynamic proxy assembly.
  • For the netstandard2.0 and netcoreapp3.1 tracer builds, invoke AssemblyBuilder.DefineDynamicAssembly from a one-shot DynamicMethod associated with the target manifest module. This selects the target load context on .NET Core 2.1 through .NET 5, where contextual reflection cannot solve this case.
  • Keep the .NET Framework path unchanged.
  • Keep the existing cache key based on the exact proxy-definition and target Type identities. Because Type identity includes its load context, the cache already isolates types loaded into different contexts. A new test verifies reuse within one context and separation across contexts containing assemblies with the same identity.
  • Use two lightweight netstandard2.0 fixture projects to provide the target and its duplicated dependency. These projects are test-only build inputs and add no dependencies to the production Datadog.Trace assembly or package.
  • Regenerate the app trimming descriptor to include AssemblyLoadContext.ContextualReflectionScope.

Test coverage

  • Focused cross-ALC tests passed on x64 under Rosetta for netcoreapp2.1, netcoreapp3.0, netcoreapp3.1, net5.0, net6.0, and net10.0.
  • Full DuckTyping suites passed on x64 for netcoreapp2.1 (10,925 passed), netcoreapp3.1 (10,926 passed), and net6.0 (10,926 passed).
  • Datadog.Trace compiled successfully for net461 with 0 warnings and 0 errors.

Other details

Includes and extends the reproduction from #9156.

@tonyredondo tonyredondo added the area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) label Sep 2, 2026
@pr-commenter

pr-commenter Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-09-07 15:08:56

Comparing candidate commit 004ce88 in PR branch fix/ducktyping-assembly-load-context with baseline commit aa8b0ea in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 72 metrics, 0 unstable metrics, 67 known flaky benchmarks, 59 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 ----------------------------------'

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 [-7681.567op/s; -7263.482op/s] or [-9.108%; -8.612%]

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

  • 🟥 throughput [-9247.246op/s; -7477.824op/s] or [-9.402%; -7.603%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 allocated_mem [+1.637KB; +1.637KB] or [+49.731%; +49.747%]
  • 🟥 execution_time [+306.160ms; +310.178ms] or [+151.928%; +153.921%]
  • 🟥 throughput [-55.961op/s; -50.934op/s] or [-10.068%; -9.164%]

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

  • 🟥 allocated_mem [+1.015KB; +1.015KB] or [+37.634%; +37.646%]
  • 🟥 execution_time [+377.657ms; +381.358ms] or [+298.372%; +301.296%]
  • 🟩 throughput [+67.832op/s; +71.919op/s] or [+8.943%; +9.482%]

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

  • 🟥 allocated_mem [+1.090KB; +1.090KB] or [+40.417%; +40.429%]
  • 🟥 execution_time [+395.614ms; +399.806ms] or [+350.103%; +353.813%]

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

  • 🟥 allocated_mem [+4.725KB; +4.726KB] or [+99.482%; +99.497%]
  • 🟥 throughput [-60626.696op/s; -60258.355op/s] or [-47.171%; -46.884%]

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

  • 🟥 allocated_mem [+3.848KB; +3.848KB] or [+81.379%; +81.391%]
  • 🟩 execution_time [-15.553ms; -11.358ms] or [-7.264%; -5.305%]
  • 🟥 throughput [-60171.368op/s; -57408.387op/s] or [-43.922%; -41.905%]

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

  • 🟥 allocated_mem [+4.576KB; +4.576KB] or [+98.954%; +98.966%]
  • 🟥 throughput [-48611.580op/s; -46368.933op/s] or [-43.950%; -41.923%]

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

  • 🟥 allocated_mem [+1.348KB; +1.348KB] or [+109.063%; +109.078%]
  • 🟥 throughput [-294836.252op/s; -291990.525op/s] or [-30.104%; -29.814%]

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

  • 🟥 allocated_mem [+511 bytes; +512 bytes] or [+41.822%; +41.834%]
  • 🟩 execution_time [-26.135ms; -21.293ms] or [-11.655%; -9.496%]
  • 🟥 throughput [-117718.119op/s; -95059.481op/s] or [-12.576%; -10.155%]

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

  • 🟥 allocated_mem [+1.312KB; +1.312KB] or [+108.600%; +108.616%]
  • 🟥 throughput [-165036.031op/s; -148357.867op/s] or [-23.713%; -21.316%]

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

  • 🟥 allocated_mem [+3.378KB; +3.378KB] or [+89.003%; +89.017%]
  • 🟥 throughput [-72214.355op/s; -71452.750op/s] or [-48.599%; -48.087%]

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

  • 🟥 allocated_mem [+3.336KB; +3.336KB] or [+88.150%; +88.161%]
  • 🟥 throughput [-73201.841op/s; -70306.345op/s] or [-46.577%; -44.735%]

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

  • 🟥 allocated_mem [+3.264KB; +3.264KB] or [+88.493%; +88.506%]
  • 🟥 throughput [-56829.791op/s; -54191.413op/s] or [-45.272%; -43.171%]

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

  • 🟩 throughput [+342871.210op/s; +371592.122op/s] or [+11.433%; +12.390%]

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

  • 🟩 execution_time [-19.100ms; -14.762ms] or [-8.804%; -6.805%]

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

  • 🟩 allocated_mem [-13.759KB; -13.757KB] or [-42.326%; -42.318%]
  • 🟥 execution_time [+299.735ms; +300.552ms] or [+149.767%; +150.176%]
  • 🟩 throughput [+945.380op/s; +980.404op/s] or [+10.442%; +10.828%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+299.846ms; +309.557ms] or [+151.213%; +156.111%]
  • 🟩 throughput [+2222.102op/s; +2551.983op/s] or [+16.996%; +19.519%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+300.022ms; +302.705ms] or [+151.128%; +152.479%]
  • 🟩 throughput [+1733.138op/s; +1864.381op/s] or [+16.733%; +18.000%]

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

  • 🟥 execution_time [+297.484ms; +298.731ms] or [+146.112%; +146.725%]
  • 🟩 throughput [+579.632op/s; +588.791op/s] or [+15.366%; +15.609%]

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

  • 🟥 execution_time [+296.732ms; +299.331ms] or [+145.061%; +146.332%]
  • 🟩 throughput [+2693.862op/s; +2754.584op/s] or [+39.137%; +40.019%]

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

  • 🟥 execution_time [+300.681ms; +301.159ms] or [+150.280%; +150.519%]
  • 🟩 throughput [+1422.170op/s; +1442.367op/s] or [+28.229%; +28.630%]

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

  • 🟩 execution_time [-143.650µs; -136.106µs] or [-29.493%; -27.944%]
  • 🟩 throughput [+803.107op/s; +858.048op/s] or [+39.115%; +41.791%]

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

  • 🟩 execution_time [-135.300µs; -108.579µs] or [-31.031%; -24.903%]
  • 🟩 throughput [+823.184op/s; +946.477op/s] or [+35.789%; +41.149%]

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

  • 🟩 execution_time [-141.422µs; -119.362µs] or [-30.300%; -25.574%]
  • 🟩 throughput [+765.470op/s; +849.559op/s] or [+35.336%; +39.217%]

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

  • 🟩 execution_time [-127.309µs; -122.939µs] or [-34.372%; -33.193%]
  • 🟩 throughput [+1352.873op/s; +1405.058op/s] or [+50.104%; +52.037%]

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

  • 🟩 execution_time [-96.338µs; -72.589µs] or [-30.756%; -23.174%]
  • 🟩 throughput [+1062.405op/s; +1269.907op/s] or [+33.118%; +39.587%]

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

  • 🟩 execution_time [-134.963µs; -112.469µs] or [-36.921%; -30.767%]
  • 🟩 throughput [+1279.567op/s; +1421.097op/s] or [+45.919%; +50.998%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.775ms; +300.511ms] or [+149.619%; +149.986%]

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

  • unstable execution_time [+316.080ms; +389.800ms] or [+343.434%; +423.534%]
  • 🟩 throughput [+824.130op/s; +976.635op/s] or [+6.772%; +8.025%]

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

  • unstable execution_time [+246.131ms; +311.100ms] or [+186.885%; +236.216%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+305.276ms; +349.211ms] or [+140.363%; +160.564%]
  • 🟥 throughput [-515.500op/s; -475.632op/s] or [-46.709%; -43.097%]

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

  • unstable execution_time [+147.857ms; +294.437ms] or [+63.010%; +125.477%]
  • 🟥 throughput [-669.878op/s; -586.457op/s] or [-44.681%; -39.117%]

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

  • 🟥 allocated_mem [+2.305KB; +2.308KB] or [+5.442%; +5.450%]
  • 🟥 execution_time [+349.097ms; +360.688ms] or [+208.801%; +215.734%]
  • 🟥 throughput [-400.571op/s; -360.979op/s] or [-27.891%; -25.134%]

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

  • 🟩 throughput [+51.419op/s; +119.211op/s] or [+5.544%; +12.854%]

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

  • 🟩 execution_time [-192.419µs; -145.122µs] or [-9.747%; -7.351%]
  • 🟩 throughput [+42.081op/s; +54.737op/s] or [+8.307%; +10.805%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+302.316ms; +304.233ms] or [+152.241%; +153.206%]

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

  • 🟥 execution_time [+300.426ms; +303.410ms] or [+150.544%; +152.039%]

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

  • 🟥 execution_time [+301.839ms; +306.323ms] or [+151.631%; +153.884%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+300.346ms; +301.768ms] or [+150.824%; +151.538%]

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

  • 🟥 execution_time [+297.457ms; +310.088ms] or [+147.079%; +153.325%]

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

  • 🟥 execution_time [+301.652ms; +305.519ms] or [+152.891%; +154.850%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+303.352ms; +305.738ms] or [+152.255%; +153.453%]

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

  • 🟥 execution_time [+300.250ms; +306.419ms] or [+149.647%; +152.722%]

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

  • 🟥 execution_time [+299.033ms; +301.621ms] or [+148.766%; +150.054%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472

  • 🟥 throughput [-17927.331op/s; -16398.312op/s] or [-7.209%; -6.594%]

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

  • 🟩 execution_time [-16.523ms; -12.874ms] or [-7.683%; -5.987%]

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

  • unstable execution_time [+6.280µs; +53.914µs] or [+1.551%; +13.317%]

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

  • 🟩 allocated_mem [-19.104KB; -19.080KB] or [-6.969%; -6.960%]
  • unstable execution_time [-32.129µs; +26.036µs] or [-6.350%; +5.146%]
  • unstable throughput [-91.251op/s; +113.810op/s] or [-4.553%; +5.679%]

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

  • unstable execution_time [-78.954µs; -19.231µs] or [-13.682%; -3.333%]

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

  • unstable execution_time [+6.813µs; +11.877µs] or [+16.104%; +28.075%]
  • 🟥 throughput [-5121.301op/s; -3175.377op/s] or [-21.559%; -13.367%]

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

  • unstable execution_time [-13.783µs; -5.399µs] or [-21.383%; -8.377%]
  • unstable throughput [+1417.050op/s; +3215.530op/s] or [+8.694%; +19.728%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.838ms; +304.717ms] or [+153.071%; +154.021%]

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

  • 🟥 execution_time [+299.022ms; +302.190ms] or [+152.201%; +153.814%]

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

  • 🟥 execution_time [+299.756ms; +303.061ms] or [+150.065%; +151.719%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+298.133ms; +300.576ms] or [+148.592%; +149.810%]

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

  • 🟥 execution_time [+302.171ms; +307.745ms] or [+151.736%; +154.535%]

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

  • 🟥 execution_time [+301.625ms; +310.271ms] or [+152.965%; +157.349%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.386ms; +301.332ms] or [+149.834%; +150.306%]
  • 🟩 throughput [+65931566.614op/s; +66290318.525op/s] or [+48.015%; +48.277%]

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

  • unstable execution_time [+328.947ms; +395.695ms] or [+409.104%; +492.117%]

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

  • 🟥 execution_time [+299.214ms; +300.315ms] or [+149.241%; +149.790%]
  • 🟩 throughput [+18180505.299op/s; +19152927.435op/s] or [+8.053%; +8.483%]

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

  • 🟩 throughput [+77481.369op/s; +95994.478op/s] or [+7.234%; +8.963%]

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

  • 🟩 throughput [+78456.238op/s; +107965.729op/s] or [+6.073%; +8.357%]

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

  • 🟩 throughput [+61359.621op/s; +69408.950op/s] or [+6.094%; +6.893%]

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

  • 🟩 throughput [+47436.588op/s; +52453.659op/s] or [+8.614%; +9.525%]

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

  • 🟩 throughput [+23021.740op/s; +32625.608op/s] or [+5.153%; +7.303%]

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

  • 🟩 throughput [+61840.729op/s; +79041.743op/s] or [+6.909%; +8.831%]

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.ObjectExtractorSimpleBody net472
  • 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 netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive 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.StartFinishScope netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

@tonyredondo

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-02T18:13:46.035990Z d1aeae5 Draft marked ready
🔒 Security Review ✅ Completed 2026-09-02T18:14:15.496830Z d1aeae5 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

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

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: d1aeae51e8

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: d1aeae51e8

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

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

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

✅ No regressions detected

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

@tonyredondo
tonyredondo marked this pull request as ready for review September 2, 2026 18:10
@tonyredondo
tonyredondo requested review from a team as code owners September 2, 2026 18:10
@tonyredondo
tonyredondo requested review from zacharycmontoya and removed request for a team September 2, 2026 18:10

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

Fixes the issue seen empirically at #8911

@andrewlock andrewlock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, mostly minor comments about the build side.

I wonder if we should be trying to fast-path the default ALC to avoid the reflection call (mostly for <.NET 6)?

Comment thread tracer/build/_build/Build.Steps.cs Outdated
Comment thread tracer/test/Datadog.Trace.DuckTyping.Tests/AssemblyLoadContextTests.cs Outdated
Comment thread tracer/test/Datadog.Trace.DuckTyping.Tests/Datadog.Trace.DuckTyping.Tests.csproj Outdated
Comment thread tracer/src/Datadog.Trace/DuckTyping/DuckType.Statics.cs
@tonyredondo
tonyredondo merged commit 4fb2fcd into master Sep 7, 2026
144 checks passed
@tonyredondo
tonyredondo deleted the fix/ducktyping-assembly-load-context branch September 7, 2026 16:24
@github-actions github-actions Bot added this to the vNext-v3 milestone Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants