Add smoke tests for Datadog.AzureFunctions NuGet package#8336
Conversation
BenchmarksBenchmark execution time: 2026-03-24 09:37:44 Comparing candidate commit 646a9eb in PR branch Found 8 performance improvements and 9 performance regressions! Performance is the same for 254 metrics, 17 unstable metrics.
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8336) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-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:
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 chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8336) - mean (69ms) : 67, 71
master - mean (70ms) : 66, 73
section Bailout
This PR (8336) - mean (73ms) : 70, 76
master - mean (74ms) : 72, 75
section CallTarget+Inlining+NGEN
This PR (8336) - mean (1,038ms) : 994, 1083
master - mean (1,045ms) : 979, 1110
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 (8336) - mean (107ms) : 104, 110
master - mean (107ms) : 104, 110
section Bailout
This PR (8336) - mean (109ms) : 107, 110
master - mean (108ms) : 106, 110
section CallTarget+Inlining+NGEN
This PR (8336) - mean (771ms) : 753, 790
master - mean (768ms) : 749, 788
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8336) - mean (95ms) : 92, 98
master - mean (95ms) : 92, 97
section Bailout
This PR (8336) - mean (96ms) : 94, 97
master - mean (95ms) : 93, 96
section CallTarget+Inlining+NGEN
This PR (8336) - mean (758ms) : 741, 776
master - mean (753ms) : 735, 771
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8336) - mean (93ms) : 91, 96
master - mean (93ms) : 90, 97
section Bailout
This PR (8336) - mean (94ms) : 93, 96
master - mean (95ms) : 92, 97
section CallTarget+Inlining+NGEN
This PR (8336) - mean (661ms) : 638, 683
master - mean (658ms) : 632, 684
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 (8336) - mean (192ms) : 188, 195
master - mean (193ms) : 189, 197
section Bailout
This PR (8336) - mean (196ms) : 193, 198
master - mean (196ms) : 194, 198
section CallTarget+Inlining+NGEN
This PR (8336) - mean (1,157ms) : 1094, 1221
master - mean (1,153ms) : 1092, 1215
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 (8336) - mean (277ms) : 269, 284
master - mean (277ms) : 272, 281
section Bailout
This PR (8336) - mean (277ms) : 271, 283
master - mean (277ms) : 272, 283
section CallTarget+Inlining+NGEN
This PR (8336) - mean (937ms) : 913, 960
master - mean (938ms) : 909, 967
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8336) - mean (271ms) : 265, 276
master - mean (270ms) : 264, 277
section Bailout
This PR (8336) - mean (269ms) : 265, 273
master - mean (269ms) : 266, 273
section CallTarget+Inlining+NGEN
This PR (8336) - mean (964ms) : 940, 988
master - mean (962ms) : 943, 980
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8336) - mean (268ms) : 263, 273
master - mean (269ms) : 263, 274
section Bailout
This PR (8336) - mean (268ms) : 264, 271
master - mean (268ms) : 265, 272
section CallTarget+Inlining+NGEN
This PR (8336) - mean (846ms) : 820, 873
master - mean (847ms) : 828, 867
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _ => base.SnapshotFile, | ||
| }; | ||
|
|
||
| public override Dictionary<string, string> GetEnvironment(bool isCrashTest) |
There was a problem hiding this comment.
This method is the same as the previous one. Would it make sense to move it to a helper?
There was a problem hiding this comment.
It's actually not the same as the other one 😅 The linux one has an extra env var, AWS_LAMBDA_FUNCTION_NAME, because it requires more hackery 😅 Even if we resolve them, I think it makes sense to keep them separate and just accept a small amount of duplication personally
Co-authored-by: Lucas Pimentel <lucas.pimentel@datadoghq.com>
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:
NUGET_PACKAGEvariable, so we can reuse the dockerfiles for multiple nuget packagesIncludeDdDotnetScenarioto the windows nuget scenario - today we always try thedd-dotnetcase after the "env vars" case, but there's nodd-dotnetin Datadog.AzureFunctions.In terms of enabling the Azure Functions smoke tests:
LD_PRELOAD(because the file doesn't exist)AWS_LAMBDA_FUNCTION_NAMEto 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😅)DD_API_KEYotherwise we're marked as "unsafe to trace" and disable tracingTest coverage
More now! 🎉
I did a test run in which I restore the previous "broken" NuGet, and it causes the smoke tests to fail (which is good):
I've done multiple runs showing it passes otherwise, but I'll do a final run before merging to make sure
Other details
Context: