Skip to content

[CI Visibility] Fix coverage rewrites with shared framework dependencies - #9102

Open
tonyredondo wants to merge 5 commits into
masterfrom
tony/fix-coverage-shared-framework-rewrite
Open

[CI Visibility] Fix coverage rewrites with shared framework dependencies#9102
tonyredondo wants to merge 5 commits into
masterfrom
tony/fix-coverage-shared-framework-rewrite

Conversation

@tonyredondo

@tonyredondo tonyredondo commented Aug 24, 2026

Copy link
Copy Markdown
Member

Summary of changes

  • resolve coverage rewrite dependencies from runtimeconfig-declared .NET shared frameworks
  • stage and validate rewritten DLL/PDB files before replacing the originals
  • restore the original assembly and symbols if publication fails

Reason for change

The coverage collector could not resolve assemblies that were available only through an installed shared framework, such as Microsoft.Extensions.Logging.Abstractions from Microsoft.AspNetCore.App. If Mono.Cecil encountered that dependency while writing metadata, it had already truncated the assembly under test and left a damaged DLL on disk.

Implementation details

  • discover framework, frameworks, and includedFrameworks entries from sibling *.runtimeconfig.json files
  • derive the installed shared-framework root from System.Private.CoreLib and select the highest compatible patch version using full semantic-version ordering
  • cache immutable shared-framework search directories per output directory while keeping Cecil assemblies resolver-owned
  • write DLL/PDB output to unique sibling transaction files with non-assembly extensions, validate both by reopening them, then publish with File.Replace backups and rollback
  • restore both backups after partial publication failures, including when the target assembly is missing or already replaced

Test coverage

  • CoverageResolverTests on net10.0 and net8.0
  • CoverageRewriteTests on net10.0
  • Datadog.Trace.Coverage.collector project build
  • net10.0 three-project reproduction with Microsoft.AspNetCore.App and an optional LogLevel parameter

Other details

Windows and Linux CI provide the remaining platform coverage for replacement and locking semantics.

Fixes #9023

@pr-commenter

pr-commenter Bot commented Aug 24, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-24 12:22:08

Comparing candidate commit fe1c0b0 in PR branch tony/fix-coverage-shared-framework-rewrite with baseline commit e476ea7 in branch master.

📊 Benchmarking dashboard

