Skip to content

Add Multi-Azure Function Unique Named Pipe Configuration#8164

Open
Lewis-E wants to merge 47 commits intomasterfrom
lewis/SVLS-8244/add-multifunction-named-pipes
Open

Add Multi-Azure Function Unique Named Pipe Configuration#8164
Lewis-E wants to merge 47 commits intomasterfrom
lewis/SVLS-8244/add-multifunction-named-pipes

Conversation

@Lewis-E
Copy link
Copy Markdown

@Lewis-E Lewis-E commented Feb 5, 2026

Summary of changes

Reason for change

  • Improve support for running multiple Azure Functions in the same hosting plan. [jira]

Implementation details

For Azure Functions, the tracer loads first, then the compat layer, and then the compat layer launches a rust binary to act as the agent. Additionally, the client may or may not be using the DogstatsD client, and it is also possible to have the compat layer and DogstatsD in place without the tracer. We need to coordinate named pipes across all three/four of these codebases, noting that the tracer will use DogstatsD's pipe for runtime metrics if available.

Given this order of operations, and that we want this to work with immutable configuration, the tracer should set pipe names for the compatibility layer via instrumentation if the tracer is present.

  1. Tracer loads -- pipe name is generated
  2. We check the presence of the compat layer + windows configs (using undocumented envvar DD_SERVERLESS_COMPAT_BINARY_PATH if necessary to adapt to Azure changes) to see if named pipes can be used or if we should rely on TCP
  3. Compat layer loads
  4. Tracer uses instrumentation to force the compat layer to generate the pipe names ,
  5. Compat layer passes the name to the mini-agent tracer and dogstatsd .
Scenario Pipe generated? Transport Result
New tracer + no compat at all No (binary not found) TCP Works
New tracer + old compat (< 1.4) No (version check fails) TCP Works
New tracer + new compat (≥ 1.4) Yes Named pipe Works (integration coordinates)
New tracer + dev compat (0.0.0) Yes Named pipe Works (integration coordinates)
Old tracer + no compat No TCP Works
Old tracer + old compat (< 1.4) No TCP Works (neither side knows about pipes)
Old tracer + new compat (≥ 1.4) No TCP Broken — tracer sends via TCP, but compat binary listens on pipe only. Requires more serverless-components changes.
Old tracer + dev compat (0.0.0) No TCP Not supported

Test coverage

  • Self Monitoring
  • New Unit Tests

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Feb 6, 2026

Benchmarks

Benchmark execution time: 2026-04-23 22:28:07

Comparing candidate commit efe17b2 in PR branch lewis/SVLS-8244/add-multifunction-named-pipes with baseline commit 14c47d8 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 27 metrics, 0 unstable metrics, 60 known flaky benchmarks, 27 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 net6.0

  • 🟩 throughput [+7888.723op/s; +10341.344op/s] or [+6.631%; +8.692%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+313.595ms; +318.111ms] or [+155.617%; +157.858%]

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

  • 🟥 execution_time [+379.785ms; +382.722ms] or [+300.053%; +302.374%]

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

  • 🟥 execution_time [+400.098ms; +402.442ms] or [+354.072%; +356.146%]

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

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.529%; +27.541%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+9.977%; +9.987%]
  • 🟩 execution_time [-16.276ms; -12.102ms] or [-7.601%; -5.652%]

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

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

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

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.746%; +105.759%]
  • 🟥 throughput [-245333.542op/s; -242468.161op/s] or [-25.050%; -24.757%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+38.558%; +38.566%]
  • 🟩 execution_time [-26.175ms; -21.325ms] or [-11.673%; -9.510%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.292%; +105.304%]
  • 🟥 throughput [-128465.378op/s; -112519.107op/s] or [-18.458%; -16.167%]

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

  • 🟩 throughput [+10872.501op/s; +13849.878op/s] or [+6.918%; +8.812%]

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

  • 🟩 throughput [+10493.994op/s; +13223.322op/s] or [+8.360%; +10.534%]

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

  • 🟩 throughput [+477881.707op/s; +494573.440op/s] or [+15.935%; +16.491%]

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

  • 🟩 execution_time [-18.806ms; -14.452ms] or [-8.669%; -6.662%]
  • 🟩 throughput [+237686.050op/s; +291512.015op/s] or [+9.434%; +11.571%]

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

  • 🟥 execution_time [+300.773ms; +302.343ms] or [+150.286%; +151.070%]

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

  • 🟥 execution_time [+299.188ms; +302.353ms] or [+150.881%; +152.477%]

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

  • 🟥 execution_time [+300.063ms; +302.689ms] or [+151.149%; +152.471%]

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

  • 🟥 execution_time [+297.738ms; +298.417ms] or [+146.237%; +146.571%]

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

  • 🟥 execution_time [+295.267ms; +297.018ms] or [+144.345%; +145.201%]

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

  • 🟥 execution_time [+302.414ms; +304.322ms] or [+151.146%; +152.100%]

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

  • 🟥 execution_time [+19.121µs; +42.719µs] or [+6.104%; +13.638%]
  • 🟥 throughput [-400.925op/s; -202.336op/s] or [-12.498%; -6.307%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.656ms; +300.327ms] or [+149.559%; +149.894%]

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

  • unstable execution_time [+338.593ms; +382.041ms] or [+367.895%; +415.104%]
  • 🟩 throughput [+987.425op/s; +1120.954op/s] or [+8.114%; +9.211%]

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

  • unstable execution_time [+333.263ms; +361.258ms] or [+253.044%; +274.300%]
  • 🟩 throughput [+680.729op/s; +881.056op/s] or [+6.590%; +8.529%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 allocated_mem [+2.820KB; +2.825KB] or [+5.011%; +5.019%]
  • unstable execution_time [+279.666ms; +350.449ms] or [+128.588%; +161.133%]
  • 🟥 throughput [-506.596op/s; -444.318op/s] or [-45.903%; -40.260%]

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

  • unstable execution_time [+202.589ms; +335.796ms] or [+86.335%; +143.102%]
  • 🟥 throughput [-747.005op/s; -663.560op/s] or [-49.825%; -44.260%]

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

  • 🟥 execution_time [+342.941ms; +354.283ms] or [+205.119%; +211.902%]
  • 🟥 throughput [-431.924op/s; -396.144op/s] or [-30.074%; -27.583%]

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

  • 🟩 execution_time [-162.896µs; -131.017µs] or [-8.252%; -6.637%]
  • 🟩 throughput [+37.423op/s; +45.967op/s] or [+7.388%; +9.074%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+302.226ms; +303.534ms] or [+152.195%; +152.854%]

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

  • 🟥 execution_time [+303.460ms; +306.052ms] or [+152.064%; +153.363%]

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

  • 🟥 execution_time [+301.414ms; +304.504ms] or [+151.418%; +152.970%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+301.419ms; +303.392ms] or [+151.362%; +152.353%]

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

  • 🟥 execution_time [+297.802ms; +302.790ms] or [+147.250%; +149.716%]

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

  • 🟥 execution_time [+304.692ms; +308.475ms] or [+154.431%; +156.349%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+304.020ms; +306.078ms] or [+152.591%; +153.624%]

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

  • 🟥 execution_time [+301.226ms; +303.351ms] or [+150.134%; +151.193%]
  • 🟩 throughput [+52138.859op/s; +56692.883op/s] or [+10.353%; +11.257%]

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

  • 🟥 execution_time [+300.316ms; +305.669ms] or [+149.404%; +152.068%]

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

  • 🟩 execution_time [-16.072ms; -12.405ms] or [-7.474%; -5.768%]

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

  • unstable execution_time [+10.023µs; +51.262µs] or [+2.476%; +12.662%]

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

  • 🟩 allocated_mem [-18.688KB; -18.667KB] or [-6.817%; -6.809%]
  • unstable execution_time [-43.021µs; +9.508µs] or [-8.503%; +1.879%]

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

  • 🟩 allocated_mem [-17.066KB; -17.050KB] or [-6.221%; -6.215%]

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

  • unstable execution_time [+7.158µs; +11.525µs] or [+16.919%; +27.241%]
  • 🟥 throughput [-5025.051op/s; -3203.826op/s] or [-21.154%; -13.487%]

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

  • unstable execution_time [-13.706µs; -6.224µs] or [-21.264%; -9.656%]
  • 🟩 throughput [+1676.546op/s; +3265.832op/s] or [+10.286%; +20.037%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.361ms; +303.514ms] or [+152.830%; +153.413%]

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

  • 🟥 execution_time [+304.065ms; +306.603ms] or [+154.768%; +156.060%]

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

  • 🟥 execution_time [+299.804ms; +301.783ms] or [+150.089%; +151.080%]

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

  • 🟩 throughput [+38975.979op/s; +42632.603op/s] or [+7.377%; +8.069%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.431ms; +302.301ms] or [+149.738%; +150.670%]

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

  • 🟥 execution_time [+300.313ms; +301.664ms] or [+150.803%; +151.481%]

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

  • 🟥 execution_time [+303.895ms; +305.939ms] or [+154.116%; +155.153%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.078ms; +300.801ms] or [+149.680%; +150.041%]
  • 🟩 throughput [+61279347.408op/s; +61548615.969op/s] or [+44.627%; +44.824%]

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

  • unstable execution_time [+374.897ms; +412.123ms] or [+466.251%; +512.549%]
  • 🟩 throughput [+889.017op/s; +1062.104op/s] or [+6.873%; +8.211%]

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

  • 🟥 execution_time [+299.515ms; +300.431ms] or [+149.391%; +149.848%]

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

  • 🟩 throughput [+89111.398op/s; +96585.817op/s] or [+8.320%; +9.018%]

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

  • 🟩 throughput [+49733.272op/s; +69297.092op/s] or [+5.757%; +8.021%]

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

  • 🟩 throughput [+88514.132op/s; +118098.209op/s] or [+6.851%; +9.141%]

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

  • 🟩 throughput [+87357.447op/s; +94688.574op/s] or [+8.676%; +9.404%]

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

  • 🟩 throughput [+52609.126op/s; +57803.127op/s] or [+9.553%; +10.496%]

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

  • 🟩 throughput [+27789.467op/s; +37627.326op/s] or [+6.220%; +8.422%]

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

  • 🟩 throughput [+87331.009op/s; +104365.724op/s] or [+9.757%; +11.660%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472
  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • 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

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

dd-trace-dotnet-ci-bot Bot commented Feb 6, 2026

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8164) 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.91 ± (72.95 - 73.44) ms72.39 ± (72.49 - 72.87) ms-0.7%
.NET Framework 4.8 - Bailout
duration79.92 ± (79.57 - 80.11) ms78.58 ± (78.43 - 79.01) ms-1.7%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1080.20 ± (1077.76 - 1083.78) ms1078.36 ± (1077.65 - 1084.64) ms-0.2%
.NET Core 3.1 - Baseline
process.internal_duration_ms22.78 ± (22.71 - 22.84) ms22.57 ± (22.52 - 22.62) ms-0.9%
process.time_to_main_ms86.79 ± (86.45 - 87.13) ms84.66 ± (84.44 - 84.88) ms-2.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.91 ± (10.91 - 10.91) MB10.92 ± (10.91 - 10.92) MB+0.1%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.79 ± (22.73 - 22.84) ms22.87 ± (22.82 - 22.93) ms+0.4%✅⬆️
process.time_to_main_ms88.16 ± (87.87 - 88.45) ms89.46 ± (89.13 - 89.78) ms+1.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.94 ± (10.94 - 10.94) MB10.94 ± (10.94 - 10.94) MB+0.0%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms210.46 ± (209.53 - 211.38) ms211.15 ± (210.28 - 212.02) ms+0.3%✅⬆️
process.time_to_main_ms531.64 ± (530.14 - 533.14) ms531.23 ± (529.97 - 532.48) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.05 ± (48.03 - 48.08) MB48.02 ± (48.00 - 48.05) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.3%
.NET 6 - Baseline
process.internal_duration_ms21.33 ± (21.29 - 21.37) ms21.74 ± (21.67 - 21.81) ms+1.9%✅⬆️
process.time_to_main_ms74.06 ± (73.88 - 74.23) ms77.44 ± (77.09 - 77.80) ms+4.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.62 ± (10.62 - 10.63) MB10.63 ± (10.63 - 10.63) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.64 ± (21.58 - 21.69) ms21.30 ± (21.25 - 21.34) ms-1.6%
process.time_to_main_ms77.40 ± (77.10 - 77.70) ms75.71 ± (75.51 - 75.91) ms-2.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.74 ± (10.73 - 10.74) MB10.75 ± (10.75 - 10.75) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms384.27 ± (382.20 - 386.34) ms381.68 ± (379.56 - 383.81) ms-0.7%
process.time_to_main_ms529.74 ± (528.24 - 531.24) ms534.13 ± (532.72 - 535.54) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.34 ± (49.31 - 49.37) MB49.38 ± (49.35 - 49.40) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.2%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.56 ± (19.52 - 19.60) ms19.56 ± (19.51 - 19.61) ms-0.0%
process.time_to_main_ms73.25 ± (73.06 - 73.44) ms73.76 ± (73.50 - 74.02) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.65 ± (7.64 - 7.65) MB7.65 ± (7.65 - 7.66) MB+0.0%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.53 ± (19.49 - 19.57) ms19.78 ± (19.72 - 19.84) ms+1.3%✅⬆️
process.time_to_main_ms74.20 ± (74.03 - 74.36) ms76.62 ± (76.32 - 76.93) ms+3.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.70 ± (7.69 - 7.71) MB7.72 ± (7.71 - 7.72) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms297.92 ± (295.97 - 299.87) ms299.09 ± (297.12 - 301.07) ms+0.4%✅⬆️
process.time_to_main_ms495.51 ± (494.33 - 496.68) ms490.50 ± (489.47 - 491.54) ms-1.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.46 ± (36.43 - 36.48) MB36.49 ± (36.47 - 36.52) MB+0.1%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.1%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration205.17 ± (205.28 - 206.69) ms202.54 ± (202.85 - 203.90) ms-1.3%
.NET Framework 4.8 - Bailout
duration209.31 ± (209.10 - 210.27) ms207.29 ± (206.80 - 207.91) ms-1.0%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1204.51 ± (1206.24 - 1215.15) ms1190.23 ± (1192.66 - 1200.27) ms-1.2%
.NET Core 3.1 - Baseline
process.internal_duration_ms198.65 ± (198.02 - 199.29) ms195.65 ± (195.17 - 196.13) ms-1.5%
process.time_to_main_ms85.85 ± (85.57 - 86.13) ms84.77 ± (84.51 - 85.02) ms-1.3%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.99 ± (15.97 - 16.00) MB16.03 ± (16.01 - 16.04) MB+0.2%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.1%
.NET Core 3.1 - Bailout
process.internal_duration_ms197.71 ± (197.15 - 198.27) ms195.27 ± (194.81 - 195.72) ms-1.2%
process.time_to_main_ms87.34 ± (87.09 - 87.60) ms86.16 ± (85.88 - 86.44) ms-1.4%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.03 ± (16.01 - 16.05) MB16.10 ± (16.08 - 16.12) MB+0.4%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)+0.1%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms389.54 ± (388.25 - 390.83) ms387.01 ± (385.65 - 388.37) ms-0.6%
process.time_to_main_ms537.25 ± (535.90 - 538.61) ms532.53 ± (531.19 - 533.87) ms-0.9%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.51 ± (57.33 - 57.70) MB57.60 ± (57.44 - 57.77) MB+0.2%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.1%
.NET 6 - Baseline
process.internal_duration_ms201.06 ± (200.58 - 201.53) ms200.61 ± (200.12 - 201.10) ms-0.2%
process.time_to_main_ms74.25 ± (73.97 - 74.52) ms74.18 ± (73.93 - 74.43) ms-0.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.24 ± (16.22 - 16.26) MB16.26 ± (16.24 - 16.28) MB+0.1%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.7%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms202.03 ± (201.52 - 202.53) ms202.41 ± (201.76 - 203.06) ms+0.2%✅⬆️
process.time_to_main_ms75.66 ± (75.42 - 75.89) ms75.60 ± (75.30 - 75.90) ms-0.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.28 ± (16.26 - 16.30) MB16.27 ± (16.25 - 16.30) MB-0.0%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-1.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms593.51 ± (591.03 - 596.00) ms593.09 ± (590.37 - 595.80) ms-0.1%
process.time_to_main_ms529.75 ± (528.69 - 530.81) ms530.69 ± (529.52 - 531.85) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.00 ± (60.90 - 61.10) MB60.86 ± (60.76 - 60.97) MB-0.2%
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.2%
.NET 8 - Baseline
process.internal_duration_ms200.29 ± (199.82 - 200.76) ms199.64 ± (199.16 - 200.13) ms-0.3%
process.time_to_main_ms73.42 ± (73.21 - 73.63) ms73.13 ± (72.91 - 73.36) ms-0.4%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.62 ± (11.61 - 11.64) MB11.67 ± (11.65 - 11.68) MB+0.4%✅⬆️
runtime.dotnet.threads.count19 ± (18 - 19)19 ± (19 - 19)+0.2%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms199.87 ± (199.37 - 200.36) ms198.10 ± (197.57 - 198.62) ms-0.9%
process.time_to_main_ms74.80 ± (74.59 - 75.02) ms74.21 ± (74.01 - 74.41) ms-0.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.67 ± (11.66 - 11.69) MB11.74 ± (11.72 - 11.75) MB+0.6%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.0%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms521.68 ± (517.17 - 526.19) ms519.08 ± (516.09 - 522.07) ms-0.5%
process.time_to_main_ms491.21 ± (490.27 - 492.15) ms493.01 ± (491.92 - 494.10) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.25 ± (50.20 - 50.30) MB50.21 ± (50.17 - 50.25) MB-0.1%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.4%
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 (8164) - mean (73ms)  : 70, 75
    master - mean (73ms)  : 69, 77

    section Bailout
    This PR (8164) - mean (79ms)  : 75, 83
    master - mean (80ms)  : 76, 84

    section CallTarget+Inlining+NGEN
    This PR (8164) - mean (1,081ms)  : 1030, 1132
    master - mean (1,081ms)  : 1038, 1124

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 (8164) - mean (114ms)  : 110, 119
    master - mean (117ms)  : 111, 123

    section Bailout
    This PR (8164) - mean (120ms)  : 113, 126
    master - mean (118ms)  : 112, 124

    section CallTarget+Inlining+NGEN
    This PR (8164) - mean (778ms)  : 742, 814
    master - mean (779ms)  : 749, 810

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8164) - mean (106ms)  : 98, 113
    master - mean (102ms)  : 98, 106

    section Bailout
    This PR (8164) - mean (103ms)  : 100, 107
    master - mean (106ms)  : 99, 112

    section CallTarget+Inlining+NGEN
    This PR (8164) - mean (944ms)  : 901, 986
    master - mean (942ms)  : 908, 976

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8164) - mean (101ms)  : 95, 107
    master - mean (101ms)  : 97, 104

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

    section CallTarget+Inlining+NGEN
    This PR (8164) - mean (824ms)  : 780, 868
    master - mean (823ms)  : 788, 858

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 (8164) - mean (203ms)  : 195, 211
    master - mean (206ms)  : 196, 216

    section Bailout
    This PR (8164) - mean (207ms)  : 201, 214
    master - mean (210ms)  : 201, 219

    section CallTarget+Inlining+NGEN
    This PR (8164) - mean (1,196ms)  : 1140, 1252
    master - mean (1,211ms)  : 1144, 1277

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 (8164) - mean (290ms)  : 279, 300
    master - mean (294ms)  : 281, 308

    section Bailout
    This PR (8164) - mean (291ms)  : 280, 301
    master - mean (296ms)  : 281, 310

    section CallTarget+Inlining+NGEN
    This PR (8164) - mean (957ms)  : 920, 994
    master - mean (962ms)  : 927, 997

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8164) - mean (284ms)  : 275, 293
    master - mean (285ms)  : 277, 293

    section Bailout
    This PR (8164) - mean (287ms)  : 275, 298
    master - mean (287ms)  : 274, 300

    section CallTarget+Inlining+NGEN
    This PR (8164) - mean (1,153ms)  : 1102, 1204
    master - mean (1,155ms)  : 1116, 1194

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8164) - mean (283ms)  : 273, 293
    master - mean (285ms)  : 275, 294

    section Bailout
    This PR (8164) - mean (283ms)  : 274, 292
    master - mean (285ms)  : 276, 293

    section CallTarget+Inlining+NGEN
    This PR (8164) - mean (1,044ms)  : 997, 1091
    master - mean (1,048ms)  : 974, 1121

