Skip to content

Fix Datadog.Trace.Annotations dependency version in Datadog.AzureFunctions nuspec#8285

Merged
bouwkast merged 1 commit into
masterfrom
stevne/fix-nuget-dep
Mar 10, 2026
Merged

Fix Datadog.Trace.Annotations dependency version in Datadog.AzureFunctions nuspec#8285
bouwkast merged 1 commit into
masterfrom
stevne/fix-nuget-dep

Conversation

@bouwkast

@bouwkast bouwkast commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator

Summary of changes

The BuildAzureFunctionsNuget target used .SetVersion(Version) which appears to pass a -p:Version global MSBuild property, which overrode the version of the Annotations project in the generated nuspec for the Datadog.AzureFunctions package.

Reason for change

In 3.39.0 we realized that this SetVersion overrides the version of dependent projects when we build and pack them in CI, intention of the SetVersion call was to ease local development / debugging.

Implementation details

Test coverage

Other details

This was used for Build-AzureFunctionsNuget.ps1 to help with local development / debugging for generating versions to avoid NuGet caching but had the side effect of changing the version of the Annotations in the nuspec

Causes it to propagate to the Annotations project which in turn
creates an incorrect depenency on the NuGet
@bouwkast bouwkast requested a review from a team as a code owner March 10, 2026 21:04
@github-actions github-actions Bot added the area:builds project files, build scripts, pipelines, versioning, releases, packages label Mar 10, 2026

@lucaspimentel lucaspimentel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@bouwkast bouwkast enabled auto-merge (squash) March 10, 2026 21:09
@pr-commenter

pr-commenter Bot commented Mar 10, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-03-10 21:44:24

Comparing candidate commit ed09dc5 in PR branch stevne/fix-nuget-dep with baseline commit f675c92 in branch master.

Found 11 performance improvements and 5 performance regressions! Performance is the same for 153 metrics, 23 unstable metrics.

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0

  • 🟩 throughput [+11100.033op/s; +12964.163op/s] or [+9.296%; +10.857%]

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

  • 🟩 execution_time [-100.527ms; -100.447ms] or [-49.940%; -49.900%]

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

  • 🟩 execution_time [-107.785ms; -107.619ms] or [-49.359%; -49.283%]

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

  • 🟩 execution_time [-28.118ms; -21.640ms] or [-12.724%; -9.793%]

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

  • 🟥 execution_time [+13.721ms; +19.918ms] or [+6.936%; +10.068%]

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

  • 🟩 throughput [+274.222op/s; +345.659op/s] or [+20.371%; +25.678%]

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

  • 🟥 execution_time [+92.724µs; +99.276µs] or [+6.357%; +6.806%]
  • 🟥 throughput [-43.754op/s; -40.906op/s] or [-6.382%; -5.967%]

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

  • 🟩 execution_time [-71.421µs; -65.472µs] or [-6.517%; -5.974%]
  • 🟩 throughput [+58.066op/s; +63.540op/s] or [+6.364%; +6.963%]

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

  • 🟩 execution_time [-37.809ms; -37.364ms] or [-19.674%; -19.442%]

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

  • 🟩 execution_time [-19.626ms; -17.121ms] or [-10.111%; -8.821%]

scenario:Benchmarks.Trace.NLogBenchmark.EnrichedLog net472

  • 🟩 throughput [+10247.731op/s; +10819.246op/s] or [+8.138%; +8.591%]

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

  • 🟩 execution_time [-7.341ms; -5.304ms] or [-7.109%; -5.137%]

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

  • 🟥 execution_time [+11.707ms; +15.491ms] or [+5.895%; +7.801%]
  • 🟥 throughput [-164027.552op/s; -136818.215op/s] or [-12.256%; -10.223%]

@dd-trace-dotnet-ci-bot

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8285) 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
duration76.50 ± (76.56 - 76.90) ms75.12 ± (74.99 - 75.29) ms-1.8%
.NET Framework 4.8 - Bailout
duration81.29 ± (81.19 - 81.56) ms79.50 ± (79.23 - 79.64) ms-2.2%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1106.13 ± (1107.15 - 1112.88) ms1083.50 ± (1082.94 - 1088.63) ms-2.0%
.NET Core 3.1 - Baseline
process.internal_duration_ms23.21 ± (23.16 - 23.26) ms22.76 ± (22.72 - 22.81) ms-1.9%
process.time_to_main_ms88.65 ± (88.47 - 88.84) ms86.37 ± (86.19 - 86.54) ms-2.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.91 ± (10.90 - 10.91) MB10.92 ± (10.92 - 10.93) MB+0.1%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms23.21 ± (23.17 - 23.25) ms22.78 ± (22.73 - 22.83) ms-1.8%
process.time_to_main_ms90.25 ± (90.01 - 90.49) ms88.56 ± (88.32 - 88.81) ms-1.9%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.94 ± (10.94 - 10.94) MB10.96 ± (10.95 - 10.96) MB+0.2%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms237.95 ± (234.21 - 241.69) ms248.83 ± (244.60 - 253.06) ms+4.6%✅⬆️
process.time_to_main_ms507.67 ± (506.73 - 508.60) ms496.80 ± (495.97 - 497.62) ms-2.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.58 ± (47.56 - 47.60) MB47.59 ± (47.57 - 47.61) MB+0.0%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms22.16 ± (22.12 - 22.21) ms21.69 ± (21.64 - 21.74) ms-2.1%
process.time_to_main_ms78.22 ± (78.03 - 78.42) ms76.15 ± (75.96 - 76.34) ms-2.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.61 ± (10.60 - 10.61) MB10.63 ± (10.62 - 10.63) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms22.13 ± (22.09 - 22.17) ms21.70 ± (21.65 - 21.75) ms-1.9%
process.time_to_main_ms79.56 ± (79.40 - 79.72) ms77.33 ± (77.16 - 77.50) ms-2.8%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.72 ± (10.72 - 10.72) MB10.74 ± (10.74 - 10.75) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms258.06 ± (253.88 - 262.25) ms256.30 ± (252.98 - 259.63) ms-0.7%
process.time_to_main_ms489.86 ± (489.08 - 490.63) ms475.52 ± (474.84 - 476.19) ms-2.9%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.29 ± (48.27 - 48.32) MB48.33 ± (48.31 - 48.35) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%
.NET 8 - Baseline
process.internal_duration_ms20.28 ± (20.23 - 20.32) ms19.75 ± (19.72 - 19.79) ms-2.6%
process.time_to_main_ms77.16 ± (76.98 - 77.33) ms74.75 ± (74.59 - 74.91) ms-3.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.66 ± (7.65 - 7.66) MB7.66 ± (7.66 - 7.67) MB+0.0%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms20.37 ± (20.32 - 20.43) ms19.82 ± (19.77 - 19.87) ms-2.7%
process.time_to_main_ms78.54 ± (78.38 - 78.70) ms75.88 ± (75.70 - 76.06) ms-3.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.72 ± (7.71 - 7.73) MB7.74 ± (7.73 - 7.75) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms196.55 ± (195.83 - 197.28) ms191.05 ± (190.28 - 191.81) ms-2.8%
process.time_to_main_ms468.87 ± (468.20 - 469.54) ms455.87 ± (455.15 - 456.58) ms-2.8%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.15 ± (36.12 - 36.19) MB36.08 ± (36.04 - 36.12) MB-0.2%
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
duration196.14 ± (195.89 - 196.91) ms195.44 ± (195.23 - 196.00) ms-0.4%
.NET Framework 4.8 - Bailout
duration200.26 ± (200.16 - 200.83) ms198.40 ± (198.42 - 199.24) ms-0.9%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1157.87 ± (1160.51 - 1168.96) ms1153.78 ± (1155.60 - 1163.71) ms-0.4%
.NET Core 3.1 - Baseline
process.internal_duration_ms190.75 ± (190.26 - 191.23) ms188.94 ± (188.51 - 189.37) ms-0.9%
process.time_to_main_ms82.62 ± (82.31 - 82.93) ms82.31 ± (82.08 - 82.54) ms-0.4%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.15 ± (16.12 - 16.18) MB16.07 ± (16.05 - 16.10) MB-0.5%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (19 - 20)-0.5%
.NET Core 3.1 - Bailout
process.internal_duration_ms188.64 ± (188.27 - 189.01) ms188.35 ± (188.07 - 188.63) ms-0.2%
process.time_to_main_ms83.59 ± (83.44 - 83.74) ms83.53 ± (83.38 - 83.68) ms-0.1%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.15 ± (16.12 - 16.17) MB16.18 ± (16.15 - 16.20) MB+0.2%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-0.2%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms443.55 ± (441.43 - 445.68) ms439.66 ± (437.32 - 442.01) ms-0.9%
process.time_to_main_ms480.70 ± (480.14 - 481.27) ms480.20 ± (479.63 - 480.77) ms-0.1%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.78 ± (57.67 - 57.89) MB57.91 ± (57.81 - 58.02) MB+0.2%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 30)29 ± (29 - 30)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms193.91 ± (193.48 - 194.34) ms193.24 ± (192.83 - 193.64) ms-0.3%
process.time_to_main_ms71.24 ± (71.04 - 71.43) ms71.01 ± (70.80 - 71.21) ms-0.3%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.38 ± (16.36 - 16.41) MB16.25 ± (16.13 - 16.36) MB-0.9%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.6%
.NET 6 - Bailout
process.internal_duration_ms193.12 ± (192.77 - 193.47) ms193.71 ± (193.27 - 194.16) ms+0.3%✅⬆️
process.time_to_main_ms72.04 ± (71.91 - 72.18) ms72.62 ± (72.44 - 72.80) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.44 ± (16.40 - 16.47) MB16.34 ± (16.27 - 16.42) MB-0.6%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-1.5%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms456.72 ± (454.98 - 458.46) ms454.42 ± (452.90 - 455.94) ms-0.5%
process.time_to_main_ms455.83 ± (455.22 - 456.44) ms452.61 ± (452.01 - 453.20) ms-0.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed57.91 ± (57.81 - 58.00) MB58.02 ± (57.93 - 58.11) MB+0.2%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)30 ± (29 - 30)+0.4%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms191.83 ± (191.50 - 192.16) ms190.52 ± (190.18 - 190.86) ms-0.7%
process.time_to_main_ms70.77 ± (70.56 - 70.98) ms70.26 ± (70.03 - 70.50) ms-0.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.76 ± (11.73 - 11.78) MB11.80 ± (11.77 - 11.82) MB+0.4%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.0%
.NET 8 - Bailout
process.internal_duration_ms191.92 ± (191.47 - 192.37) ms189.44 ± (189.09 - 189.79) ms-1.3%
process.time_to_main_ms71.87 ± (71.73 - 72.00) ms71.26 ± (71.11 - 71.41) ms-0.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.79 ± (11.76 - 11.82) MB11.83 ± (11.80 - 11.87) MB+0.4%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms370.52 ± (369.10 - 371.95) ms368.73 ± (367.21 - 370.25) ms-0.5%
process.time_to_main_ms437.32 ± (436.64 - 438.00) ms436.97 ± (436.22 - 437.72) ms-0.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed47.69 ± (47.66 - 47.73) MB47.82 ± (47.79 - 47.86) MB+0.3%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)-0.1%
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 (8285) - mean (75ms)  : 73, 77
    master - mean (77ms)  : 74, 79

    section Bailout
    This PR (8285) - mean (79ms)  : 77, 82
    master - mean (81ms)  : 80, 83

    section CallTarget+Inlining+NGEN
    This PR (8285) - mean (1,086ms)  : 1045, 1127
    master - mean (1,110ms)  : 1069, 1151

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 (8285) - mean (116ms)  : 113, 119
    master - mean (119ms)  : 115, 123

    section Bailout
    This PR (8285) - mean (119ms)  : 116, 121
    master - mean (121ms)  : 118, 124

    section CallTarget+Inlining+NGEN
    This PR (8285) - mean (779ms)  : 710, 847
    master - mean (786ms)  : 722, 849

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8285) - mean (104ms)  : 101, 108
    master - mean (107ms)  : 104, 110

    section Bailout
    This PR (8285) - mean (106ms)  : 104, 108
    master - mean (108ms)  : 106, 111

    section CallTarget+Inlining+NGEN
    This PR (8285) - mean (763ms)  : 697, 829
    master - mean (784ms)  : 718, 851

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8285) - mean (102ms)  : 100, 105
    master - mean (105ms)  : 102, 109

    section Bailout
    This PR (8285) - mean (104ms)  : 100, 107
    master - mean (107ms)  : 105, 109

    section CallTarget+Inlining+NGEN
    This PR (8285) - mean (676ms)  : 654, 699
    master - mean (700ms)  : 668, 732

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 (8285) - mean (196ms)  : 192, 199
    master - mean (196ms)  : 191, 202

    section Bailout
    This PR (8285) - mean (199ms)  : 195, 203
    master - mean (200ms)  : 197, 204

    section CallTarget+Inlining+NGEN
    This PR (8285) - mean (1,160ms)  : 1099, 1220
    master - mean (1,165ms)  : 1101, 1228

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 (8285) - mean (280ms)  : 274, 286
    master - mean (282ms)  : 273, 291

    section Bailout
    This PR (8285) - mean (280ms)  : 276, 284
    master - mean (281ms)  : 276, 285

    section CallTarget+Inlining+NGEN
    This PR (8285) - mean (951ms)  : 910, 992
    master - mean (953ms)  : 920, 987

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8285) - mean (273ms)  : 266, 281
    master - mean (273ms)  : 267, 280

    section Bailout
    This PR (8285) - mean (275ms)  : 268, 281
    master - mean (273ms)  : 269, 278

    section CallTarget+Inlining+NGEN
    This PR (8285) - mean (935ms)  : 899, 971
    master - mean (941ms)  : 913, 969

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8285) - mean (271ms)  : 265, 277
    master - mean (272ms)  : 268, 277

    section Bailout
    This PR (8285) - mean (270ms)  : 265, 275
    master - mean (274ms)  : 268, 279

    section CallTarget+Inlining+NGEN
    This PR (8285) - mean (838ms)  : 817, 860
    master - mean (839ms)  : 816, 862

Loading

@bouwkast bouwkast merged commit a09b576 into master Mar 10, 2026
137 checks passed
@bouwkast bouwkast deleted the stevne/fix-nuget-dep branch March 10, 2026 22:28
@github-actions github-actions Bot added this to the vNext-v3 milestone Mar 10, 2026
andrewlock added a commit that referenced this pull request Mar 17, 2026
andrewlock added a commit that referenced this pull request Mar 17, 2026
andrewlock added a commit that referenced this pull request Mar 18, 2026
andrewlock added a commit that referenced this pull request Mar 24, 2026
## Summary of changes

Adds new Windows and Linux smoke tests for the Datadog.AzureFunctions
NuGet package

## Reason for change

We recently had an issue where the Datadog.AzureFunctions package was
broken, but as we don't currently test the package itself, we didn't
catch it. This adds tests to make sure we can actually install the
package that we build, similar to how we test the Datadog.Trace.Bundle
package today.

## Implementation details

This was harder than I had hoped, and required a bit of refactoring to
the Nuke smoke tests that we added in
#8271, as well as
enabling the new smoke tests.

For the refactoring, this PR:
- Updates the "nuget" smoke test dockerfiles to allow providing a
`NUGET_PACKAGE` variable, so we can reuse the dockerfiles for multiple
nuget packages
- Add `IncludeDdDotnetScenario` to the windows nuget scenario - today we
always try the `dd-dotnet` case after the "env vars" case, but there's
no `dd-dotnet` in Datadog.AzureFunctions.
- Ensure we delete the logs from previous runs before starting the
tests, this bit when I was testing locally as I was failing on errors
from _previous_ runs
- Make the specifying of runtime environment variables to pass in
scenario-specific. We bake a lot of env vars into the dockerfiles, but
it means that if you need different env vars for different scenarios
that use the _same_ dockerfile, you can.

In terms of enabling the Azure Functions smoke tests:
- Add two new stages, Windows and Linux, running tests with the
Datadog.AzureFunctions NuGet package. Made them "extended" tests so they
only run on main/hotfix branches, seeing as the package will rarely
change.
- Add a couple of exceptions to warnings caused by missing libdatadog
and profiler. These are always logged today, and can't be avoided
AFAICT. They may be candidates for looking into further, but they're
benign, so this is the easiest approach.
- Update the env vars we pass in:
  - Don't set `LD_PRELOAD` (because the file doesn't exist)
  - Disable ASM and profiling (the native libraries aren't included)
  - "Pretend" to be in AAS, to try to stop using libdatadog config
- Set `AWS_LAMBDA_FUNCTION_NAME` to avoid sending config to the profiler
(we can't pretend to be in Azure functions, because otherwise we disable
the aspnetcore integration which we need😅)
- Set a fake `DD_API_KEY` otherwise we're marked as "unsafe to trace"
and disable tracing
- Add a new "Azure Functions snapshot", seeing as we have a bunch of AAS
tags added now, and are missing the ASM ones etc.

## Test coverage

More now! 🎉 

[I did a test
run](https://dev.azure.com/datadoghq/dd-trace-dotnet/_build/results?buildId=197781&view=results)
in which I restore the previous "broken" NuGet, and it causes the smoke
tests to fail (which is good):

```
 error: NU1102: Unable to find package Datadog.Trace.Annotations with version (>= 3.40.0)

```

I've done multiple runs showing it passes otherwise, but I'll do a final
run before merging to make sure

## Other details

Context:
- #8285 
- #8289

---------

Co-authored-by: Lucas Pimentel <lucas.pimentel@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:builds project files, build scripts, pipelines, versioning, releases, packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants