Skip to content

Fix Yarp reparenting if OpenTelemetry.Instrumentation.Http is present#8321

Draft
bouwkast wants to merge 5 commits intomasterfrom
steven/update-yarp
Draft

Fix Yarp reparenting if OpenTelemetry.Instrumentation.Http is present#8321
bouwkast wants to merge 5 commits intomasterfrom
steven/update-yarp

Conversation

@bouwkast
Copy link
Copy Markdown
Collaborator

@bouwkast bouwkast commented Mar 17, 2026

Summary of changes

This fixes a reparenting issue with Yarp when OpenTelemetry.Instrumentation.Http is installed as the CreateNoOutputPropagator() would cause some reparenting.

Reason for change

Noticed in #8128 that DistributedContextPropagator.CreateNoOutputPropagator() still causes broken reparenting only when OpenTelemetry.Instrumentation.Http.

Figured the same issue affected this and it does somewhat it is a bit different though in the sense that it adds

Implementation details

Changed handler.ActivityHeadersPropagator = DistributedContextPropagator.CreateNoOutputPropagator() to handler.ActivityHeadersPropagator = null

Test coverage

Update the sample application to have the OpenTelemetry.Instrumentation.Http

Reran the tests and snapshotted the new snapshots that showed some span links with the terminated context

Applied the fix, reran the tests and applied the new "fixed" snapshot

Other details

Interestingly there were some span links here with terminated_context - I didn't see this with the Ocelot reproduction - you should be able to see these in the commits. I did the same change here that I did in the Ocelot sample where I null out the propagator for the client used in the sample app.

var handler = new SocketsHttpHandler { ActivityHeadersPropagator = null };
using var client = new HttpClient(handler);

For context:

Scenario SpanLinks Where
No OTel 0
OTel + NoOutputPropagator 2 Both aspnet_core.request spans
OTel + null (YARP handler only) 1 Only the inbound proxy aspnet_core.request
OTel + null (YARP + Worker null) 1 Only the inbound proxy aspnet_core.request

Setting the handler.ActivityHeadersPropagator to null resolves the Yarp one; however we still would get the one form the HttpClient so nulling that one out does the same to remove that span link.

I'm thinking we may want to consider attempting to resolve this more correctly in the future instead of one off (if possible), but we also haven't really seen this specific issue in the wild (not saying that it hasn't happened though).

Regardless I think this is a safe change, it was initially going to be null but I recommended to change it to the no-opt 😅

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 17, 2026

Snapshots difference summary

The following differences have been observed in committed snapshots. It is meant to help the reviewer.
The diff is simplistic, so please check some files anyway while we improve it.

1 occurrences of :

-      http-client-handler-type: System.Net.Http.HttpClientHandler,
+      http-client-handler-type: System.Net.Http.SocketsHttpHandler,

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Mar 17, 2026

Benchmarks

Benchmark execution time: 2026-03-27 19:37:20

Comparing candidate commit 9643c5c in PR branch steven/update-yarp with baseline commit 5ff69b3 in branch master.

Found 8 performance improvements and 12 performance regressions! Performance is the same for 253 metrics, 15 unstable metrics.

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.Asm.AppSecBodyBenchmark.AllCycleSimpleBody netcoreapp3.1

  • 🟥 execution_time [+17.993ms; +23.995ms] or [+9.059%; +12.081%]

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

  • 🟥 execution_time [+13.564ms; +19.417ms] or [+6.920%; +9.906%]

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

  • 🟥 execution_time [+22.535ms; +23.324ms] or [+12.609%; +13.051%]

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

  • 🟩 execution_time [-16.336ms; -6.798ms] or [-14.874%; -6.190%]
  • 🟩 throughput [+585.281op/s; +1292.294op/s] or [+6.067%; +13.396%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+25.372ms; +31.418ms] or [+13.098%; +16.219%]
  • 🟥 throughput [-92.086op/s; -59.563op/s] or [-7.960%; -5.148%]

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

  • 🟥 execution_time [+35.728ms; +42.074ms] or [+19.441%; +22.895%]
  • 🟥 throughput [-170.743op/s; -120.299op/s] or [-10.312%; -7.265%]

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

  • 🟥 execution_time [+132.150µs; +138.637µs] or [+9.513%; +9.980%]
  • 🟥 throughput [-65.606op/s; -62.284op/s] or [-9.113%; -8.652%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1

  • 🟥 throughput [-194.606op/s; -144.741op/s] or [-36.923%; -27.462%]

scenario:Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery net472

  • 🟩 throughput [+27807.953op/s; +31681.108op/s] or [+8.228%; +9.374%]

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

  • 🟥 throughput [-36865.190op/s; -25763.526op/s] or [-7.649%; -5.345%]

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

  • 🟩 execution_time [-17.101ms; -15.953ms] or [-9.149%; -8.535%]

scenario:Benchmarks.Trace.NLogBenchmark.EnrichedLog net472

  • 🟩 throughput [+9715.560op/s; +10289.439op/s] or [+7.607%; +8.056%]

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

  • 🟥 execution_time [+11.207ms; +15.367ms] or [+6.006%; +8.236%]

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

  • 🟩 execution_time [-115.918ms; -114.752ms] or [-58.696%; -58.106%]

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

  • 🟩 throughput [+14804042.786op/s; +15815980.058op/s] or [+6.565%; +7.013%]

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

  • 🟩 execution_time [-21.341ms; -16.033ms] or [-9.804%; -7.365%]

@dd-trace-dotnet-ci-bot
Copy link
Copy Markdown

dd-trace-dotnet-ci-bot bot commented Mar 17, 2026

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8321) 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
duration71.85 ± (72.05 - 72.56) ms72.41 ± (72.36 - 72.72) ms+0.8%✅⬆️
.NET Framework 4.8 - Bailout
duration76.03 ± (75.86 - 76.21) ms76.16 ± (76.08 - 76.41) ms+0.2%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1074.50 ± (1074.37 - 1080.06) ms1072.68 ± (1077.62 - 1085.41) ms-0.2%
.NET Core 3.1 - Baseline
process.internal_duration_ms22.19 ± (22.15 - 22.23) ms22.34 ± (22.31 - 22.38) ms+0.7%✅⬆️
process.time_to_main_ms83.62 ± (83.42 - 83.83) ms83.81 ± (83.63 - 83.99) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.91 ± (10.91 - 10.91) MB10.91 ± (10.91 - 10.91) MB+0.0%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.15 ± (22.12 - 22.19) ms22.51 ± (22.47 - 22.56) ms+1.6%✅⬆️
process.time_to_main_ms84.63 ± (84.45 - 84.82) ms85.23 ± (85.04 - 85.41) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.94 ± (10.94 - 10.95) MB10.94 ± (10.94 - 10.95) MB-0.0%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms224.64 ± (223.32 - 225.96) ms225.21 ± (224.04 - 226.38) ms+0.3%✅⬆️
process.time_to_main_ms533.56 ± (532.39 - 534.73) ms539.53 ± (538.43 - 540.63) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.28 ± (48.25 - 48.31) MB48.23 ± (48.20 - 48.26) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.2%
.NET 6 - Baseline
process.internal_duration_ms21.09 ± (21.05 - 21.12) ms21.05 ± (21.00 - 21.09) ms-0.2%
process.time_to_main_ms72.59 ± (72.42 - 72.76) ms72.06 ± (71.88 - 72.23) ms-0.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.61 ± (10.61 - 10.61) MB10.62 ± (10.62 - 10.63) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.85 ± (20.82 - 20.89) ms21.14 ± (21.10 - 21.18) ms+1.4%✅⬆️
process.time_to_main_ms73.07 ± (72.90 - 73.25) ms73.29 ± (73.12 - 73.45) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.72 ± (10.71 - 10.72) MB10.74 ± (10.73 - 10.74) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms384.19 ± (381.83 - 386.56) ms389.77 ± (387.06 - 392.49) ms+1.5%✅⬆️
process.time_to_main_ms535.58 ± (534.59 - 536.57) ms535.00 ± (534.05 - 535.96) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.25 ± (50.23 - 50.28) MB50.32 ± (50.30 - 50.35) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 8 - Baseline
process.internal_duration_ms19.18 ± (19.15 - 19.22) ms19.35 ± (19.31 - 19.38) ms+0.8%✅⬆️
process.time_to_main_ms71.24 ± (71.07 - 71.40) ms72.03 ± (71.87 - 72.20) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.67 ± (7.67 - 7.68) MB7.66 ± (7.65 - 7.66) MB-0.2%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.34 ± (19.31 - 19.38) ms19.42 ± (19.37 - 19.48) ms+0.4%✅⬆️
process.time_to_main_ms72.70 ± (72.52 - 72.88) ms73.11 ± (72.95 - 73.27) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.71 ± (7.70 - 7.71) MB7.72 ± (7.71 - 7.73) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms310.04 ± (307.64 - 312.45) ms308.21 ± (305.64 - 310.78) ms-0.6%
process.time_to_main_ms491.11 ± (490.27 - 491.94) ms493.39 ± (492.55 - 494.23) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.23 ± (37.21 - 37.25) MB37.25 ± (37.22 - 37.27) MB+0.1%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.2%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration225.79 ± (224.44 - 226.61) ms220.54 ± (220.71 - 222.40) ms-2.3%
.NET Framework 4.8 - Bailout
duration229.52 ± (229.11 - 231.12) ms224.53 ± (223.80 - 225.62) ms-2.2%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1256.83 ± (1254.07 - 1260.78) ms1248.97 ± (1248.82 - 1257.16) ms-0.6%
.NET Core 3.1 - Baseline
process.internal_duration_ms218.20 ± (217.20 - 219.21) ms209.02 ± (208.44 - 209.60) ms-4.2%
process.time_to_main_ms92.93 ± (92.55 - 93.30) ms90.24 ± (89.98 - 90.51) ms-2.9%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.87 ± (15.85 - 15.88) MB15.89 ± (15.88 - 15.91) MB+0.2%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.3%
.NET Core 3.1 - Bailout
process.internal_duration_ms218.63 ± (217.71 - 219.56) ms207.98 ± (207.26 - 208.70) ms-4.9%
process.time_to_main_ms94.42 ± (94.09 - 94.76) ms91.21 ± (90.91 - 91.51) ms-3.4%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.2%✅⬆️
runtime.dotnet.mem.committed15.86 ± (15.85 - 15.88) MB16.01 ± (15.99 - 16.03) MB+0.9%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-0.1%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms422.11 ± (420.60 - 423.62) ms419.43 ± (418.03 - 420.84) ms-0.6%
process.time_to_main_ms566.58 ± (565.38 - 567.78) ms564.95 ± (563.15 - 566.76) ms-0.3%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed59.11 ± (59.06 - 59.16) MB59.06 ± (59.01 - 59.12) MB-0.1%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.0%
.NET 6 - Baseline
process.internal_duration_ms217.90 ± (217.17 - 218.62) ms216.85 ± (216.17 - 217.53) ms-0.5%
process.time_to_main_ms79.32 ± (79.09 - 79.55) ms78.56 ± (78.35 - 78.77) ms-1.0%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.15 ± (16.14 - 16.17) MB16.20 ± (16.18 - 16.21) MB+0.3%✅⬆️
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (19 - 20)+0.1%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms216.42 ± (215.86 - 216.98) ms216.03 ± (215.31 - 216.74) ms-0.2%
process.time_to_main_ms80.49 ± (80.29 - 80.69) ms79.63 ± (79.45 - 79.82) ms-1.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.20 ± (16.18 - 16.21) MB16.21 ± (16.20 - 16.23) MB+0.1%✅⬆️
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (20 - 21)-0.1%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms603.38 ± (599.95 - 606.80) ms603.05 ± (599.79 - 606.30) ms-0.1%
process.time_to_main_ms572.43 ± (571.32 - 573.54) ms575.26 ± (573.88 - 576.65) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.64 ± (61.56 - 61.73) MB61.75 ± (61.67 - 61.84) MB+0.2%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)+0.2%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms219.36 ± (218.52 - 220.20) ms215.71 ± (214.86 - 216.57) ms-1.7%
process.time_to_main_ms79.18 ± (78.94 - 79.43) ms77.79 ± (77.53 - 78.05) ms-1.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.53 ± (11.51 - 11.55) MB11.53 ± (11.52 - 11.55) MB+0.0%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.2%
.NET 8 - Bailout
process.internal_duration_ms217.53 ± (216.80 - 218.25) ms212.54 ± (211.95 - 213.13) ms-2.3%
process.time_to_main_ms79.89 ± (79.70 - 80.08) ms78.94 ± (78.76 - 79.13) ms-1.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.55 ± (11.54 - 11.57) MB11.61 ± (11.60 - 11.63) MB+0.5%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.0%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms608.90 ± (602.46 - 615.35) ms598.95 ± (592.26 - 605.65) ms-1.6%
process.time_to_main_ms524.96 ± (524.04 - 525.88) ms524.65 ± (523.73 - 525.57) ms-0.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed51.85 ± (51.78 - 51.93) MB51.81 ± (51.71 - 51.90) MB-0.1%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.0%
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 (8321) - mean (73ms)  : 70, 75
    master - mean (72ms)  : 68, 76

    section Bailout
    This PR (8321) - mean (76ms)  : 75, 78
    master - mean (76ms)  : 74, 78

    section CallTarget+Inlining+NGEN
    This PR (8321) - mean (1,082ms)  : 1025, 1138
    master - mean (1,077ms)  : 1036, 1118

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 (8321) - mean (113ms)  : 109, 117
    master - mean (113ms)  : 109, 116

    section Bailout
    This PR (8321) - mean (115ms)  : 112, 117
    master - mean (113ms)  : 110, 117

    section CallTarget+Inlining+NGEN
    This PR (8321) - mean (801ms)  : 781, 821
    master - mean (794ms)  : 773, 815

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

    section Bailout
    This PR (8321) - mean (101ms)  : 98, 103
    master - mean (100ms)  : 97, 103

    section CallTarget+Inlining+NGEN
    This PR (8321) - mean (952ms)  : 911, 993
    master - mean (948ms)  : 912, 984

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8321) - mean (99ms)  : 96, 102
    master - mean (98ms)  : 95, 101

    section Bailout
    This PR (8321) - mean (100ms)  : 98, 102
    master - mean (100ms)  : 97, 102

    section CallTarget+Inlining+NGEN
    This PR (8321) - mean (831ms)  : 797, 865
    master - mean (834ms)  : 796, 871

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 (8321) - mean (222ms)  : 209, 234
    master - mean (226ms)  : 210, 241

    section Bailout
    This PR (8321) - mean (225ms)  : 211, 238
    master - mean (230ms)  : 215, 245

    section CallTarget+Inlining+NGEN
    This PR (8321) - mean (1,253ms)  : 1192, 1314
    master - mean (1,257ms)  : 1210, 1305

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 (8321) - mean (309ms)  : 295, 324
    master - mean (321ms)  : 300, 342

    section Bailout
    This PR (8321) - mean (309ms)  : 296, 322
    master - mean (324ms)  : 303, 345

    section CallTarget+Inlining+NGEN
    This PR (8321) - mean (1,021ms)  : 985, 1056
    master - mean (1,030ms)  : 1000, 1060

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8321) - mean (304ms)  : 294, 315
    master - mean (306ms)  : 292, 321

    section Bailout
    This PR (8321) - mean (305ms)  : 293, 317
    master - mean (306ms)  : 296, 316

    section CallTarget+Inlining+NGEN
    This PR (8321) - mean (1,211ms)  : 1145, 1276
    master - mean (1,206ms)  : 1155, 1257

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8321) - mean (304ms)  : 289, 319
    master - mean (311ms)  : 292, 329

    section Bailout
    This PR (8321) - mean (302ms)  : 291, 314
    master - mean (308ms)  : 295, 321

    section CallTarget+Inlining+NGEN
    This PR (8321) - mean (1,155ms)  : 1049, 1261
    master - mean (1,169ms)  : 1076, 1261

Loading

bouwkast and others added 4 commits March 27, 2026 14:18
This happens when we have OpenTelemetry.Instrumentation.Http installed
the Instrumentation for Yarp no longer resolves the reparenting issue
like normal.

Snapshot is updated with the "broken" state,
will be updated in the next commit, this is just to show
that it is broken. Note that we get span links added that
highlight the terminated_context
NoOutputPropagator still processes incoming headers which interferes
when OpenTelemetry HTTP instrumentation replaces the global
DistributedContextPropagator. Setting to null fully disables it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ator

- Add AddAspNetCoreInstrumentation, AddOtlpExporter (non-routable endpoint)
  to match the Ocelot sample's OTel configuration
- Suppress ActivityHeadersPropagator on the Worker's SocketsHttpHandler to
  prevent the in-process OTel SDK injecting a foreign traceparent on the
  simulated external request, matching the Ocelot sample workaround

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bouwkast bouwkast force-pushed the steven/update-yarp branch from fa2bcce to 91d944f Compare March 27, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant