Fix Datadog.Trace.Annotations dependency version in Datadog.AzureFunctions nuspec#8285
Conversation
Causes it to propagate to the Annotations project which in turn creates an incorrect depenency on the NuGet
BenchmarksBenchmark execution time: 2026-03-10 21:44:24 Comparing candidate commit ed09dc5 in PR branch 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
scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0
scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net6.0
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0
scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net6.0
scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1
scenario:Benchmarks.Trace.NLogBenchmark.EnrichedLog net472
scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0
scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8285) 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 (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
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
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
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
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
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
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
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
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
## 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>
Summary of changes
The
BuildAzureFunctionsNugettarget used.SetVersion(Version)which appears to pass a-p:Versionglobal 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
SetVersionoverrides the version of dependent projects when we build and pack them in CI, intention of theSetVersioncall 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