Found 1 performance improvements and 0 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 net6.0

  • 🟩 throughput [+7663.257op/s; +9582.225op/s] or [+5.206%; +6.509%]

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 [-7977.610op/s; -7501.943op/s] or [-9.459%; -8.895%]

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

  • 🟥 throughput [-10728.162op/s; -9122.333op/s] or [-10.908%; -9.275%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 allocated_mem [+1.541KB; +1.541KB] or [+46.817%; +46.831%]
  • 🟥 execution_time [+311.301ms; +314.624ms] or [+154.478%; +156.127%]
  • 🟥 throughput [-60.438op/s; -55.877op/s] or [-10.874%; -10.053%]

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

  • 🟥 allocated_mem [+1.012KB; +1.012KB] or [+37.524%; +37.537%]
  • 🟥 execution_time [+382.855ms; +387.156ms] or [+302.479%; +305.877%]
  • 🟩 throughput [+72.273op/s; +74.604op/s] or [+9.529%; +9.836%]

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

  • 🟥 allocated_mem [+1.090KB; +1.090KB] or [+40.417%; +40.429%]
  • 🟥 execution_time [+401.123ms; +403.788ms] or [+354.979%; +357.337%]

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

  • 🟥 allocated_mem [+4.725KB; +4.726KB] or [+99.482%; +99.497%]
  • 🟥 throughput [-61941.939op/s; -61538.607op/s] or [-48.194%; -47.880%]

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

  • 🟥 allocated_mem [+3.848KB; +3.848KB] or [+81.379%; +81.391%]
  • 🟩 execution_time [-16.566ms; -12.368ms] or [-7.737%; -5.776%]
  • 🟥 throughput [-60077.525op/s; -57305.434op/s] or [-43.853%; -41.830%]

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

  • 🟥 allocated_mem [+4.576KB; +4.576KB] or [+98.954%; +98.966%]
  • 🟥 throughput [-48633.021op/s; -46383.984op/s] or [-43.970%; -41.936%]

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

  • 🟥 allocated_mem [+1.348KB; +1.348KB] or [+109.063%; +109.078%]
  • 🟥 throughput [-300644.975op/s; -291339.197op/s] or [-30.697%; -29.747%]

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

  • 🟥 allocated_mem [+511 bytes; +512 bytes] or [+41.822%; +41.834%]
  • 🟩 execution_time [-26.502ms; -21.610ms] or [-11.819%; -9.637%]
  • 🟥 throughput [-96203.518op/s; -72874.451op/s] or [-10.278%; -7.785%]

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

  • 🟥 allocated_mem [+1.312KB; +1.312KB] or [+108.600%; +108.616%]
  • 🟥 throughput [-168096.221op/s; -151472.759op/s] or [-24.152%; -21.764%]

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

  • 🟥 allocated_mem [+3.378KB; +3.378KB] or [+89.003%; +89.017%]
  • 🟥 throughput [-73277.302op/s; -72470.882op/s] or [-49.315%; -48.772%]

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

  • 🟥 allocated_mem [+3.336KB; +3.336KB] or [+88.150%; +88.161%]
  • 🟥 throughput [-72928.900op/s; -70039.788op/s] or [-46.403%; -44.565%]

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

  • 🟥 allocated_mem [+3.264KB; +3.264KB] or [+88.493%; +88.506%]
  • 🟥 throughput [-57092.528op/s; -54468.368op/s] or [-45.482%; -43.391%]

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

  • 🟩 throughput [+315656.253op/s; +346479.520op/s] or [+10.525%; +11.553%]

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

  • 🟩 execution_time [-19.271ms; -14.933ms] or [-8.883%; -6.884%]

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

  • 🟩 allocated_mem [-13.759KB; -13.756KB] or [-42.324%; -42.316%]
  • 🟥 execution_time [+300.161ms; +300.782ms] or [+149.980%; +150.291%]
  • 🟩 throughput [+978.782op/s; +997.881op/s] or [+10.811%; +11.021%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+299.613ms; +302.933ms] or [+151.095%; +152.770%]
  • 🟩 throughput [+2396.746op/s; +2611.363op/s] or [+18.332%; +19.973%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+300.031ms; +302.592ms] or [+151.132%; +152.422%]
  • 🟩 throughput [+1902.832op/s; +2029.953op/s] or [+18.371%; +19.598%]

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

  • 🟥 execution_time [+294.898ms; +295.805ms] or [+144.842%; +145.288%]
  • 🟩 throughput [+541.806op/s; +559.443op/s] or [+14.363%; +14.831%]

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

  • 🟥 execution_time [+297.478ms; +298.880ms] or [+145.426%; +146.111%]
  • 🟩 throughput [+2674.208op/s; +2719.187op/s] or [+38.851%; +39.505%]

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

  • 🟥 execution_time [+301.389ms; +302.317ms] or [+150.634%; +151.098%]
  • 🟩 throughput [+1367.838op/s; +1396.397op/s] or [+27.150%; +27.717%]

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

  • 🟩 execution_time [-138.956µs; -133.364µs] or [-28.529%; -27.382%]
  • 🟩 throughput [+778.162op/s; +818.448op/s] or [+37.900%; +39.862%]

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

  • 🟩 execution_time [-104.370µs; -76.085µs] or [-23.937%; -17.450%]
  • 🟩 throughput [+527.067op/s; +671.198op/s] or [+22.915%; +29.181%]

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

  • 🟩 execution_time [-136.456µs; -114.308µs] or [-29.236%; -24.491%]
  • 🟩 throughput [+721.387op/s; +806.933op/s] or [+33.301%; +37.250%]

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

  • 🟩 execution_time [-122.628µs; -117.716µs] or [-33.109%; -31.783%]
  • 🟩 throughput [+1268.737op/s; +1329.529op/s] or [+46.988%; +49.240%]

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

  • 🟩 execution_time [-94.686µs; -70.925µs] or [-30.228%; -22.643%]
  • 🟩 throughput [+1030.766op/s; +1238.944op/s] or [+32.132%; +38.622%]

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

  • 🟩 execution_time [-131.488µs; -108.812µs] or [-35.970%; -29.767%]
  • 🟩 throughput [+1217.823op/s; +1365.836op/s] or [+43.703%; +49.014%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.586ms; +300.438ms] or [+149.524%; +149.949%]

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

  • 🟥 execution_time [+403.014ms; +411.073ms] or [+437.891%; +446.648%]
  • 🟩 throughput [+879.490op/s; +1089.422op/s] or [+7.227%; +8.952%]

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

  • unstable execution_time [+296.253ms; +351.239ms] or [+224.942%; +266.693%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+377.236ms; +436.107ms] or [+173.449%; +200.518%]
  • 🟥 throughput [-581.685op/s; -532.035op/s] or [-52.706%; -48.208%]

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

  • unstable execution_time [+201.435ms; +334.717ms] or [+85.843%; +142.642%]
  • 🟥 throughput [-675.562op/s; -591.682op/s] or [-45.060%; -39.465%]

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

  • 🟥 execution_time [+328.686ms; +337.256ms] or [+196.592%; +201.718%]
  • 🟥 throughput [-406.711op/s; -365.927op/s] or [-28.319%; -25.479%]

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

  • 🟩 execution_time [-149.364µs; -98.709µs] or [-7.566%; -5.000%]
  • 🟩 throughput [+28.437op/s; +41.804op/s] or [+5.614%; +8.252%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+299.996ms; +301.642ms] or [+151.072%; +151.901%]

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

  • 🟥 execution_time [+300.248ms; +301.819ms] or [+150.455%; +151.242%]

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

  • 🟥 execution_time [+302.338ms; +305.439ms] or [+151.882%; +153.440%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+303.064ms; +305.326ms] or [+152.189%; +153.324%]

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

  • 🟥 execution_time [+297.658ms; +300.677ms] or [+147.179%; +148.671%]

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

  • 🟥 execution_time [+303.443ms; +307.329ms] or [+153.798%; +155.768%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+303.062ms; +305.630ms] or [+152.110%; +153.399%]

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

  • 🟥 execution_time [+299.156ms; +302.269ms] or [+149.102%; +150.653%]
  • 🟩 throughput [+40157.873op/s; +44233.457op/s] or [+7.974%; +8.783%]

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

  • 🟥 execution_time [+300.834ms; +303.819ms] or [+149.662%; +151.147%]

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

  • unstable execution_time [-13.212ms; +16.622ms] or [-6.144%; +7.729%]

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

  • unstable execution_time [+6.911µs; +49.583µs] or [+1.707%; +12.247%]

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

  • 🟩 allocated_mem [-20.519KB; -20.497KB] or [-7.485%; -7.477%]
  • unstable execution_time [-29549.740ns; +29124.499ns] or [-5.840%; +5.756%]
  • unstable throughput [-101.830op/s; +102.905op/s] or [-5.081%; +5.135%]

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

  • unstable execution_time [-56.051µs; +5.834µs] or [-9.713%; +1.011%]

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

  • unstable execution_time [+9.492µs; +16.091µs] or [+22.436%; +38.034%]
  • 🟥 throughput [-6227.277op/s; -3991.078op/s] or [-26.215%; -16.801%]

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

  • unstable execution_time [-13.645µs; -5.757µs] or [-21.169%; -8.932%]
  • unstable throughput [+1407.607op/s; +3109.481op/s] or [+8.636%; +19.078%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+301.892ms; +303.223ms] or [+152.593%; +153.266%]

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

  • 🟥 execution_time [+302.730ms; +305.094ms] or [+154.089%; +155.292%]

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

  • 🟥 execution_time [+299.330ms; +301.615ms] or [+149.852%; +150.995%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+299.052ms; +300.709ms] or [+149.051%; +149.877%]

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

  • 🟥 execution_time [+302.130ms; +304.786ms] or [+151.716%; +153.049%]

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

  • 🟥 execution_time [+303.130ms; +305.388ms] or [+153.728%; +154.873%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+298.952ms; +299.844ms] or [+149.119%; +149.564%]
  • 🟩 throughput [+61113284.285op/s; +61456344.552op/s] or [+44.506%; +44.756%]

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

  • 🟥 execution_time [+419.575ms; +422.787ms] or [+521.816%; +525.811%]

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

  • 🟥 execution_time [+300.003ms; +301.185ms] or [+149.635%; +150.224%]

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

  • 🟩 throughput [+76215.482op/s; +94689.040op/s] or [+7.116%; +8.841%]

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

  • 🟩 throughput [+68688.882op/s; +78484.138op/s] or [+6.822%; +7.795%]

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

  • 🟩 throughput [+41788.468op/s; +47689.077op/s] or [+7.588%; +8.659%]

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 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 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.StartFinishSpan net6.0
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

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

✅ No regressions detected

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

@tonyredondo

Copy link
Copy Markdown
Member Author

@codex review

@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: 6ab68d9e57

ℹ️ 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.Coverage.collector/CoverageAssemblyResolver.cs Outdated
Comment on lines +487 to +490
.Where(candidate => candidate.Parsed &&
candidate.Version.Major == requestedVersion.Major &&
candidate.Version.Minor == requestedVersion.Minor &&
candidate.Version >= requestedVersion)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Honor runtime roll-forward when locating shared frameworks

When a test application relies on a permissive runtime policy such as rollForward: Major or DOTNET_ROLL_FORWARD=Major, the host can successfully run an 8.0 runtimeconfig using an installed 9.0 shared framework. This filter nevertheless requires the installed framework to have exactly the requested major and minor, so the collector cannot find dependencies that the running application is actually loading and the coverage rewrite still fails. Framework selection needs to account for the effective roll-forward policy instead of hard-coding same-major/same-minor compatibility.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is a valid broader edge case, but I am keeping it outside the scope of this fix. The resolver here follows the Coverlet approach referenced by issue 9023 and targets same-major/minor patch resolution. Correct major roll-forward support must account for the effective host policy from runtimeconfig settings, per-framework overrides, environment variables, command-line options, and prerelease behavior. Simply probing a higher major could select a framework the host would not use. I am leaving this thread unresolved rather than treating that partial behavior as fixed.

Comment thread tracer/src/Datadog.Trace.Coverage.collector/AssemblyProcessor.cs Outdated
@tonyredondo

Copy link
Copy Markdown
Member Author

@codex review

@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: 8178eddf8d

ℹ️ 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.Coverage.collector/AssemblyProcessor.cs Outdated
Comment thread tracer/src/Datadog.Trace.Coverage.collector/AssemblyProcessor.cs
Comment thread tracer/src/Datadog.Trace.Coverage.collector/AssemblyProcessor.cs Outdated
Comment thread tracer/src/Datadog.Trace.Coverage.collector/CoverageAssemblyResolver.cs Outdated
@tonyredondo

Copy link
Copy Markdown
Member Author

@codex review

@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: fe1c0b0bef

ℹ️ 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.Coverage.collector/AssemblyProcessor.cs
@tonyredondo
tonyredondo marked this pull request as ready for review August 24, 2026 13:19
@tonyredondo
tonyredondo requested a review from a team as a code owner August 24, 2026 13:19

@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: fe1c0b0bef

ℹ️ 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.Coverage.collector/CoverageAssemblyResolver.cs Outdated
Comment thread tracer/src/Datadog.Trace.Coverage.collector/CoverageAssemblyResolver.cs Outdated
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.

[BUG]: DatadogCoverage writes a damaged assembly when a referenced assembly is only in a shared framework

1 participant