Loading

@Lewis-E Lewis-E force-pushed the lewis/SVLS-8244/add-multifunction-named-pipes branch 2 times, most recently from aaff9b5 to 08a6c72 Compare February 12, 2026 15:09
@Lewis-E Lewis-E force-pushed the lewis/SVLS-8244/add-multifunction-named-pipes branch 3 times, most recently from 2fcae54 to edb4121 Compare March 6, 2026 18:23
@Lewis-E Lewis-E marked this pull request as ready for review March 6, 2026 18:57
@Lewis-E Lewis-E requested review from a team as code owners March 6, 2026 18:57
@Lewis-E Lewis-E requested a review from duncanpharvey March 6, 2026 18:57
Copy link
Copy Markdown
Contributor

@duncanpharvey duncanpharvey left a comment

Choose a reason for hiding this comment

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

We check the presence of the compat layer + windows configs (using undocumented envvar DD_SERVERLESS_COMPAT_BINARY_PATH if necessary to adapt to Azure changes) to see if named pipes can be used or if we should rely on TCP

What is meant by this? I don't see DD_SERVERLESS_COMPAT_BINARY_PATH in any of the PR changes.

Comment thread tracer/src/Datadog.Trace/Configuration/ExporterSettings.cs Outdated
@duncanpharvey
Copy link
Copy Markdown
Contributor

Should this dependency for Datadog.Serverless.Compat also be updated as part of this PR?

<PackageReference Include="Datadog.Serverless.Compat" Version="1.2.0" PrivateAssets="none" />

@lucaspimentel
Copy link
Copy Markdown
Member

@codex review

Comment thread tracer/src/Datadog.Trace/Configuration/ExporterSettings.cs Outdated
&& !Util.EnvironmentHelpers.IsUsingAzureAppServicesSiteExtension()
&& IsCompatLayerAvailableWithPipeSupport())
{
var baseName = Util.EnvironmentHelpers.GetEnvironmentVariable(ConfigurationKeys.TracesPipeName);
Copy link
Copy Markdown
Member

@lucaspimentel lucaspimentel Mar 23, 2026

Choose a reason for hiding this comment

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

This is only reading the "base" name from environment variables, but the tracer can be configured in other ways (e.g. config files), and those configs would be ignored there. Instead of reading from env vars directly, I think you can read the user setting from rawSettings.TracesPipeName, passed in via parameter.

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.

Agreed, but we also need to make sure we record the new "calculated" value in telemetry as well

Copy link
Copy Markdown
Member

@lucaspimentel lucaspimentel Mar 24, 2026

Choose a reason for hiding this comment

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

Looks like my comment is addressed (no reading env vars directly), but I'll leave this open for Andrew's comment (configuration telemetry).

Comment thread tracer/src/Datadog.Trace/Configuration/ExporterSettings.cs Outdated
Comment thread tracer/src/Datadog.Trace/Configuration/ExporterSettings.cs Outdated
Comment thread tracer/src/Datadog.Trace/Configuration/ExporterSettings.cs Outdated
Comment thread tracer/src/Datadog.Trace/Configuration/ExporterSettings.cs Outdated
Copy link
Copy Markdown
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

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

LGTM in general, but there's some specific things to address before we merge it (mostly already highlighted by Lucas)

  • We should only target existing major versions, and bump support later, otherwise we need strict backward and forward compatibility, which is very hard to maintain and very easy to screw up 😅
  • We shouldn't have static state if we can help it. If we want to cache things, we typically handle that by:
    • Move the calculating and storage of the value to a helper type as instance methods.
    • Create a "singleton" instance of the helper
    • Pass the singleton in to the constructor (or, if this gives too much blast radius, allow passing in a null value for the helper, and grab the singleton in the body. This isn't the preferred approach, but it's sometimes the practical one)
  • We need to ensure we record the new calculated values in telemetry
  • The instrumentation seems a little overly complex considering the behaviours we need and the failure cases

Comment thread tracer/src/Datadog.Trace/Configuration/ExporterSettings.cs Outdated
Comment thread tracer/src/Datadog.Trace/Configuration/ExporterSettings.cs Outdated
&& !Util.EnvironmentHelpers.IsUsingAzureAppServicesSiteExtension()
&& IsCompatLayerAvailableWithPipeSupport())
{
var baseName = Util.EnvironmentHelpers.GetEnvironmentVariable(ConfigurationKeys.TracesPipeName);
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.

Agreed, but we also need to make sure we record the new "calculated" value in telemetry as well

Comment thread tracer/src/Datadog.Trace/Configuration/ExporterSettings.cs Outdated
Comment thread tracer/src/Datadog.Trace/Configuration/ExporterSettings.cs Outdated
@Lewis-E Lewis-E force-pushed the lewis/SVLS-8244/add-multifunction-named-pipes branch from c9b7aee to 1df4f5a Compare March 24, 2026 18:55
Comment thread tracer/src/Datadog.Trace/Configuration/ExporterSettings.cs Outdated
Lewis-E and others added 25 commits April 23, 2026 11:41
- Fix "Compatability" → "Compatibility" typo (3 occurrences)
- Use `is null` / `is not null` instead of `== null` / `!= null`
- Use `StringUtil.IsNullOrEmpty()` instead of `string.IsNullOrEmpty()`
- Remove duplicate test file in Datadog.Trace.Tests
- Remove tests already covered by ServerlessCompatPipeNameHelperTests
- Fix SA1508 blank line before closing brace in PlatformKeys

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nique pipe generation

Instead of skipping pipe generation when an explicit pipe name is configured,
use the configured value as the base name with a GUID suffix appended. This
allows users to customize the pipe base name while still getting per-instance
isolation on shared Azure Functions hosting plans.

If no explicit pipe name is set, falls back to "dd_trace" / "dd_dogstatsd".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… integrations

CalculateDogStatsDPipeName and CalculateTracePipeName are each only called
once during Start(), so caching is unnecessary. The fallback to generate a
new unique name is also removed since ExporterSettings always pre-generates
the pipe name before these instrumentations fire, and generating a name the
tracer doesn't know about is pointless — fall back to the compat layer's
own value instead.

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

Replace static field initializers that read env vars directly with instance
methods that use rawSettings.TracesPipeName/MetricsPipeName, respecting all
config sources (env vars, config files, etc.) instead of only environment
variables. Record the calculated pipe names in telemetry. Integrations now
read pipe names from Tracer.Instance.Settings.Exporter instead of removed
static properties.

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

Check the Azure Functions/compat layer condition once in the constructor
instead of duplicating it in two separate methods. Consolidate the two
per-pipe methods into a single GenerateUniquePipeName overload.

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

Move compat layer detection out of ExporterSettings into
ServerlessCompatPipeNameHelper alongside the related pipe name logic.
Extract I/O dependencies (file existence, assembly version) as delegates
so version-checking logic can be fully unit tested. Add support for
DD_SERVERLESS_COMPAT_PATH env var to override the default binary path,
matching the compat layer's own behavior. Add comprehensive tests for
all branches: version checks, file missing, null version, exceptions.

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

- Add DD_SERVERLESS_COMPAT_PATH to supported-configurations.yaml so
  the source generator creates ConfigurationKeys.ServerlessCompatPath
- Fix integration classes to use the correct property path:
  Tracer.Instance.Settings.Manager.InitialExporterSettings
- Restore using Datadog.Trace.Configuration (needed for IntegrationId)
- Remove unused System.Reflection/InteropServices from ExporterSettings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
+ Maximum Version change

Co-authored-by: Andrew Lock <andrewlock.net@gmail.com>
StringUtil.IsNullOrEmpty has [NotNullWhen(false)] so the compiler
already knows the value is non-null in the false branch.

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

Update supported_calltargets.g.json and generated_calltargets.g.cpp to
reflect MaximumVersion change from 2.*.* to 1.*.*. Add
DD_SERVERLESS_COMPAT_PATH to supported-configurations.yaml and restore
ConfigurationKeys usage in ServerlessCompatPipeNameHelper.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Version 1.4.0 adds the CalculateTracePipeName and
CalculateDogStatsDPipeName methods that the tracer instruments
for named pipe coordination.

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

- Update version range comments from 2.*.* to 1.*.* in both integrations
- Update DD_SERVERLESS_COMPAT_PATH documentation for linux default path
- Rewrite ServerlessCompatIntegrationTests: remove reflection-based tests
  for removed cache fields, add Theory-based tests for exception
  passthrough and fallback behavior with exact value assertions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…typo, use SkipOn in tests

- Move ServerlessCompatPipeNameHelper from ClrProfiler.AutoInstrumentation.Serverless
  to Datadog.Trace.Serverless to avoid Configuration depending on instrumentation code
- Fix "compatability" -> "compatibility" typo in YAML documentation
- Replace silent early-return platform guards with SkipOn/SkippableFact
  so Windows-only tests show as skipped instead of silently passing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Compat 1.4.0 isn't published yet and has a dependency on these tracer
changes. Keep the 1.2.0 dependency — the instrumentation silently skips
when the target methods don't exist, and IsCompatLayerAvailableWithPipeSupport
gates on >= 1.4.0 at runtime. The dependency will be bumped when compat
1.4.0 is published.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Master #8231 extracted serverless platform detection from
EnvironmentHelpers into dedicated cached classes under
Datadog.Trace.Serverless. Update the Azure-Functions pipe-name
generation gate to call AzureInfo.Instance.IsAzureFunction and
IsUsingSiteExtension instead of the removed EnvironmentHelpers
methods.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Addresses review feedback: a customer-set TracesPipeName/MetricsPipeName
(from any configuration source) should pass through verbatim even when
running in Azure Functions, even though this can cause pipe-name
collisions across multiple function instances sharing a plan. We only
fabricate a GUID-suffixed default pipe name when the customer has not
configured one themselves.

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

Post-rebase reconciliation: master's trace_filter additions took conflict
priority during rebase, dropping the ServerlessCompat integration_name tag
entries. Re-add them in both integration_name tag groups and shift downstream
indices by +2.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Previous attempt missed `var index = N + ((int)tag1 * M) + (int)tag2;` forms.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Regenerated via Nuke (Restore + CompileManagedSrc). Both integration_name
tag groups now reflect 85 entries instead of 84.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Customer code calling Tracer.Configure triggers ExporterSettings
reconstruction. With the previous static-GUID generator, each rebuild
produced a new pipe name that no longer matched what the Serverless
Compat layer already bound to.

SettingsManager now computes the gating (Windows + Azure Function +
compat layer 1.4+) once at startup, generates GUIDs, and freezes them
into an immutable ServerlessCompatPipeNames record passed to every
ExporterSettings construction. DD_SERVERLESS_COMPAT_PATH moved into
Raw via the telemetry-enabled ConfigurationBuilder so it shows up in
config telemetry. Integration callbacks drop try/catch + null chains
and short-circuit when no tracer pipe name is configured. Log levels
aligned with Andrew's review (Debug for missing compat layer, Error
for unexpected failures).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per Andrew's review: unit tests should not depend on Tracer.Instance
global state. The removed case relied on Tracer.Instance defaulting
to unconfigured pipe names, which is unsafe — any prior test could
have left the singleton in an unrelated state. The non-exception
path is covered end-to-end by integration tests elsewhere. The
exception-guard test stays since it short-circuits before reaching
Tracer.Instance.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The helper's only caller (SettingsManager.CreatePipeNames) already
does the Windows short-circuit as the first gate in its condition
chain. The internal RuntimeInformation.IsOSPlatform check was
unreachable in practice and duplicated the rule in two places.

