From c0b690a07773c22027cd84ae3c338875c21a9672 Mon Sep 17 00:00:00 2001 From: Andrew Lock Date: Fri, 10 Jan 2025 13:28:01 +0000 Subject: [PATCH] Fix flakiness in Azure Functions (#6524) ## Summary of changes Attempt to fix flakiness in Azure Functions multi-sample build ## Reason for change https://github.com/DataDog/dd-trace-dotnet/pull/6472 added multi-version building for Azure Functions samples. Unfortunately, this caused the build stage to be flaky, because Azure Functions apparently generates and builds a [completely separate _.csproj_](https://github.com/Azure/azure-functions-dotnet-worker/issues/1252). Unfortunately, it also ignores all the artifact output stuff, which means when we restore/build multiple versions of the app (with different api versions, it stomps over itself. e.g. we can see the sample app build itself doing the right thing: ``` 08:59:05 [DBG] Samples.AzureFunctions.V4Isolated -> /project/artifacts/bin/Samples.AzureFunctions.V4Isolated/release_net6.0_1.6.0/Samples.AzureFunctions.V4Isolated.dll 08:59:06 [DBG] Samples.AzureFunctions.V4Isolated -> /project/artifacts/publish/Samples.AzureFunctions.V4Isolated/release_net6.0_1.6.0/ ``` But there's also the "WorkerExtensions" thing which is going completely off the rails, ignores all of the Directory.Build.props etc and just does its own thing ``` 08:59:07 [DBG] WorkerExtensions -> /tmp/oh4iajvh.kcj/publishout/ 08:59:07 [DBG] WorkerExtensions -> /tmp/zv30zzl2.cxz/publishout/Microsoft.Azure.Functions.Worker.Extensions.dll 08:59:08 [DBG] WorkerExtensions -> /tmp/zv30zzl2.cxz/publishout/ ``` Unfortunately, this shows it's trying to build two separate versions to the same location, and things break. ## Implementation details My initial attempt in https://github.com/DataDog/dd-trace-dotnet/pull/6521 failed. In this attempt I split the v1 SDK and v2 SDK into two separate projects. The SDK versions are tracked separately. I was thinking that as long as we only build a _single_ version per project we _should_ be ok. It was not OK. So in the end I tore out the Azure Functions version tracking. We could/should consider adding it back in some way, but right now this is causing too many issues An alternative is to just remove the Azure Functions samples from the "auto-updating multi version". I kept the split between v1 and v2 of the Azure Functions SDK to give us a _little_ more coverage; I think it's about the best we can do. ## Test coverage If this all finally passes, we should be good. ## Other details An important thing to note is that _currently_, even though we will now get dependabot notifactions about updates to the azure functions libs, these _aren't_ tested automatically. That's because currently our testing on Windows does _not_ run the "multi version" tests like we do on Linux. And we _only_ test Azure functions on Windows. This is something I'd like to address longer term with PRs like #6498, but for the meantime, we'll need to manually keep the samples up to date with the latest SDK version when there's a dependabot PR --- Datadog.Trace.sln | 20 +- .../PackageVersionsGeneratorDefinitions.json | 11 - .../build/PackageVersionsLatestMajors.g.props | 24 - .../build/PackageVersionsLatestMinors.g.props | 204 ------ .../PackageVersionsLatestSpecific.g.props | 24 - .../Datadog.Dependabot.Integrations.csproj | 26 +- .../AzureFunctionsTests.cs | 37 +- .../PackageVersions.g.cs | 2 - .../PackageVersionsLatestMajors.g.cs | 18 - .../PackageVersionsLatestMinors.g.cs | 48 -- .../PackageVersionsLatestSpecific.g.cs | 18 - ...nctionsTests.Isolated.V4.Sdk1.verified.txt | 607 ++++++++++++++++++ .../Properties/launchSettings.json | 24 + .../Properties/serviceDependencies.json | 11 + .../Properties/serviceDependencies.local.json | 11 + ...les.AzureFunctions.V4Isolated.SdkV1.csproj | 34 + .../host.json | 11 + .../local.settings.json | 7 + .../Samples.AzureFunctions.V4Isolated.csproj | 3 +- 19 files changed, 773 insertions(+), 367 deletions(-) create mode 100644 tracer/test/snapshots/AzureFunctionsTests.Isolated.V4.Sdk1.verified.txt create mode 100644 tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/Properties/launchSettings.json create mode 100644 tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/Properties/serviceDependencies.json create mode 100644 tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/Properties/serviceDependencies.local.json create mode 100644 tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/Samples.AzureFunctions.V4Isolated.SdkV1.csproj create mode 100644 tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/host.json create mode 100644 tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/local.settings.json diff --git a/Datadog.Trace.sln b/Datadog.Trace.sln index 1d7d4b7ca34c..01f229af0fe7 100644 --- a/Datadog.Trace.sln +++ b/Datadog.Trace.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.1.31903.286 MinimumVisualStudioVersion = 15.0.26124.0 @@ -596,6 +596,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AssemblyLoadContextResolve" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.AspNet.MultipleAppsInDomain", "tracer\test\test-applications\aspnet\Samples.AspNet.MultipleAppsInDomain\Samples.AspNet.MultipleAppsInDomain.csproj", "{A82EB6F8-D8D0-4763-B252-08CA3F39D153}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tracer", "tracer", "{82FFBC1A-6B13-4C0A-896A-90306AE4828F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{07D12F26-2583-4C6F-AFBB-AA30FF339FC6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test-applications", "test-applications", "{F8C637E1-1F4F-4E3B-9E34-AAD61097C3F8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "azure-functions", "azure-functions", "{FE9F14E0-8DFF-413B-BB9E-49CEA4115A5D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.AzureFunctions.V4Isolated.SdkV1", "tracer\test\test-applications\azure-functions\Samples.AzureFunctions.V4Isolated.SdkV1\Samples.AzureFunctions.V4Isolated.SdkV1.csproj", "{18767A3E-9ADC-485C-A8C7-50660D5B579D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1428,6 +1438,10 @@ Global {A82EB6F8-D8D0-4763-B252-08CA3F39D153}.Debug|Any CPU.Build.0 = Debug|Any CPU {A82EB6F8-D8D0-4763-B252-08CA3F39D153}.Release|Any CPU.ActiveCfg = Release|Any CPU {A82EB6F8-D8D0-4763-B252-08CA3F39D153}.Release|Any CPU.Build.0 = Release|Any CPU + {18767A3E-9ADC-485C-A8C7-50660D5B579D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {18767A3E-9ADC-485C-A8C7-50660D5B579D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {18767A3E-9ADC-485C-A8C7-50660D5B579D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {18767A3E-9ADC-485C-A8C7-50660D5B579D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1660,6 +1674,10 @@ Global {D6155F26-8245-4B66-8944-79C3DF9F9DA3} = {BAF8F246-3645-42AD-B1D0-0F7EAFBAB34A} {8B1AF6A7-DD41-4347-B637-90C23D69B50E} = {498A300E-D036-49B7-A43D-821D1CAF11A5} {A82EB6F8-D8D0-4763-B252-08CA3F39D153} = {AFA0AB23-64F0-4AC1-9050-6CE8FE06F580} + {07D12F26-2583-4C6F-AFBB-AA30FF339FC6} = {82FFBC1A-6B13-4C0A-896A-90306AE4828F} + {F8C637E1-1F4F-4E3B-9E34-AAD61097C3F8} = {07D12F26-2583-4C6F-AFBB-AA30FF339FC6} + {FE9F14E0-8DFF-413B-BB9E-49CEA4115A5D} = {F8C637E1-1F4F-4E3B-9E34-AAD61097C3F8} + {18767A3E-9ADC-485C-A8C7-50660D5B579D} = {FE9F14E0-8DFF-413B-BB9E-49CEA4115A5D} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {160A1D00-1F5B-40F8-A155-621B4459D78F} diff --git a/tracer/build/PackageVersionsGeneratorDefinitions.json b/tracer/build/PackageVersionsGeneratorDefinitions.json index ec84647c56ae..0097d037d0a7 100644 --- a/tracer/build/PackageVersionsGeneratorDefinitions.json +++ b/tracer/build/PackageVersionsGeneratorDefinitions.json @@ -743,16 +743,5 @@ "4.20.*", "4.*.*" ] - }, - { - "IntegrationName": "AzureFunctions", - "SampleProjectName": "Samples.AzureFunctions.V4Isolated", - "NugetPackageSearchName": "Microsoft.Azure.Functions.Worker", - "MinVersion": "1.6.0", - "MaxVersionExclusive": "3.0.0", - "SpecificVersions": [ - "1.6.*", - "2.*.*" - ] } ] \ No newline at end of file diff --git a/tracer/build/PackageVersionsLatestMajors.g.props b/tracer/build/PackageVersionsLatestMajors.g.props index 23b1e720a3f3..96f65ccdb17d 100644 --- a/tracer/build/PackageVersionsLatestMajors.g.props +++ b/tracer/build/PackageVersionsLatestMajors.g.props @@ -4558,29 +4558,5 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely None Samples.Selenium - - ApiVersion=1.24.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=2.0.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.24.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=2.0.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - diff --git a/tracer/build/PackageVersionsLatestMinors.g.props b/tracer/build/PackageVersionsLatestMinors.g.props index 1b0b0d4f5ca1..c86c16b73175 100644 --- a/tracer/build/PackageVersionsLatestMinors.g.props +++ b/tracer/build/PackageVersionsLatestMinors.g.props @@ -29509,209 +29509,5 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely None Samples.Selenium - - ApiVersion=1.6.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.8.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.9.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.10.1;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.13.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.14.1;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.15.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.16.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.17.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.18.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.19.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.20.1;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.21.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.22.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.23.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.24.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=2.0.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.6.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.8.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.9.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.10.1;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.13.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.14.1;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.15.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.16.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.17.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.18.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.19.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.20.1;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.21.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.22.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.23.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.24.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=2.0.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - diff --git a/tracer/build/PackageVersionsLatestSpecific.g.props b/tracer/build/PackageVersionsLatestSpecific.g.props index bf6bbe238e2b..4d2148b72561 100644 --- a/tracer/build/PackageVersionsLatestSpecific.g.props +++ b/tracer/build/PackageVersionsLatestSpecific.g.props @@ -6992,29 +6992,5 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely None Samples.Selenium - - ApiVersion=1.6.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=2.0.0;RestoreRecursive=false;BuildProjectReferences=false - net6.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=1.6.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - - - ApiVersion=2.0.0;RestoreRecursive=false;BuildProjectReferences=false - net7.0 - None - Samples.AzureFunctions.V4Isolated - diff --git a/tracer/dependabot/Datadog.Dependabot.Integrations.csproj b/tracer/dependabot/Datadog.Dependabot.Integrations.csproj index 2f11c99d9714..d32af0ba5baf 100644 --- a/tracer/dependabot/Datadog.Dependabot.Integrations.csproj +++ b/tracer/dependabot/Datadog.Dependabot.Integrations.csproj @@ -18,32 +18,32 @@ - - + + - + - + - + - + - + @@ -68,8 +68,8 @@ - - + + @@ -160,7 +160,7 @@ - + @@ -334,13 +334,13 @@ - + - - + + diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AzureFunctionsTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AzureFunctionsTests.cs index 8201ae83f82c..8ff92d8ab211 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AzureFunctionsTests.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AzureFunctionsTests.cs @@ -84,7 +84,7 @@ await VerifyHelper.VerifySpans(spans, settings) .DisableRequireUniquePrefix(); } - protected async Task AssertIsolatedSpans(IImmutableList spans) + protected async Task AssertIsolatedSpans(IImmutableList spans, string filename = null) { // AAS _potentially_ attaches extra tags here, depending on exactly where in the trace the tags are // so can't easily validate @@ -101,8 +101,9 @@ protected async Task AssertIsolatedSpans(IImmutableList spans) settings.AddRegexScrubber(new(@" in .+\.cs:line \d+"), string.Empty); + filename ??= $"{nameof(AzureFunctionsTests)}.Isolated"; await VerifyHelper.VerifySpans(spans, settings) - .UseFileName($"{nameof(AzureFunctionsTests)}.Isolated") + .UseFileName(filename) .DisableRequireUniquePrefix(); } @@ -170,6 +171,38 @@ public async Task SubmitsTraces() } #endif +// v1 is only supported on .NET 6 and 7 +#if NET6_0 || NET7_0 + [UsesVerify] + [Collection(nameof(AzureFunctionsTestsCollection))] + public class IsolatedRuntimeV4SdkV1 : AzureFunctionsTests + { + public IsolatedRuntimeV4SdkV1(ITestOutputHelper output) + : base("AzureFunctions.V4Isolated.SdkV1", output) + { + SetEnvironmentVariable("FUNCTIONS_WORKER_RUNTIME", "dotnet-isolated"); + } + + [SkippableFact] + [Trait("Category", "EndToEnd")] + [Trait("Category", "AzureFunctions")] + [Trait("RunOnWindows", "True")] + public async Task SubmitsTraces() + { + using var agent = EnvironmentHelper.GetMockAgent(useTelemetry: true); + using (await RunAzureFunctionAndWaitForExit(agent, expectedExitCode: -1)) + { + const int expectedSpanCount = 21; + var spans = agent.WaitForSpans(expectedSpanCount); + + using var s = new AssertionScope(); + + await AssertIsolatedSpans(spans, $"{nameof(AzureFunctionsTests)}.Isolated.V4.Sdk1"); + } + } + } +#endif + #if NET6_0_OR_GREATER [UsesVerify] [Collection(nameof(AzureFunctionsTestsCollection))] diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersions.g.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersions.g.cs index 1050c4edb218..ab939108329a 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersions.g.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersions.g.cs @@ -115,7 +115,5 @@ public class PackageVersions public static IEnumerable AzureServiceBus => IsAllMinorPackageVersions ? PackageVersionsLatestMinors.AzureServiceBus : PackageVersionsLatestSpecific.AzureServiceBus; public static IEnumerable Selenium => IsAllMinorPackageVersions ? PackageVersionsLatestMinors.Selenium : PackageVersionsLatestSpecific.Selenium; - - public static IEnumerable AzureFunctions => IsAllMinorPackageVersions ? PackageVersionsLatestMinors.AzureFunctions : PackageVersionsLatestSpecific.AzureFunctions; } } diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestMajors.g.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestMajors.g.cs index 74a0af6e3da9..6021fd26a591 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestMajors.g.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestMajors.g.cs @@ -1981,24 +1981,6 @@ public class PackageVersionsLatestMajors #if NET9_0 new object[] { "4.27.0" }, #endif -#endif - }; - - public static IEnumerable AzureFunctions => - - new List - { -#if DEFAULT_SAMPLES - new object[] { string.Empty }, -#else -#if NET6_0 - new object[] { "1.24.0" }, - new object[] { "2.0.0" }, -#endif -#if NET7_0 - new object[] { "1.24.0" }, - new object[] { "2.0.0" }, -#endif #endif }; diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestMinors.g.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestMinors.g.cs index 88bb4529d51a..9054c2af1122 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestMinors.g.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestMinors.g.cs @@ -6018,54 +6018,6 @@ public class PackageVersionsLatestMinors new object[] { "4.26.1" }, new object[] { "4.27.0" }, #endif -#endif - }; - - public static IEnumerable AzureFunctions => - - new List - { -#if DEFAULT_SAMPLES - new object[] { string.Empty }, -#else -#if NET6_0 - new object[] { "1.6.0" }, - new object[] { "1.8.0" }, - new object[] { "1.9.0" }, - new object[] { "1.10.1" }, - new object[] { "1.13.0" }, - new object[] { "1.14.1" }, - new object[] { "1.15.0" }, - new object[] { "1.16.0" }, - new object[] { "1.17.0" }, - new object[] { "1.18.0" }, - new object[] { "1.19.0" }, - new object[] { "1.20.1" }, - new object[] { "1.21.0" }, - new object[] { "1.22.0" }, - new object[] { "1.23.0" }, - new object[] { "1.24.0" }, - new object[] { "2.0.0" }, -#endif -#if NET7_0 - new object[] { "1.6.0" }, - new object[] { "1.8.0" }, - new object[] { "1.9.0" }, - new object[] { "1.10.1" }, - new object[] { "1.13.0" }, - new object[] { "1.14.1" }, - new object[] { "1.15.0" }, - new object[] { "1.16.0" }, - new object[] { "1.17.0" }, - new object[] { "1.18.0" }, - new object[] { "1.19.0" }, - new object[] { "1.20.1" }, - new object[] { "1.21.0" }, - new object[] { "1.22.0" }, - new object[] { "1.23.0" }, - new object[] { "1.24.0" }, - new object[] { "2.0.0" }, -#endif #endif }; diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestSpecific.g.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestSpecific.g.cs index bc4703629718..585756bd2405 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestSpecific.g.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestSpecific.g.cs @@ -2376,24 +2376,6 @@ public class PackageVersionsLatestSpecific new object[] { "4.20.0" }, new object[] { "4.27.0" }, #endif -#endif - }; - - public static IEnumerable AzureFunctions => - - new List - { -#if DEFAULT_SAMPLES - new object[] { string.Empty }, -#else -#if NET6_0 - new object[] { "1.6.0" }, - new object[] { "2.0.0" }, -#endif -#if NET7_0 - new object[] { "1.6.0" }, - new object[] { "2.0.0" }, -#endif #endif }; diff --git a/tracer/test/snapshots/AzureFunctionsTests.Isolated.V4.Sdk1.verified.txt b/tracer/test/snapshots/AzureFunctionsTests.Isolated.V4.Sdk1.verified.txt new file mode 100644 index 000000000000..28b158a42fcd --- /dev/null +++ b/tracer/test/snapshots/AzureFunctionsTests.Isolated.V4.Sdk1.verified.txt @@ -0,0 +1,607 @@ +[ + { + TraceId: Id_1, + SpanId: Id_2, + Name: azure-functions.invoke, + Resource: Timer TriggerAllTimer, + Service: AzureFunctionsAllTriggers, + Type: serverless, + Tags: { + aas.environment.extension_version: unknown, + aas.environment.instance_id: unknown, + aas.environment.instance_name: IntegrationTestHost, + aas.environment.os: unknown, + aas.environment.runtime: .NET, + aas.function.method: Samples.AzureFunctions.AllTriggers.AllTriggers.TriggerAllTimer, + aas.function.name: TriggerAllTimer, + aas.function.trigger: Timer, + aas.site.kind: functionapp, + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + component: AzureFunctions, + env: integration_tests, + language: dotnet, + runtime-id: Guid_1, + span.kind: server + }, + Metrics: { + process_id: 0, + _dd.top_level: 1.0, + _dd.tracer_kr: 1.0, + _sampling_priority_v1: 1.0 + } + }, + { + TraceId: Id_1, + SpanId: Id_3, + Name: http.request, + Resource: GET localhost:00000/api/trigger, + Service: AzureFunctionsAllTriggers-http-client, + Type: http, + ParentId: Id_2, + Tags: { + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + component: HttpMessageHandler, + env: integration_tests, + http-client-handler-type: System.Net.Http.HttpClientHandler, + http.method: GET, + http.status_code: 200, + http.url: http://localhost:00000/api/trigger, + language: dotnet, + out.host: localhost, + runtime-id: Guid_1, + span.kind: client, + _dd.base_service: AzureFunctionsAllTriggers + }, + Metrics: { + _dd.top_level: 1.0 + } + }, + { + TraceId: Id_1, + SpanId: Id_4, + Name: azure-functions.invoke, + Resource: GET /api/trigger, + Service: AzureFunctionsAllTriggers, + Type: serverless, + ParentId: Id_3, + Tags: { + aas.environment.extension_version: unknown, + aas.environment.instance_id: unknown, + aas.environment.instance_name: IntegrationTestHost, + aas.environment.os: unknown, + aas.environment.runtime: .NET, + aas.function.binding: Microsoft.Azure.WebJobs.Host.Executors.BindingSource, + aas.function.name: TriggerCaller, + aas.function.trigger: Http, + aas.site.kind: functionapp, + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + component: AzureFunctions, + env: integration_tests, + http.method: GET, + http.request.headers.host: localhost:00000, + http.status_code: 200, + http.url: http://localhost:00000/api/trigger, + language: dotnet, + runtime-id: Guid_2, + span.kind: server + }, + Metrics: { + process_id: 0, + _dd.top_level: 1.0, + _dd.tracer_kr: 1.0, + _sampling_priority_v1: 1.0 + } + }, + { + TraceId: Id_1, + SpanId: Id_5, + Name: azure-functions.invoke, + Resource: Http TriggerCaller, + Service: AzureFunctionsAllTriggers, + Type: serverless, + ParentId: Id_4, + Tags: { + aas.environment.extension_version: unknown, + aas.environment.instance_id: unknown, + aas.environment.instance_name: IntegrationTestHost, + aas.environment.os: unknown, + aas.environment.runtime: .NET, + aas.function.method: Samples.AzureFunctions.AllTriggers.AllTriggers.Trigger, + aas.function.name: TriggerCaller, + aas.function.trigger: Http, + aas.site.kind: functionapp, + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + component: AzureFunctions, + env: integration_tests, + language: dotnet, + runtime-id: Guid_1, + span.kind: server + }, + Metrics: { + process_id: 0, + _dd.top_level: 1.0, + _dd.tracer_kr: 1.0, + _sampling_priority_v1: 1.0 + } + }, + { + TraceId: Id_1, + SpanId: Id_6, + Name: Manual inside Trigger, + Resource: Manual inside Trigger, + Service: AzureFunctionsAllTriggers, + ParentId: Id_5, + Tags: { + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + env: integration_tests, + language: dotnet + } + }, + { + TraceId: Id_1, + SpanId: Id_7, + Name: http.request, + Resource: GET localhost:00000/api/simple, + Service: AzureFunctionsAllTriggers-http-client, + Type: http, + ParentId: Id_6, + Tags: { + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + component: HttpMessageHandler, + env: integration_tests, + http-client-handler-type: System.Net.Http.HttpClientHandler, + http.method: GET, + http.status_code: 200, + http.url: http://localhost:00000/api/simple, + language: dotnet, + out.host: localhost, + runtime-id: Guid_1, + span.kind: client, + _dd.base_service: AzureFunctionsAllTriggers + }, + Metrics: { + _dd.top_level: 1.0 + } + }, + { + TraceId: Id_1, + SpanId: Id_8, + Name: http.request, + Resource: GET localhost:00000/api/exception, + Service: AzureFunctionsAllTriggers-http-client, + Type: http, + ParentId: Id_6, + Tags: { + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + component: HttpMessageHandler, + env: integration_tests, + http-client-handler-type: System.Net.Http.HttpClientHandler, + http.method: GET, + http.status_code: 500, + http.url: http://localhost:00000/api/exception, + language: dotnet, + out.host: localhost, + runtime-id: Guid_1, + span.kind: client, + _dd.base_service: AzureFunctionsAllTriggers + }, + Metrics: { + _dd.top_level: 1.0 + } + }, + { + TraceId: Id_1, + SpanId: Id_9, + Name: http.request, + Resource: GET localhost:00000/api/error, + Service: AzureFunctionsAllTriggers-http-client, + Type: http, + ParentId: Id_6, + Tags: { + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + component: HttpMessageHandler, + env: integration_tests, + http-client-handler-type: System.Net.Http.HttpClientHandler, + http.method: GET, + http.status_code: 500, + http.url: http://localhost:00000/api/error, + language: dotnet, + out.host: localhost, + runtime-id: Guid_1, + span.kind: client, + _dd.base_service: AzureFunctionsAllTriggers + }, + Metrics: { + _dd.top_level: 1.0 + } + }, + { + TraceId: Id_1, + SpanId: Id_10, + Name: http.request, + Resource: GET localhost:00000/api/badrequest, + Service: AzureFunctionsAllTriggers-http-client, + Type: http, + ParentId: Id_6, + Error: 1, + Tags: { + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + component: HttpMessageHandler, + env: integration_tests, + error.msg: The HTTP response has status code 400., + http-client-handler-type: System.Net.Http.HttpClientHandler, + http.method: GET, + http.status_code: 400, + http.url: http://localhost:00000/api/badrequest, + language: dotnet, + out.host: localhost, + runtime-id: Guid_1, + span.kind: client, + _dd.base_service: AzureFunctionsAllTriggers + }, + Metrics: { + _dd.top_level: 1.0 + } + }, + { + TraceId: Id_1, + SpanId: Id_11, + Name: azure-functions.invoke, + Resource: GET /api/simple, + Service: AzureFunctionsAllTriggers, + Type: serverless, + ParentId: Id_7, + Tags: { + aas.environment.extension_version: unknown, + aas.environment.instance_id: unknown, + aas.environment.instance_name: IntegrationTestHost, + aas.environment.os: unknown, + aas.environment.runtime: .NET, + aas.function.binding: Microsoft.Azure.WebJobs.Host.Executors.BindingSource, + aas.function.name: SimpleHttpTrigger, + aas.function.trigger: Http, + aas.site.kind: functionapp, + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + component: AzureFunctions, + env: integration_tests, + http.method: GET, + http.request.headers.host: localhost:00000, + http.status_code: 200, + http.url: http://localhost:00000/api/simple, + language: dotnet, + runtime-id: Guid_2, + span.kind: server + }, + Metrics: { + process_id: 0, + _dd.top_level: 1.0, + _dd.tracer_kr: 1.0, + _sampling_priority_v1: 1.0 + } + }, + { + TraceId: Id_1, + SpanId: Id_12, + Name: azure-functions.invoke, + Resource: GET /api/exception, + Service: AzureFunctionsAllTriggers, + Type: serverless, + ParentId: Id_8, + Error: 1, + Tags: { + aas.environment.extension_version: unknown, + aas.environment.instance_id: unknown, + aas.environment.instance_name: IntegrationTestHost, + aas.environment.os: unknown, + aas.environment.runtime: .NET, + aas.function.binding: Microsoft.Azure.WebJobs.Host.Executors.BindingSource, + aas.function.name: Exception, + aas.function.trigger: Http, + aas.site.kind: functionapp, + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + component: AzureFunctions, + env: integration_tests, + error.msg: Exception while executing function: Functions.Exception, + error.stack: +Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Functions.Exception +---> Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException: Result: Failure +Exception: System.InvalidOperationException: Task failed successfully. +at Samples.AzureFunctions.AllTriggers.AllTriggers.Exception(HttpRequestData req, ILogger log), + error.type: Microsoft.Azure.WebJobs.Host.FunctionInvocationException, + http.method: GET, + http.request.headers.host: localhost:00000, + http.status_code: 500, + http.url: http://localhost:00000/api/exception, + language: dotnet, + runtime-id: Guid_2, + span.kind: server + }, + Metrics: { + process_id: 0, + _dd.top_level: 1.0, + _dd.tracer_kr: 1.0, + _sampling_priority_v1: 1.0 + } + }, + { + TraceId: Id_1, + SpanId: Id_13, + Name: azure-functions.invoke, + Resource: GET /api/error, + Service: AzureFunctionsAllTriggers, + Type: serverless, + ParentId: Id_9, + Error: 1, + Tags: { + aas.environment.extension_version: unknown, + aas.environment.instance_id: unknown, + aas.environment.instance_name: IntegrationTestHost, + aas.environment.os: unknown, + aas.environment.runtime: .NET, + aas.function.binding: Microsoft.Azure.WebJobs.Host.Executors.BindingSource, + aas.function.name: ServerError, + aas.function.trigger: Http, + aas.site.kind: functionapp, + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + component: AzureFunctions, + env: integration_tests, + error.msg: The HTTP response has status code 500., + http.method: GET, + http.request.headers.host: localhost:00000, + http.status_code: 500, + http.url: http://localhost:00000/api/error, + language: dotnet, + runtime-id: Guid_2, + span.kind: server + }, + Metrics: { + process_id: 0, + _dd.top_level: 1.0, + _dd.tracer_kr: 1.0, + _sampling_priority_v1: 1.0 + } + }, + { + TraceId: Id_1, + SpanId: Id_14, + Name: azure-functions.invoke, + Resource: GET /api/badrequest, + Service: AzureFunctionsAllTriggers, + Type: serverless, + ParentId: Id_10, + Tags: { + aas.environment.extension_version: unknown, + aas.environment.instance_id: unknown, + aas.environment.instance_name: IntegrationTestHost, + aas.environment.os: unknown, + aas.environment.runtime: .NET, + aas.function.binding: Microsoft.Azure.WebJobs.Host.Executors.BindingSource, + aas.function.name: BadRequest, + aas.function.trigger: Http, + aas.site.kind: functionapp, + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + component: AzureFunctions, + env: integration_tests, + http.method: GET, + http.request.headers.host: localhost:00000, + http.status_code: 400, + http.url: http://localhost:00000/api/badrequest, + language: dotnet, + runtime-id: Guid_2, + span.kind: server + }, + Metrics: { + process_id: 0, + _dd.top_level: 1.0, + _dd.tracer_kr: 1.0, + _sampling_priority_v1: 1.0 + } + }, + { + TraceId: Id_1, + SpanId: Id_15, + Name: azure-functions.invoke, + Resource: Http SimpleHttpTrigger, + Service: AzureFunctionsAllTriggers, + Type: serverless, + ParentId: Id_11, + Tags: { + aas.environment.extension_version: unknown, + aas.environment.instance_id: unknown, + aas.environment.instance_name: IntegrationTestHost, + aas.environment.os: unknown, + aas.environment.runtime: .NET, + aas.function.method: Samples.AzureFunctions.AllTriggers.AllTriggers.SimpleHttpTrigger, + aas.function.name: SimpleHttpTrigger, + aas.function.trigger: Http, + aas.site.kind: functionapp, + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + component: AzureFunctions, + env: integration_tests, + language: dotnet, + runtime-id: Guid_1, + span.kind: server + }, + Metrics: { + process_id: 0, + _dd.top_level: 1.0, + _dd.tracer_kr: 1.0, + _sampling_priority_v1: 1.0 + } + }, + { + TraceId: Id_1, + SpanId: Id_16, + Name: azure-functions.invoke, + Resource: Http Exception, + Service: AzureFunctionsAllTriggers, + Type: serverless, + ParentId: Id_12, + Error: 1, + Tags: { + aas.environment.extension_version: unknown, + aas.environment.instance_id: unknown, + aas.environment.instance_name: IntegrationTestHost, + aas.environment.os: unknown, + aas.environment.runtime: .NET, + aas.function.method: Samples.AzureFunctions.AllTriggers.AllTriggers.Exception, + aas.function.name: Exception, + aas.function.trigger: Http, + aas.site.kind: functionapp, + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + component: AzureFunctions, + env: integration_tests, + error.msg: Task failed successfully., + error.stack: +System.InvalidOperationException: Task failed successfully. +at Samples.AzureFunctions.AllTriggers.AllTriggers.Exception(HttpRequestData req, ILogger log), + error.type: System.InvalidOperationException, + language: dotnet, + runtime-id: Guid_1, + span.kind: server + }, + Metrics: { + process_id: 0, + _dd.top_level: 1.0, + _dd.tracer_kr: 1.0, + _sampling_priority_v1: 1.0 + } + }, + { + TraceId: Id_1, + SpanId: Id_17, + Name: azure-functions.invoke, + Resource: Http ServerError, + Service: AzureFunctionsAllTriggers, + Type: serverless, + ParentId: Id_13, + Tags: { + aas.environment.extension_version: unknown, + aas.environment.instance_id: unknown, + aas.environment.instance_name: IntegrationTestHost, + aas.environment.os: unknown, + aas.environment.runtime: .NET, + aas.function.method: Samples.AzureFunctions.AllTriggers.AllTriggers.ServerError, + aas.function.name: ServerError, + aas.function.trigger: Http, + aas.site.kind: functionapp, + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + component: AzureFunctions, + env: integration_tests, + language: dotnet, + runtime-id: Guid_1, + span.kind: server + }, + Metrics: { + process_id: 0, + _dd.top_level: 1.0, + _dd.tracer_kr: 1.0, + _sampling_priority_v1: 1.0 + } + }, + { + TraceId: Id_1, + SpanId: Id_18, + Name: azure-functions.invoke, + Resource: Http BadRequest, + Service: AzureFunctionsAllTriggers, + Type: serverless, + ParentId: Id_14, + Tags: { + aas.environment.extension_version: unknown, + aas.environment.instance_id: unknown, + aas.environment.instance_name: IntegrationTestHost, + aas.environment.os: unknown, + aas.environment.runtime: .NET, + aas.function.method: Samples.AzureFunctions.AllTriggers.AllTriggers.BadRequest, + aas.function.name: BadRequest, + aas.function.trigger: Http, + aas.site.kind: functionapp, + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + component: AzureFunctions, + env: integration_tests, + language: dotnet, + runtime-id: Guid_1, + span.kind: server + }, + Metrics: { + process_id: 0, + _dd.top_level: 1.0, + _dd.tracer_kr: 1.0, + _sampling_priority_v1: 1.0 + } + }, + { + TraceId: Id_1, + SpanId: Id_19, + Name: Manual inside Simple, + Resource: Manual inside Simple, + Service: AzureFunctionsAllTriggers, + ParentId: Id_15, + Tags: { + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + env: integration_tests, + language: dotnet + } + }, + { + TraceId: Id_1, + SpanId: Id_20, + Name: Manual inside Exception, + Resource: Manual inside Exception, + Service: AzureFunctionsAllTriggers, + ParentId: Id_16, + Tags: { + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + env: integration_tests, + language: dotnet + } + }, + { + TraceId: Id_1, + SpanId: Id_21, + Name: Manual inside ServerError, + Resource: Manual inside ServerError, + Service: AzureFunctionsAllTriggers, + ParentId: Id_17, + Tags: { + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + env: integration_tests, + language: dotnet + } + }, + { + TraceId: Id_1, + SpanId: Id_22, + Name: Manual inside BadRequest, + Resource: Manual inside BadRequest, + Service: AzureFunctionsAllTriggers, + ParentId: Id_18, + Tags: { + aas.site.name: AzureFunctionsAllTriggers, + aas.site.type: function, + env: integration_tests, + language: dotnet + } + } +] \ No newline at end of file diff --git a/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/Properties/launchSettings.json b/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/Properties/launchSettings.json new file mode 100644 index 000000000000..9a73526b0cca --- /dev/null +++ b/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/Properties/launchSettings.json @@ -0,0 +1,24 @@ +{ + "profiles": { + "Samples.AzureFunctions.AllTriggers": { + "commandName": "Project", + "environmentVariables": { + "CORECLR_ENABLE_PROFILING": "1", + "CORECLR_PROFILER": "{846F5F1C-F9AE-4B07-969E-05C26BC060D8}", + "CORECLR_PROFILER_PATH": "$(SolutionDir)shared\\bin\\monitoring-home\\tracer\\win-$(Platform)\\Datadog.Trace.ClrProfiler.Native.dll", + + "DD_DOTNET_TRACER_HOME": "$(SolutionDir)shared\\bin\\monitoring-home\\tracer", + "DD_VERSION": "1.0.0", + + // local.settings.json only applies to the function script, not the host, so this needs to exist here + "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated", + + "DD_AZURE_APP_SERVICES": "1", + "DD_TRACE_AZURE_FUNCTIONS_ENABLED": "1", + "DD_LOGS_INJECTION": "1", + "DD_TRACE_DEBUG": "0" + }, + "nativeDebugging": true + } + } +} \ No newline at end of file diff --git a/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/Properties/serviceDependencies.json b/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/Properties/serviceDependencies.json new file mode 100644 index 000000000000..df4dcc9d888d --- /dev/null +++ b/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/Properties/serviceDependencies.json @@ -0,0 +1,11 @@ +{ + "dependencies": { + "appInsights1": { + "type": "appInsights" + }, + "storage1": { + "type": "storage", + "connectionId": "AzureWebJobsStorage" + } + } +} \ No newline at end of file diff --git a/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/Properties/serviceDependencies.local.json b/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/Properties/serviceDependencies.local.json new file mode 100644 index 000000000000..b804a2893992 --- /dev/null +++ b/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/Properties/serviceDependencies.local.json @@ -0,0 +1,11 @@ +{ + "dependencies": { + "appInsights1": { + "type": "appInsights.sdk" + }, + "storage1": { + "type": "storage.emulator", + "connectionId": "AzureWebJobsStorage" + } + } +} \ No newline at end of file diff --git a/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/Samples.AzureFunctions.V4Isolated.SdkV1.csproj b/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/Samples.AzureFunctions.V4Isolated.SdkV1.csproj new file mode 100644 index 000000000000..c1a07148cc8c --- /dev/null +++ b/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/Samples.AzureFunctions.V4Isolated.SdkV1.csproj @@ -0,0 +1,34 @@ + + + + 1.24.0 + net6.0;net7.0 + v4 + Exe + enable + + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + Never + + + + + + \ No newline at end of file diff --git a/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/host.json b/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/host.json new file mode 100644 index 000000000000..95b693276695 --- /dev/null +++ b/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/host.json @@ -0,0 +1,11 @@ +{ + "version": "2.0", + "logging": { + "applicationInsights": { + "samplingSettings": { + "isEnabled": true, + "excludedTypes": "Request" + } + } + } +} diff --git a/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/local.settings.json b/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/local.settings.json new file mode 100644 index 000000000000..64a872fcd528 --- /dev/null +++ b/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated.SdkV1/local.settings.json @@ -0,0 +1,7 @@ +{ + "IsEncrypted": false, + "Values": { + "AzureWebJobsStorage": "UseDevelopmentStorage=true", + "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated" + } +} \ No newline at end of file diff --git a/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated/Samples.AzureFunctions.V4Isolated.csproj b/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated/Samples.AzureFunctions.V4Isolated.csproj index 1ee579ad9592..7446ef15f543 100644 --- a/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated/Samples.AzureFunctions.V4Isolated.csproj +++ b/tracer/test/test-applications/azure-functions/Samples.AzureFunctions.V4Isolated/Samples.AzureFunctions.V4Isolated.csproj @@ -9,8 +9,7 @@ - - +