Drops the System.Runtime.InteropServices import and the
#if !NETFRAMEWORK guard. Tests that assumed a platform-gated
behavior are now cross-platform, bringing 10 previously-skipped
cases into every run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@Lewis-E Lewis-E force-pushed the lewis/SVLS-8244/add-multifunction-named-pipes branch from 4a4b1ba to 0587f49 Compare April 23, 2026 15:41
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@Lewis-E Lewis-E requested a review from andrewlock April 24, 2026 13:04
{
/// <summary>
/// Checks whether the Datadog Serverless Compat layer is available and supports named-pipe
/// transport. Pipe-name generation itself lives in <see cref="ServerlessCompatPipeNames"/>.
Copy link
Copy Markdown
Member

@lucaspimentel lucaspimentel Apr 27, 2026

Choose a reason for hiding this comment

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

Pipe-name generation itself lives in <see cref="ServerlessCompatPipeNames"/>

Is this comment accurate? ServerlessCompatPipeNames looks like a record type with no logic.

Copy link
Copy Markdown
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! A couple of remaining nit suggestions, but definitely non-blocking, just feels 😄

Comment on lines +87 to +98
// Customer-configured pipe names always take precedence; otherwise use whatever the
// SettingsManager pre-computed for the Serverless Compat layer (may be null on
// non-Windows / non-Azure-Function / missing-compat-layer runs).
var tracesPipeName = !StringUtil.IsNullOrEmpty(rawSettings.TracesPipeName)
? rawSettings.TracesPipeName
: pipeNames.TracesPipeName;
var metricsPipeName = !StringUtil.IsNullOrEmpty(rawSettings.MetricsPipeName)
? rawSettings.MetricsPipeName
: pipeNames.MetricsPipeName;

RecordCalculatedPipeName(ConfigurationKeys.TracesPipeName, tracesPipeName, rawSettings.TracesPipeName);
RecordCalculatedPipeName(ConfigurationKeys.MetricsPipeName, metricsPipeName, rawSettings.MetricsPipeName);
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.

super tiny (optional) nit, I would personally probably combine the "recording" with the actual reading of the setting - extracting a small function which also embeds some logic as to what to record probably isn't a net win IMO. 🤷‍♂️ e.g.

Suggested change
// Customer-configured pipe names always take precedence; otherwise use whatever the
// SettingsManager pre-computed for the Serverless Compat layer (may be null on
// non-Windows / non-Azure-Function / missing-compat-layer runs).
var tracesPipeName = !StringUtil.IsNullOrEmpty(rawSettings.TracesPipeName)
? rawSettings.TracesPipeName
: pipeNames.TracesPipeName;
var metricsPipeName = !StringUtil.IsNullOrEmpty(rawSettings.MetricsPipeName)
? rawSettings.MetricsPipeName
: pipeNames.MetricsPipeName;
RecordCalculatedPipeName(ConfigurationKeys.TracesPipeName, tracesPipeName, rawSettings.TracesPipeName);
RecordCalculatedPipeName(ConfigurationKeys.MetricsPipeName, metricsPipeName, rawSettings.MetricsPipeName);
// Customer-configured pipe names always take precedence; otherwise use whatever the
// SettingsManager pre-computed for the Serverless Compat layer (may be null on
// non-Windows / non-Azure-Function / missing-compat-layer runs).
string? tracesPipeName = null;
string? metricsPipeName = null;
if (!StringUtil.IsNullOrEmpty(rawSettings.TracesPipeName))
{
tracesPipeName = rawSettings.TracesPipeName;
}
else if (pipeNames.TracesPipeName is { } pipeName)
{
tracesPipeName = pipeName;
_telemetry.Record(ConfigurationKeys.TracesPipeName, pipeName, recordValue: true, ConfigurationOrigins.Calculated);
}
if (!StringUtil.IsNullOrEmpty(rawSettings.MetricsPipeName))
{
tracesPipeName = rawSettings.MetricsPipeName;
}
else if (pipeNames.TracesPipeName is { } metricsName)
{
tracesPipeName = pipeName;
_telemetry.Record(ConfigurationKeys.MetricsPipeName, metricsName, recordValue: true, ConfigurationOrigins.Calculated);
}

// DD_SERVERLESS_COMPAT_PATH overrides the default binary location
// (matches CompatibilityLayer.cs in datadog-serverless-compat-dotnet).
const string defaultCompatBinaryPath = @"C:\home\site\wwwroot\datadog\bin\windows-amd64\datadog-serverless-compat.exe";
var compatBinaryPath = !string.IsNullOrEmpty(compatPathOverride) ? compatPathOverride! : defaultCompatBinaryPath;
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.

nit: if you use StringUtil here, you don't need the ! dammit

Suggested change
var compatBinaryPath = !string.IsNullOrEmpty(compatPathOverride) ? compatPathOverride! : defaultCompatBinaryPath;
var compatBinaryPath = !StringUtil.IsNullOrEmpty(compatPathOverride) ? compatPathOverride : defaultCompatBinaryPath;

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.

4 participants