From 02165b6942825bb6d082ba8b925adbef78f6fdc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 06:49:26 +0100 Subject: [PATCH 01/29] Typo fix --- src/OpenTelemetry.AutoInstrumentation/Instrumentation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenTelemetry.AutoInstrumentation/Instrumentation.cs b/src/OpenTelemetry.AutoInstrumentation/Instrumentation.cs index cdb03e478e..8ad86672a8 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Instrumentation.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Instrumentation.cs @@ -70,7 +70,7 @@ public static void Initialize() { // On .NET Framework only, initialize env vars from app.config/web.config // this does not override settings which where already set via env vars. - // We are doing so as the OTel .NET SDK only supports the env vars and we want to be + // We are doing so as the OTel .NET SDK only supports the env vars and we want to // be able to set them via app.config/web.config. EnvironmentInitializer.Initialize(System.Configuration.ConfigurationManager.AppSettings); } From f8ca8db09cd01a54a525673fb3439f2f0b9ae276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 06:53:42 +0100 Subject: [PATCH 02/29] Update End OF Support validation rule --- .../RulesEngine/EndOfSupportRule.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/OpenTelemetry.AutoInstrumentation.StartupHook/RulesEngine/EndOfSupportRule.cs b/src/OpenTelemetry.AutoInstrumentation.StartupHook/RulesEngine/EndOfSupportRule.cs index 27db86ac11..0b9d95c320 100644 --- a/src/OpenTelemetry.AutoInstrumentation.StartupHook/RulesEngine/EndOfSupportRule.cs +++ b/src/OpenTelemetry.AutoInstrumentation.StartupHook/RulesEngine/EndOfSupportRule.cs @@ -23,17 +23,14 @@ internal override bool Evaluate() DateTime eosDate; switch (netVersion) { - case 6: - eosDate = new DateTime(2024, 11, 12); - break; - case 7: - eosDate = new DateTime(2024, 5, 14); - break; case 8: eosDate = new DateTime(2026, 11, 10); break; + case 9: + eosDate = new DateTime(2026, 05, 12); + break; default: - return true; // just return, not abe to verify anything here + return true; // just return, not able to verify anything here } var now = DateTime.UtcNow; From b63eac31cc596fd1f70d895c2715f252c2750df0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 06:54:21 +0100 Subject: [PATCH 03/29] Update Min Supported framework rule --- .../RulesEngine/MinSupportedFrameworkRule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenTelemetry.AutoInstrumentation.StartupHook/RulesEngine/MinSupportedFrameworkRule.cs b/src/OpenTelemetry.AutoInstrumentation.StartupHook/RulesEngine/MinSupportedFrameworkRule.cs index 63a55b807d..1915a5a2ab 100644 --- a/src/OpenTelemetry.AutoInstrumentation.StartupHook/RulesEngine/MinSupportedFrameworkRule.cs +++ b/src/OpenTelemetry.AutoInstrumentation.StartupHook/RulesEngine/MinSupportedFrameworkRule.cs @@ -17,7 +17,7 @@ public MinSupportedFrameworkRule() internal override bool Evaluate() { - Version minRequiredFrameworkVersion = new(6, 0); + Version minRequiredFrameworkVersion = new(8, 0); var frameworkVersion = Environment.Version; if (frameworkVersion < minRequiredFrameworkVersion) { From f27013e26e0c9234583cec101460286724c82376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 06:57:29 +0100 Subject: [PATCH 04/29] Update code space --- dev/codespaces-init.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/codespaces-init.sh b/dev/codespaces-init.sh index f6feeca7ca..31b7e46163 100755 --- a/dev/codespaces-init.sh +++ b/dev/codespaces-init.sh @@ -4,8 +4,8 @@ set -ex # install .NET tools dotnet tool restore -# install .NET 6.0 SDK +# install .NET 9.0 SDK curl -sSL https://dot.net/v1/dotnet-install.sh --output dotnet-install.sh chmod +x ./dotnet-install.sh -sudo ./dotnet-install.sh -c 6.0 --install-dir /usr/share/dotnet --no-path +sudo ./dotnet-install.sh -c 9.0 --install-dir /usr/share/dotnet --no-path rm dotnet-install.sh From 876f6233a72488bc34b989bf609ba9a1b6e216cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 06:58:47 +0100 Subject: [PATCH 05/29] CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 804948ae55..ff61a26894 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ This component adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.h ### Added +- Support for .NET9. - Support for [RabbitMQ.Client](https://www.nuget.org/packages/RabbitMQ.Client/) traces instrumentation for versions `7.0.0`+. @@ -20,6 +21,7 @@ This component adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.h ### Removed +- Support for .NET 6 and .NET 7. Both framework reached end of support. - Support for macOS Monterey 12 x64. macOs libraries are built and tested against [macOS Ventura 13 x64](https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md). From ee9a9092f8ab48bc5d74e7e5b06895b176bcb3dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 06:59:36 +0100 Subject: [PATCH 06/29] Update developing documentation --- docs/developing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/developing.md b/docs/developing.md index 727b06e10b..e874ba4f7e 100644 --- a/docs/developing.md +++ b/docs/developing.md @@ -5,8 +5,8 @@ On all platforms, the minimum requirements are: - [Docker](https://www.docker.com/products/docker-desktop) -- [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet/6.0) -- [.NET 7.0 SDK](https://dotnet.microsoft.com/download/dotnet/7.0) +- [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0) +- [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet/9.0) ### Windows From 8049115eea971b7cc01106412ae774f402adad8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 07:01:15 +0100 Subject: [PATCH 07/29] Update documentation --- docs/config.md | 4 ++-- docs/internal/instrumentation-libraries.md | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/config.md b/docs/config.md index a4c12346a6..5a8f8a6683 100644 --- a/docs/config.md +++ b/docs/config.md @@ -337,7 +337,7 @@ Important environment variables include: - The OpenTelemetry .NET Automatic Instrumentation defaults to `http/protobuf`, which differs from the OpenTelemetry .NET SDK default value of `grpc`. -- On .NET 6 and higher, the application must reference [`Grpc.Net.Client`](https://www.nuget.org/packages/Grpc.Net.Client/) +- On .NET 8 and higher, the application must reference [`Grpc.Net.Client`](https://www.nuget.org/packages/Grpc.Net.Client/) to use the `grpc` OTLP exporter protocol. For example, by adding `` to the `.csproj` file. @@ -414,7 +414,7 @@ Important environment variables include: RuleEngine is a feature that validates OpenTelemetry API, SDK, Instrumentation, and Exporter assemblies for unsupported scenarios, ensuring that OpenTelemetry automatic instrumentation is more -stable by backing of instead of crashing. It works on .NET 6 and higher. +stable by backing of instead of crashing. It works on .NET 8 and higher. Enable RuleEngine only during the first run of the application, or when the deployment changes or the Automatic Instrumentation diff --git a/docs/internal/instrumentation-libraries.md b/docs/internal/instrumentation-libraries.md index be26fa9a28..d4218cbf6e 100644 --- a/docs/internal/instrumentation-libraries.md +++ b/docs/internal/instrumentation-libraries.md @@ -21,12 +21,12 @@ submit an issue to request its inclusion. ### Application Frameworks -| Framework | [Tracing Support](../config.md#instrumented-traces-libraries-and-frameworks) | [Metrics Support](../config.md#instrumented-metrics-libraries-and-frameworks) | Notes | -|---------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------:|:-----------------------------------------------------------------------------:|------------------------------------------------------------------------------------------------------------| -| [ASP.NET](https://docs.microsoft.com/aspnet/overview) | Yes | Yes | | -| [ASP.NET Core](https://docs.microsoft.com/aspnet/core/introduction-to-aspnet-core?view=aspnetcore-6.0) | Yes | Yes | | -| [Windows Workflow Foundation](https://docs.microsoft.com/dotnet/framework/windows-workflow-foundation/) | | | This is .NET Framework only. There is an [experimental port for .NET 6](https://github.com/UiPath/CoreWF). | -| [OWIN](https://docs.microsoft.com/aspnet/aspnet/overview/owin-and-katana/) | | | This is .NET Framework only. | +| Framework | [Tracing Support](../config.md#instrumented-traces-libraries-and-frameworks) | [Metrics Support](../config.md#instrumented-metrics-libraries-and-frameworks) | Notes | +|---------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------:|:-----------------------------------------------------------------------------:|----------------------------------------------------------------------------------------------------------| +| [ASP.NET](https://docs.microsoft.com/aspnet/overview) | Yes | Yes | | +| [ASP.NET Core](https://docs.microsoft.com/aspnet/core/introduction-to-aspnet-core?view=aspnetcore-6.0) | Yes | Yes | | +| [Windows Workflow Foundation](https://docs.microsoft.com/dotnet/framework/windows-workflow-foundation/) | | | This is .NET Framework only. There is an [experimental port for .NET](https://github.com/UiPath/CoreWF). | +| [OWIN](https://docs.microsoft.com/aspnet/aspnet/overview/owin-and-katana/) | | | This is .NET Framework only. | ### Databases From 02185167e3093fa15144a39176ddd4e6af3ba7e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 07:13:03 +0100 Subject: [PATCH 08/29] Use .NET9 in build pipeline drops .NET7 and .NET6 --- .github/workflows/build-nuget-packages.yml | 5 ++--- .github/workflows/build.yml | 5 ++--- .github/workflows/check-sdk-versions.yml | 4 ++-- .github/workflows/ci.yml | 22 +++++++++------------- .github/workflows/dotnet-format.yml | 4 ++-- .github/workflows/release-publish.yml | 10 ++++------ .github/workflows/verify-test.yml | 5 ++--- docker/alpine.dockerfile | 5 ++--- docker/debian-arm64.dockerfile | 5 ++--- docker/debian.dockerfile | 5 ++--- docker/ubuntu1604.dockerfile | 2 +- 11 files changed, 30 insertions(+), 42 deletions(-) diff --git a/.github/workflows/build-nuget-packages.yml b/.github/workflows/build-nuget-packages.yml index 70813c8bc0..b587a608a7 100644 --- a/.github/workflows/build-nuget-packages.yml +++ b/.github/workflows/build-nuget-packages.yml @@ -31,9 +31,8 @@ jobs: uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # tag: v4.1.0 with: dotnet-version: | - 6.0.427 - 7.0.410 - 8.0.403 + 8.0.404 + 9.0.100 - name: Check for NuGet packages cache uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # tag: v4.1.2 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aa06ab4a1e..c6d4cacf77 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,9 +42,8 @@ jobs: uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # tag: v4.1.0 with: dotnet-version: | - 6.0.427 - 7.0.410 - 8.0.403 + 8.0.404 + 9.0.100 - name: Check for NuGet packages cache uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # tag: v4.1.2 diff --git a/.github/workflows/check-sdk-versions.yml b/.github/workflows/check-sdk-versions.yml index 1328ba325f..2ac2f97c4f 100644 --- a/.github/workflows/check-sdk-versions.yml +++ b/.github/workflows/check-sdk-versions.yml @@ -15,10 +15,10 @@ jobs: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag: v4.2.2 - - name: Setup .NET 8 + - name: Setup .NET uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # tag: v4.1.0 with: - dotnet-version: 8.0.403 + dotnet-version: 9.0.100 - name: Run VerifySdkVersions run: ./build.cmd VerifySdkVersions diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 262ef9e655..d494d9158e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - test-tfm: [ net8.0, net7.0, net6.0, net462 ] + test-tfm: [ net9.0, net8.0, net462 ] machine: [ windows-2022, ubuntu-20.04, macos-13, otel-linux-arm64 ] exclude: - test-tfm: net462 @@ -66,9 +66,8 @@ jobs: uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # tag: v4.1.0 with: dotnet-version: | - 6.0.427 - 7.0.410 - 8.0.403 + 8.0.404 + 9.0.100 - name: Check for NuGet packages cache uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # tag: v4.1.2 @@ -131,9 +130,8 @@ jobs: uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # tag: v4.1.0 with: dotnet-version: | - 6.0.427 - 7.0.410 - 8.0.403 + 8.0.404 + 9.0.100 - name: Check for NuGet packages cache uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # tag: v4.1.2 @@ -171,9 +169,8 @@ jobs: uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # tag: v4.1.0 with: dotnet-version: | - 6.0.427 - 7.0.410 - 8.0.403 + 8.0.404 + 9.0.100 - name: Check for NuGet packages cache uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # tag: v4.1.2 @@ -276,9 +273,8 @@ jobs: uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # tag: v4.1.0 with: dotnet-version: | - 6.0.427 - 7.0.410 - 8.0.403 + 8.0.404 + 9.0.100 - name: Check for NuGet packages cache uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # tag: v4.1.2 diff --git a/.github/workflows/dotnet-format.yml b/.github/workflows/dotnet-format.yml index c21255ad44..16af0f77f9 100644 --- a/.github/workflows/dotnet-format.yml +++ b/.github/workflows/dotnet-format.yml @@ -22,10 +22,10 @@ jobs: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag: v4.2.2 - - name: Setup .NET 8 + - name: Setup .NET uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # tag: v4.1.0 with: - dotnet-version: 8.0.403 + dotnet-version: 9.0.100 - name: dotnet format run: dotnet format .\OpenTelemetry.AutoInstrumentation.sln --no-restore --verify-no-changes diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 6af7e9ce36..472044104c 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -13,9 +13,8 @@ jobs: uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # tag: v4.1.0 with: dotnet-version: | - 6.0.427 - 7.0.410 - 8.0.403 + 8.0.404 + 9.0.100 - name: Test the PowerShell module instructions from README.md shell: powershell @@ -68,9 +67,8 @@ jobs: uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # tag: v4.1.0 with: dotnet-version: | - 6.0.427 - 7.0.410 - 8.0.403 + 8.0.404 + 9.0.100 - name: Install MacOS CoreUtils if: ${{ runner.os == 'macOS' }} diff --git a/.github/workflows/verify-test.yml b/.github/workflows/verify-test.yml index d796cf478f..939946d6da 100644 --- a/.github/workflows/verify-test.yml +++ b/.github/workflows/verify-test.yml @@ -41,9 +41,8 @@ jobs: uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # tag: v4.1.0 with: dotnet-version: | - 6.0.427 - 7.0.410 - 8.0.403 + 8.0.404 + 9.0.100 - name: Run BuildTracer and ManagedTests run: ./build.cmd BuildTracer ManagedTests --containers ${{ matrix.containers }} --test-project "${{ github.event.inputs.testProject }}" --test-name '"${{ github.event.inputs.testName }}"' --test-count ${{ github.event.inputs.count }} diff --git a/docker/alpine.dockerfile b/docker/alpine.dockerfile index cc88866209..189d152351 100644 --- a/docker/alpine.dockerfile +++ b/docker/alpine.dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0.403-alpine3.20@sha256:07cb8622ca6c4d7600b42b2eccba968dff4b37d41b43a9bf4bd800aa02fab117 +FROM mcr.microsoft.com/dotnet/sdk:9.0.100-alpine3.20@sha256:46332395f3dd8cb9a0b1a7e59788c6972514bc12fe9eb0652d7c3c7e241cbcc8 RUN apk update \ && apk upgrade \ && apk add --no-cache --update \ @@ -21,8 +21,7 @@ RUN curl -sSL https://dot.net/v1/dotnet-install.sh --output dotnet-install.sh \ && echo "SHA256: $(sha256sum dotnet-install.sh)" \ && echo "c169af55281cd1e58cdbe3ec95c2480cfb210ee460b3ff1421745c8f3236b263 dotnet-install.sh" | sha256sum -c \ && chmod +x ./dotnet-install.sh \ - && ./dotnet-install.sh -v 6.0.427 --install-dir /usr/share/dotnet --no-path \ - && ./dotnet-install.sh -v 7.0.410 --install-dir /usr/share/dotnet --no-path \ + && ./dotnet-install.sh -v 8.0.404 --install-dir /usr/share/dotnet --no-path \ && rm dotnet-install.sh WORKDIR /project diff --git a/docker/debian-arm64.dockerfile b/docker/debian-arm64.dockerfile index 281cfa4dc7..143a0b12e6 100644 --- a/docker/debian-arm64.dockerfile +++ b/docker/debian-arm64.dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0.403-bookworm-slim@sha256:cab0284cce7bc26d41055d0ac5859a69a8b75d9a201cd226999f4f00cc983f13 +FROM mcr.microsoft.com/dotnet/sdk:9.0.100-bookworm-slim@sha256:7d24e90a392e88eb56093e4eb325ff883ad609382a55d42f17fd557b997022ca RUN apt-get update && \ apt-get install -y \ @@ -11,8 +11,7 @@ RUN curl -sSL https://dot.net/v1/dotnet-install.sh --output dotnet-install.sh \ && echo "SHA256: $(sha256sum dotnet-install.sh)" \ && echo "c169af55281cd1e58cdbe3ec95c2480cfb210ee460b3ff1421745c8f3236b263 dotnet-install.sh" | sha256sum -c \ && chmod +x ./dotnet-install.sh \ - && ./dotnet-install.sh -v 6.0.427 --install-dir /usr/share/dotnet --no-path \ - && ./dotnet-install.sh -v 7.0.410 --install-dir /usr/share/dotnet --no-path \ + && ./dotnet-install.sh -v 8.0.404 --install-dir /usr/share/dotnet --no-path \ && rm dotnet-install.sh WORKDIR /project diff --git a/docker/debian.dockerfile b/docker/debian.dockerfile index a9a73318cb..a1c4e698b9 100644 --- a/docker/debian.dockerfile +++ b/docker/debian.dockerfile @@ -1,12 +1,11 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0.403-bookworm-slim@sha256:cab0284cce7bc26d41055d0ac5859a69a8b75d9a201cd226999f4f00cc983f13 +FROM mcr.microsoft.com/dotnet/sdk:9.0.100-bookworm-slim@sha256:7d24e90a392e88eb56093e4eb325ff883ad609382a55d42f17fd557b997022ca RUN wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \ dpkg -i packages-microsoft-prod.deb && \ rm packages-microsoft-prod.deb && \ apt-get update && \ apt-get install -y \ - dotnet-sdk-6.0 \ - dotnet-sdk-7.0 \ + dotnet-sdk-8.0 \ cmake \ clang \ make diff --git a/docker/ubuntu1604.dockerfile b/docker/ubuntu1604.dockerfile index fb9497a3ed..c09861eb90 100644 --- a/docker/ubuntu1604.dockerfile +++ b/docker/ubuntu1604.dockerfile @@ -35,7 +35,7 @@ RUN curl -sSL https://dot.net/v1/dotnet-install.sh --output dotnet-install.sh \ && echo "SHA256: $(sha256sum dotnet-install.sh)" \ && echo "c169af55281cd1e58cdbe3ec95c2480cfb210ee460b3ff1421745c8f3236b263 dotnet-install.sh" | sha256sum -c \ && chmod +x ./dotnet-install.sh \ - && ./dotnet-install.sh -v 8.0.403 --install-dir /usr/share/dotnet --no-path \ + && ./dotnet-install.sh -v 9.0.100 --install-dir /usr/share/dotnet --no-path \ && rm dotnet-install.sh WORKDIR /project From 448057b5e28ccb535b0a40f87e455b8cb504f895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 08:32:37 +0100 Subject: [PATCH 09/29] Bump LangVersion to 13 --- Directory.Build.props | 2 +- build/_build.csproj | 2 +- test/test-applications/integrations/Integrations.props | 2 +- test/test-applications/nuget-packages/Directory.Build.props | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 20abcafb9e..9435d95ea5 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,6 +4,6 @@ false false - 11.0 + 13.0 diff --git a/build/_build.csproj b/build/_build.csproj index 187bb16dfb..e017a7aef5 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -9,7 +9,7 @@ ..\ 1 enable - 11.0 + 13.0 true diff --git a/test/test-applications/integrations/Integrations.props b/test/test-applications/integrations/Integrations.props index a08ed2bfd5..9ca6dc76ca 100644 --- a/test/test-applications/integrations/Integrations.props +++ b/test/test-applications/integrations/Integrations.props @@ -7,7 +7,7 @@ Exe x64;x86 $(Platform) - 11.0 + 13.0 ..\obj\$(MSBuildProjectName)\$(LibraryVersion)\ ..\obj\$(MSBuildProjectName)\ diff --git a/test/test-applications/nuget-packages/Directory.Build.props b/test/test-applications/nuget-packages/Directory.Build.props index 170f3e79e8..82da6f16fc 100644 --- a/test/test-applications/nuget-packages/Directory.Build.props +++ b/test/test-applications/nuget-packages/Directory.Build.props @@ -13,7 +13,7 @@ false false - 11.0 + 13.0 true From 9dc29d6b76a9009a036a2e8807284d4f61e0765e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 08:44:01 +0100 Subject: [PATCH 10/29] Update SDK Version analyzer --- .../ActionWorkflowAnalyzer.cs | 32 +++++++------------ .../SdkVersionAnalyzer/DockerfileAnalyzer.cs | 27 ++++++++-------- tools/SdkVersionAnalyzer/DotnetSdkVersion.cs | 2 +- tools/SdkVersionAnalyzer/Program.cs | 7 ++-- .../SdkVersionAnalyzer.csproj | 2 +- tools/SdkVersionAnalyzer/VersionComparer.cs | 25 ++++++--------- 6 files changed, 41 insertions(+), 54 deletions(-) diff --git a/tools/SdkVersionAnalyzer/ActionWorkflowAnalyzer.cs b/tools/SdkVersionAnalyzer/ActionWorkflowAnalyzer.cs index a6ea86ae1a..6a611ea052 100644 --- a/tools/SdkVersionAnalyzer/ActionWorkflowAnalyzer.cs +++ b/tools/SdkVersionAnalyzer/ActionWorkflowAnalyzer.cs @@ -79,14 +79,13 @@ private static Scalar GetScalarWithExpectedFormatting() private static Scalar GetNewDotnetVersionScalar(DotnetSdkVersion newDotnetSdkVersion) { const char separator = '\n'; - var val = $"{newDotnetSdkVersion.Net6SdkVersion!}{separator}{newDotnetSdkVersion.Net7SdkVersion!}{separator}{newDotnetSdkVersion.Net8SdkVersion!}{separator}"; + var val = $"{newDotnetSdkVersion.Net8SdkVersion!}{separator}{newDotnetSdkVersion.Net9SdkVersion!}{separator}"; // Use ctor with default values, apart from ScalarStyle. // Use ScalarStyle.Literal to get dotnet-version with value similar to below: // dotnet-version: | - // 6.0.437 - // 7.0.420 - // 8.0.413 + // 8.0.403 + // 9.0.100 return new Scalar(AnchorName.Empty, TagName.Empty, val, ScalarStyle.Literal, true, true, Mark.Empty, Mark.Empty); } @@ -151,35 +150,28 @@ private static IEnumerable ExtractDotnetSdkVersions(string con { // Extract versions from the node value e.g.: // dotnet-version: | - // 6.0.427 - // 7.0.410 - // 8.0.403 + // 8.0.404 + // 9.0.100 - string? sdk6Version = null; - string? sdk7Version = null; string? sdk8Version = null; + string? sdk9Version = null; foreach (var version in dotnetVersionNode.ToString().Split()) { - if (VersionComparer.IsNet6Version(version)) - { - sdk6Version = version; - } - - if (VersionComparer.IsNet7Version(version)) + if (VersionComparer.IsNet8Version(version)) { - sdk7Version = version; + sdk8Version = version; } - if (VersionComparer.IsNet8Version(version)) + if (VersionComparer.IsNet9Version(version)) { - sdk8Version = version; + sdk9Version = version; } } - if (sdk6Version is not null || sdk7Version is not null || sdk8Version is not null) + if (sdk8Version is not null || sdk9Version is not null) { - return new DotnetSdkVersion(sdk6Version, sdk7Version, sdk8Version); + return new DotnetSdkVersion(sdk8Version, sdk9Version); } return null; diff --git a/tools/SdkVersionAnalyzer/DockerfileAnalyzer.cs b/tools/SdkVersionAnalyzer/DockerfileAnalyzer.cs index 0e32420c17..16cc615289 100644 --- a/tools/SdkVersionAnalyzer/DockerfileAnalyzer.cs +++ b/tools/SdkVersionAnalyzer/DockerfileAnalyzer.cs @@ -44,9 +44,8 @@ private static string ModifySdkVersions(string content, DotnetSdkVersion request private static bool VerifySdkVersions(string content, DotnetSdkVersion expectedDotnetSdkVersion) { - string? net6SdkVersion = null; - string? net7SdkVersion = null; string? net8SdkVersion = null; + string? net9SdkVersion = null; var dockerfile = Dockerfile.Parse(content); var instruction = GetDotnetInstallingInstruction(dockerfile); @@ -56,8 +55,8 @@ private static bool VerifySdkVersions(string content, DotnetSdkVersion expectedD // && echo "SHA256: $(sha256sum dotnet-install.sh)" \ // && echo "de4957e41252191427a8ba0866f640b9f19c98fad62305919de41bd332e9c820 dotnet-install.sh" | sha256sum -c \ // && chmod +x ./dotnet-install.sh \ - // && ./dotnet-install.sh -v 6.0.427 --install-dir /usr/share/dotnet --no-path \ - // && ./dotnet-install.sh -v 7.0.410 --install-dir /usr/share/dotnet --no-path \ + // && ./dotnet-install.sh -v 8.0.403 --install-dir /usr/share/dotnet --no-path \ + // && ./dotnet-install.sh -v 9.0.100 --install-dir /usr/share/dotnet --no-path \ // && rm dotnet-install.sh if (instruction is not null) @@ -66,13 +65,13 @@ private static bool VerifySdkVersions(string content, DotnetSdkVersion expectedD foreach (Match match in matchCollection) { var extractedSdkVersion = match.Groups[1].Value; - if (VersionComparer.IsNet6Version(extractedSdkVersion)) + if (VersionComparer.IsNet8Version(extractedSdkVersion)) { - net6SdkVersion = extractedSdkVersion; + net8SdkVersion = extractedSdkVersion; } - else if (VersionComparer.IsNet7Version(extractedSdkVersion)) + else if (VersionComparer.IsNet9Version(extractedSdkVersion)) { - net7SdkVersion = extractedSdkVersion; + net9SdkVersion = extractedSdkVersion; } } } @@ -87,10 +86,10 @@ private static bool VerifySdkVersions(string content, DotnetSdkVersion expectedD if (IsDotnetSdkImage(imageName)) { var (sdkVersion, _) = GetSdkVersionAndSuffix(imageName); - net8SdkVersion = sdkVersion; + net9SdkVersion = sdkVersion; } - return VersionComparer.CompareVersions(expectedDotnetSdkVersion, net6SdkVersion, net7SdkVersion, net8SdkVersion); + return VersionComparer.CompareVersions(expectedDotnetSdkVersion, net8SdkVersion, net9SdkVersion); } private static string GetModifiedImageName(DotnetSdkVersion requestedDotnetSdkVersion, ImageName imageName) @@ -129,14 +128,14 @@ private static Command GetModifiedInstallCommand(Command command, DotnetSdkVersi private static string GetNewVersion(string oldVersion, DotnetSdkVersion requestedDotnetSdkVersion) { - if (VersionComparer.IsNet6Version(oldVersion)) + if (VersionComparer.IsNet8Version(oldVersion)) { - return requestedDotnetSdkVersion.Net6SdkVersion!; + return requestedDotnetSdkVersion.Net8SdkVersion!; } - if (VersionComparer.IsNet7Version(oldVersion)) + if (VersionComparer.IsNet9Version(oldVersion)) { - return requestedDotnetSdkVersion.Net7SdkVersion!; + return requestedDotnetSdkVersion.Net9SdkVersion!; } return oldVersion; diff --git a/tools/SdkVersionAnalyzer/DotnetSdkVersion.cs b/tools/SdkVersionAnalyzer/DotnetSdkVersion.cs index 5da722c265..5010145bb1 100644 --- a/tools/SdkVersionAnalyzer/DotnetSdkVersion.cs +++ b/tools/SdkVersionAnalyzer/DotnetSdkVersion.cs @@ -3,4 +3,4 @@ namespace SdkVersionAnalyzer; -internal record DotnetSdkVersion(string? Net6SdkVersion, string? Net7SdkVersion, string? Net8SdkVersion); +internal record DotnetSdkVersion(string? Net8SdkVersion, string? Net9SdkVersion); diff --git a/tools/SdkVersionAnalyzer/Program.cs b/tools/SdkVersionAnalyzer/Program.cs index 655c6c3172..21c1774a4d 100644 --- a/tools/SdkVersionAnalyzer/Program.cs +++ b/tools/SdkVersionAnalyzer/Program.cs @@ -1,12 +1,15 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +using System.Diagnostics; + namespace SdkVersionAnalyzer; internal static class Program { public static int Main(string[] args) { + Debugger.Launch(); if (args.Length < 2) { Console.WriteLine("At least 2 arguments required - operation mode and directory root."); @@ -22,9 +25,9 @@ public static int Main(string[] args) return VerifyDotnetSdkVersions(directoryRoot); } - case "--modify" when args.Length == 5: + case "--modify" when args.Length == 4: { - var requestedSdkVersions = new DotnetSdkVersion(args[2], args[3], args[4]); + var requestedSdkVersions = new DotnetSdkVersion(args[2], args[3]); ModifyDotnetSdkVersions(directoryRoot, requestedSdkVersions); return 0; } diff --git a/tools/SdkVersionAnalyzer/SdkVersionAnalyzer.csproj b/tools/SdkVersionAnalyzer/SdkVersionAnalyzer.csproj index 99c29cdf13..6dbf66cb02 100644 --- a/tools/SdkVersionAnalyzer/SdkVersionAnalyzer.csproj +++ b/tools/SdkVersionAnalyzer/SdkVersionAnalyzer.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable Exe diff --git a/tools/SdkVersionAnalyzer/VersionComparer.cs b/tools/SdkVersionAnalyzer/VersionComparer.cs index ab34f0483a..e36e8bf037 100644 --- a/tools/SdkVersionAnalyzer/VersionComparer.cs +++ b/tools/SdkVersionAnalyzer/VersionComparer.cs @@ -7,33 +7,26 @@ internal static class VersionComparer { public static bool CompareVersions(DotnetSdkVersion expectedDotnetSdkVersion, DotnetSdkVersion version) { - return CompareVersions(expectedDotnetSdkVersion, version.Net6SdkVersion, version.Net7SdkVersion, version.Net8SdkVersion); + return CompareVersions(expectedDotnetSdkVersion, version.Net8SdkVersion, version.Net9SdkVersion); } public static bool CompareVersions( DotnetSdkVersion expectedDotnetSdkVersion, - string? net6SdkVersion, - string? net7SdkVersion, - string? net8SdkVersion) + string? net8SdkVersion, + string? net9SdkVersion) { - return CompareVersion(expectedDotnetSdkVersion.Net6SdkVersion!, net6SdkVersion) && - CompareVersion(expectedDotnetSdkVersion.Net7SdkVersion!, net7SdkVersion) && - CompareVersion(expectedDotnetSdkVersion.Net8SdkVersion!, net8SdkVersion); + return CompareVersion(expectedDotnetSdkVersion.Net8SdkVersion!, net8SdkVersion) && + CompareVersion(expectedDotnetSdkVersion.Net9SdkVersion!, net9SdkVersion); } - public static bool IsNet6Version(string versionString) - { - return versionString.StartsWith('6'); - } - - public static bool IsNet7Version(string versionString) + public static bool IsNet8Version(string versionString) { - return versionString.StartsWith('7'); + return versionString.StartsWith('8'); } - public static bool IsNet8Version(string versionString) + public static bool IsNet9Version(string versionString) { - return versionString.StartsWith('8'); + return versionString.StartsWith('9'); } private static bool CompareVersion(string expectedVersion, string? extractedVersion) From 0a797d1fe96f9cdcb1ceedc5ddf3a455793d0f10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 10:12:29 +0100 Subject: [PATCH 11/29] Compile against .NET9 drops .NET6 and .NET7 --- build/Directory.Packages.props | 1 + build/_build.csproj | 3 ++- examples/demo/Client/Examples.Client.csproj | 2 +- examples/demo/Service/Examples.Service.csproj | 2 +- .../playground/AspNetCoreMvc/Examples.AspNetCoreMvc.csproj | 2 +- .../OpenTelemetry.AutoInstrumentation.nuspec | 2 +- src/CommonExcludedAssets.props | 2 +- src/Directory.Build.props | 2 +- .../OpenTelemetry.AutoInstrumentation.AdditionalDeps.csproj | 2 +- .../.publicApi/{net6.0 => net8.0}/PublicAPI.Shipped.txt | 0 .../.publicApi/{net6.0 => net8.0}/PublicAPI.Unshipped.txt | 0 ...emetry.AutoInstrumentation.AspNetCoreBootstrapper.csproj | 2 +- .../.publicApi/{net6.0 => net8.0}/PublicAPI.Shipped.txt | 0 .../.publicApi/{net6.0 => net8.0}/PublicAPI.Unshipped.txt | 0 .../OpenTelemetry.AutoInstrumentation.Loader.csproj | 2 +- .../.publicApi/{net6.0 => net8.0}/PublicAPI.Shipped.txt | 0 .../.publicApi/{net6.0 => net8.0}/PublicAPI.Unshipped.txt | 0 .../DuckTyping/DuckType.cs | 6 +++++- .../InstrumentationDefinitions.Derived.g.cs | 0 .../InstrumentationDefinitions.g.cs | 0 .../OpenTelemetry.AutoInstrumentation.csproj | 4 ++-- test/Directory.Build.props | 2 +- test/IntegrationTests/IntegrationTests.csproj | 5 ----- ...enTelemetry.AutoInstrumentation.StartupHook.Tests.csproj | 2 +- .../OpenTelemetry.AutoInstrumentation.Tests.csproj | 2 +- .../TransientDependenciesTests.cs | 2 +- test/test-applications/integrations/Integrations.props | 2 +- ...estApplication.ContinuousProfiler.ContextTracking.csproj | 2 +- .../TestApplication.ContinuousProfiler.csproj | 2 +- .../TestApplication.CustomSdk.csproj | 2 +- .../TestApplication.EntityFrameworkCore.Pomelo.MySql.csproj | 2 +- .../TestApplication.EntityFrameworkCore.csproj | 2 +- .../TestApplication.GraphQL/TestApplication.GraphQL.csproj | 2 +- .../TestApplication.Http/TestApplication.Http.csproj | 4 ++-- .../TestApplication.Logs/TestApplication.Logs.csproj | 2 +- .../TestApplication.MinimalApi.csproj | 2 +- .../TestApplication.NServiceBus.csproj | 2 +- .../TestApplication.OracleMda.Core.csproj | 2 +- .../TestApplication.Quartz/TestApplication.Quartz.csproj | 2 +- .../TestApplication.Wcf.Client.DotNet.csproj | 2 +- .../TestApplication.Worker/TestApplication.Worker.csproj | 2 +- .../TestApplication.ContinuousProfiler.Fs/ClassFs.fs | 2 +- .../TestApplication.ContinuousProfiler.Fs.fsproj | 2 +- .../TestApplication.ContinuousProfiler.Vb.vbproj | 2 +- test/test-applications/mocks/Directory.Build.props | 2 +- test/test-applications/nuget-packages/Directory.Build.props | 2 +- .../DependencyListGenerator/DependencyListGenerator.csproj | 2 +- .../LibraryVersionsGenerator.csproj | 2 +- 48 files changed, 46 insertions(+), 45 deletions(-) rename src/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper/.publicApi/{net6.0 => net8.0}/PublicAPI.Shipped.txt (100%) rename src/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper/.publicApi/{net6.0 => net8.0}/PublicAPI.Unshipped.txt (100%) rename src/OpenTelemetry.AutoInstrumentation.Loader/.publicApi/{net6.0 => net8.0}/PublicAPI.Shipped.txt (100%) rename src/OpenTelemetry.AutoInstrumentation.Loader/.publicApi/{net6.0 => net8.0}/PublicAPI.Unshipped.txt (100%) rename src/OpenTelemetry.AutoInstrumentation/.publicApi/{net6.0 => net8.0}/PublicAPI.Shipped.txt (100%) rename src/OpenTelemetry.AutoInstrumentation/.publicApi/{net6.0 => net8.0}/PublicAPI.Unshipped.txt (100%) rename src/OpenTelemetry.AutoInstrumentation/Generated/{net6.0 => net8.0}/SourceGenerators/SourceGenerators.InstrumentationDefinitionsGenerator/InstrumentationDefinitions.Derived.g.cs (100%) rename src/OpenTelemetry.AutoInstrumentation/Generated/{net6.0 => net8.0}/SourceGenerators/SourceGenerators.InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs (100%) diff --git a/build/Directory.Packages.props b/build/Directory.Packages.props index 0087223d30..7557b84b29 100644 --- a/build/Directory.Packages.props +++ b/build/Directory.Packages.props @@ -5,5 +5,6 @@ + diff --git a/build/_build.csproj b/build/_build.csproj index e017a7aef5..164391e725 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 CS0649;CS0169 ..\ @@ -16,6 +16,7 @@ + diff --git a/examples/demo/Client/Examples.Client.csproj b/examples/demo/Client/Examples.Client.csproj index f67f521030..a47cf75648 100644 --- a/examples/demo/Client/Examples.Client.csproj +++ b/examples/demo/Client/Examples.Client.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 enable diff --git a/examples/demo/Service/Examples.Service.csproj b/examples/demo/Service/Examples.Service.csproj index 82008da538..d496d8dd5b 100644 --- a/examples/demo/Service/Examples.Service.csproj +++ b/examples/demo/Service/Examples.Service.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable diff --git a/examples/playground/AspNetCoreMvc/Examples.AspNetCoreMvc.csproj b/examples/playground/AspNetCoreMvc/Examples.AspNetCoreMvc.csproj index 9eae0cce0b..7f9dedb571 100644 --- a/examples/playground/AspNetCoreMvc/Examples.AspNetCoreMvc.csproj +++ b/examples/playground/AspNetCoreMvc/Examples.AspNetCoreMvc.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0 Examples.AspNetCoreMvc diff --git a/nuget/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.nuspec b/nuget/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.nuspec index 0964b3a9c8..562c6f5f3e 100644 --- a/nuget/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.nuspec +++ b/nuget/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.nuspec @@ -23,7 +23,7 @@ - + diff --git a/src/CommonExcludedAssets.props b/src/CommonExcludedAssets.props index c8b94e8230..ead706dda9 100644 --- a/src/CommonExcludedAssets.props +++ b/src/CommonExcludedAssets.props @@ -1,6 +1,6 @@ - + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 61b06b6c22..b387b91f30 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -2,7 +2,7 @@ - net6.0 + net8.0 $(TargetFrameworks);net462 true true diff --git a/src/OpenTelemetry.AutoInstrumentation.AdditionalDeps/OpenTelemetry.AutoInstrumentation.AdditionalDeps.csproj b/src/OpenTelemetry.AutoInstrumentation.AdditionalDeps/OpenTelemetry.AutoInstrumentation.AdditionalDeps.csproj index b153dc30c0..6f2a502507 100644 --- a/src/OpenTelemetry.AutoInstrumentation.AdditionalDeps/OpenTelemetry.AutoInstrumentation.AdditionalDeps.csproj +++ b/src/OpenTelemetry.AutoInstrumentation.AdditionalDeps/OpenTelemetry.AutoInstrumentation.AdditionalDeps.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0 diff --git a/src/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper/.publicApi/net6.0/PublicAPI.Shipped.txt b/src/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper/.publicApi/net8.0/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper/.publicApi/net6.0/PublicAPI.Shipped.txt rename to src/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper/.publicApi/net8.0/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper/.publicApi/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper/.publicApi/net8.0/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper/.publicApi/net6.0/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper/.publicApi/net8.0/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper.csproj b/src/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper.csproj index 415b8edfee..808f8a3eb7 100644 --- a/src/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper.csproj +++ b/src/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper.csproj @@ -3,7 +3,7 @@ - net6.0 + net8.0 ASP.NET Core Bootstrapper used by the OpenTelemetry.AutoInstrumentation project. diff --git a/src/OpenTelemetry.AutoInstrumentation.Loader/.publicApi/net6.0/PublicAPI.Shipped.txt b/src/OpenTelemetry.AutoInstrumentation.Loader/.publicApi/net8.0/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.AutoInstrumentation.Loader/.publicApi/net6.0/PublicAPI.Shipped.txt rename to src/OpenTelemetry.AutoInstrumentation.Loader/.publicApi/net8.0/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.AutoInstrumentation.Loader/.publicApi/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.AutoInstrumentation.Loader/.publicApi/net8.0/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.AutoInstrumentation.Loader/.publicApi/net6.0/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.AutoInstrumentation.Loader/.publicApi/net8.0/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.AutoInstrumentation.Loader/OpenTelemetry.AutoInstrumentation.Loader.csproj b/src/OpenTelemetry.AutoInstrumentation.Loader/OpenTelemetry.AutoInstrumentation.Loader.csproj index 6bbd496be3..bb34a02e4f 100644 --- a/src/OpenTelemetry.AutoInstrumentation.Loader/OpenTelemetry.AutoInstrumentation.Loader.csproj +++ b/src/OpenTelemetry.AutoInstrumentation.Loader/OpenTelemetry.AutoInstrumentation.Loader.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 $(TargetFrameworks);net462 Loader used by the OpenTelemetry.AutoInstrumentation project. ..\bin\ProfilerResources\ diff --git a/src/OpenTelemetry.AutoInstrumentation/.publicApi/net6.0/PublicAPI.Shipped.txt b/src/OpenTelemetry.AutoInstrumentation/.publicApi/net8.0/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.AutoInstrumentation/.publicApi/net6.0/PublicAPI.Shipped.txt rename to src/OpenTelemetry.AutoInstrumentation/.publicApi/net8.0/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.AutoInstrumentation/.publicApi/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.AutoInstrumentation/.publicApi/net8.0/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.AutoInstrumentation/.publicApi/net6.0/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.AutoInstrumentation/.publicApi/net8.0/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.AutoInstrumentation/DuckTyping/DuckType.cs b/src/OpenTelemetry.AutoInstrumentation/DuckTyping/DuckType.cs index bec688d373..ff47fef8dc 100644 --- a/src/OpenTelemetry.AutoInstrumentation/DuckTyping/DuckType.cs +++ b/src/OpenTelemetry.AutoInstrumentation/DuckTyping/DuckType.cs @@ -328,7 +328,11 @@ private static ModuleBuilder CreateTypeAndModuleBuilder(Type typeToDeriveFrom, T // If the proxy type definition is an interface we create an struct proxy // If the proxy type definition is an struct then we use that struct to copy the values from the target type parentType = typeof(ValueType); - typeAttributes = TypeAttributes.Public | TypeAttributes.AnsiClass | TypeAttributes.BeforeFieldInit | TypeAttributes.SequentialLayout | TypeAttributes.Sealed | TypeAttributes.Serializable; + typeAttributes = TypeAttributes.Public | TypeAttributes.AnsiClass | TypeAttributes.BeforeFieldInit | TypeAttributes.SequentialLayout | TypeAttributes.Sealed +#pragma warning disable SYSLIB0050 + // TODO double check how to handle TypeAttributes.Serializable which is obsolete + | TypeAttributes.Serializable; +#pragma warning restore SYSLIB0050 if (typeToDeriveFrom.IsInterface) { interfaceTypes = new[] { typeToDeriveFrom, typeof(IDuckType) }; diff --git a/src/OpenTelemetry.AutoInstrumentation/Generated/net6.0/SourceGenerators/SourceGenerators.InstrumentationDefinitionsGenerator/InstrumentationDefinitions.Derived.g.cs b/src/OpenTelemetry.AutoInstrumentation/Generated/net8.0/SourceGenerators/SourceGenerators.InstrumentationDefinitionsGenerator/InstrumentationDefinitions.Derived.g.cs similarity index 100% rename from src/OpenTelemetry.AutoInstrumentation/Generated/net6.0/SourceGenerators/SourceGenerators.InstrumentationDefinitionsGenerator/InstrumentationDefinitions.Derived.g.cs rename to src/OpenTelemetry.AutoInstrumentation/Generated/net8.0/SourceGenerators/SourceGenerators.InstrumentationDefinitionsGenerator/InstrumentationDefinitions.Derived.g.cs diff --git a/src/OpenTelemetry.AutoInstrumentation/Generated/net6.0/SourceGenerators/SourceGenerators.InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs b/src/OpenTelemetry.AutoInstrumentation/Generated/net8.0/SourceGenerators/SourceGenerators.InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs similarity index 100% rename from src/OpenTelemetry.AutoInstrumentation/Generated/net6.0/SourceGenerators/SourceGenerators.InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs rename to src/OpenTelemetry.AutoInstrumentation/Generated/net8.0/SourceGenerators/SourceGenerators.InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs diff --git a/src/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.csproj b/src/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.csproj index c490494534..7605529b59 100644 --- a/src/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.csproj +++ b/src/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.csproj @@ -20,7 +20,7 @@ - + @@ -53,7 +53,7 @@ - + diff --git a/test/Directory.Build.props b/test/Directory.Build.props index 34fc41ce6e..f8a832d953 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -4,7 +4,7 @@ $(DefineConstants);DEFAULT_TEST_PACKAGE_VERSIONS - net8.0;net7.0;net6.0 + net9.0;net8.0 $(TargetFrameworks);net462 true diff --git a/test/IntegrationTests/IntegrationTests.csproj b/test/IntegrationTests/IntegrationTests.csproj index a3d3c9cbba..636cc16e6a 100644 --- a/test/IntegrationTests/IntegrationTests.csproj +++ b/test/IntegrationTests/IntegrationTests.csproj @@ -1,10 +1,5 @@  - - - CS8981 - - $(DefineConstants);_WINDOWS diff --git a/test/OpenTelemetry.AutoInstrumentation.StartupHook.Tests/OpenTelemetry.AutoInstrumentation.StartupHook.Tests.csproj b/test/OpenTelemetry.AutoInstrumentation.StartupHook.Tests/OpenTelemetry.AutoInstrumentation.StartupHook.Tests.csproj index 3d30963088..5da4ea0537 100644 --- a/test/OpenTelemetry.AutoInstrumentation.StartupHook.Tests/OpenTelemetry.AutoInstrumentation.StartupHook.Tests.csproj +++ b/test/OpenTelemetry.AutoInstrumentation.StartupHook.Tests/OpenTelemetry.AutoInstrumentation.StartupHook.Tests.csproj @@ -1,7 +1,7 @@ - net8.0;net7.0;net6.0 + net9.0;net8.0 diff --git a/test/OpenTelemetry.AutoInstrumentation.Tests/OpenTelemetry.AutoInstrumentation.Tests.csproj b/test/OpenTelemetry.AutoInstrumentation.Tests/OpenTelemetry.AutoInstrumentation.Tests.csproj index 19a12b4ba8..04f4a93f04 100644 --- a/test/OpenTelemetry.AutoInstrumentation.Tests/OpenTelemetry.AutoInstrumentation.Tests.csproj +++ b/test/OpenTelemetry.AutoInstrumentation.Tests/OpenTelemetry.AutoInstrumentation.Tests.csproj @@ -7,7 +7,7 @@ - + diff --git a/test/OpenTelemetry.AutoInstrumentation.Tests/TransientDependenciesTests.cs b/test/OpenTelemetry.AutoInstrumentation.Tests/TransientDependenciesTests.cs index 2a2f6bbf09..cbe640c6b7 100644 --- a/test/OpenTelemetry.AutoInstrumentation.Tests/TransientDependenciesTests.cs +++ b/test/OpenTelemetry.AutoInstrumentation.Tests/TransientDependenciesTests.cs @@ -3,7 +3,7 @@ // This test is defined in NET8.0 because the tool is written in .NET 8.0 // The actual test is testing .NET 462 context. -#if NET8_0_OR_GREATER +#if NET9_0_OR_GREATER using System.Reflection; using System.Runtime.InteropServices; diff --git a/test/test-applications/integrations/Integrations.props b/test/test-applications/integrations/Integrations.props index 9ca6dc76ca..f466872f41 100644 --- a/test/test-applications/integrations/Integrations.props +++ b/test/test-applications/integrations/Integrations.props @@ -1,7 +1,7 @@ - net8.0;net7.0;net6.0 + net9.0;net8.0 $(TargetFrameworks);net462 Exe diff --git a/test/test-applications/integrations/TestApplication.ContinuousProfiler.ContextTracking/TestApplication.ContinuousProfiler.ContextTracking.csproj b/test/test-applications/integrations/TestApplication.ContinuousProfiler.ContextTracking/TestApplication.ContinuousProfiler.ContextTracking.csproj index 3d2f696c0e..e59c6c6912 100644 --- a/test/test-applications/integrations/TestApplication.ContinuousProfiler.ContextTracking/TestApplication.ContinuousProfiler.ContextTracking.csproj +++ b/test/test-applications/integrations/TestApplication.ContinuousProfiler.ContextTracking/TestApplication.ContinuousProfiler.ContextTracking.csproj @@ -2,7 +2,7 @@ Exe - net8.0;net7.0;net6.0 + net9.0;net8.0 enable enable diff --git a/test/test-applications/integrations/TestApplication.ContinuousProfiler/TestApplication.ContinuousProfiler.csproj b/test/test-applications/integrations/TestApplication.ContinuousProfiler/TestApplication.ContinuousProfiler.csproj index e15a20cf9b..e1cd364b26 100644 --- a/test/test-applications/integrations/TestApplication.ContinuousProfiler/TestApplication.ContinuousProfiler.csproj +++ b/test/test-applications/integrations/TestApplication.ContinuousProfiler/TestApplication.ContinuousProfiler.csproj @@ -2,7 +2,7 @@ Exe - net8.0;net7.0;net6.0 + net9.0;net8.0 true SA1518;$(NoWarn) diff --git a/test/test-applications/integrations/TestApplication.CustomSdk/TestApplication.CustomSdk.csproj b/test/test-applications/integrations/TestApplication.CustomSdk/TestApplication.CustomSdk.csproj index 1807b50793..d0a39b2c8e 100644 --- a/test/test-applications/integrations/TestApplication.CustomSdk/TestApplication.CustomSdk.csproj +++ b/test/test-applications/integrations/TestApplication.CustomSdk/TestApplication.CustomSdk.csproj @@ -2,7 +2,7 @@ Exe - net8.0;net7.0;net6.0 + net9.0;net8.0 diff --git a/test/test-applications/integrations/TestApplication.EntityFrameworkCore.Pomelo.MySql/TestApplication.EntityFrameworkCore.Pomelo.MySql.csproj b/test/test-applications/integrations/TestApplication.EntityFrameworkCore.Pomelo.MySql/TestApplication.EntityFrameworkCore.Pomelo.MySql.csproj index e0fac3ccd9..832b075745 100644 --- a/test/test-applications/integrations/TestApplication.EntityFrameworkCore.Pomelo.MySql/TestApplication.EntityFrameworkCore.Pomelo.MySql.csproj +++ b/test/test-applications/integrations/TestApplication.EntityFrameworkCore.Pomelo.MySql/TestApplication.EntityFrameworkCore.Pomelo.MySql.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0 diff --git a/test/test-applications/integrations/TestApplication.EntityFrameworkCore/TestApplication.EntityFrameworkCore.csproj b/test/test-applications/integrations/TestApplication.EntityFrameworkCore/TestApplication.EntityFrameworkCore.csproj index 30788d7126..8489bc7166 100644 --- a/test/test-applications/integrations/TestApplication.EntityFrameworkCore/TestApplication.EntityFrameworkCore.csproj +++ b/test/test-applications/integrations/TestApplication.EntityFrameworkCore/TestApplication.EntityFrameworkCore.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0 diff --git a/test/test-applications/integrations/TestApplication.GraphQL/TestApplication.GraphQL.csproj b/test/test-applications/integrations/TestApplication.GraphQL/TestApplication.GraphQL.csproj index 90d242c52a..3d70b21eb9 100644 --- a/test/test-applications/integrations/TestApplication.GraphQL/TestApplication.GraphQL.csproj +++ b/test/test-applications/integrations/TestApplication.GraphQL/TestApplication.GraphQL.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0 $(DefineConstants);GRAPHQL_7_7_OR_GREATER diff --git a/test/test-applications/integrations/TestApplication.Http/TestApplication.Http.csproj b/test/test-applications/integrations/TestApplication.Http/TestApplication.Http.csproj index a0c458f7b6..def814a846 100644 --- a/test/test-applications/integrations/TestApplication.Http/TestApplication.Http.csproj +++ b/test/test-applications/integrations/TestApplication.Http/TestApplication.Http.csproj @@ -1,11 +1,11 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0 - + diff --git a/test/test-applications/integrations/TestApplication.Logs/TestApplication.Logs.csproj b/test/test-applications/integrations/TestApplication.Logs/TestApplication.Logs.csproj index 1b512612b6..ce7844057a 100644 --- a/test/test-applications/integrations/TestApplication.Logs/TestApplication.Logs.csproj +++ b/test/test-applications/integrations/TestApplication.Logs/TestApplication.Logs.csproj @@ -1,7 +1,7 @@ - net8.0;net7.0;net6.0 + net9.0;net8.0 diff --git a/test/test-applications/integrations/TestApplication.MinimalApi/TestApplication.MinimalApi.csproj b/test/test-applications/integrations/TestApplication.MinimalApi/TestApplication.MinimalApi.csproj index 1b512612b6..ce7844057a 100644 --- a/test/test-applications/integrations/TestApplication.MinimalApi/TestApplication.MinimalApi.csproj +++ b/test/test-applications/integrations/TestApplication.MinimalApi/TestApplication.MinimalApi.csproj @@ -1,7 +1,7 @@ - net8.0;net7.0;net6.0 + net9.0;net8.0 diff --git a/test/test-applications/integrations/TestApplication.NServiceBus/TestApplication.NServiceBus.csproj b/test/test-applications/integrations/TestApplication.NServiceBus/TestApplication.NServiceBus.csproj index 9092954c13..df97069c46 100644 --- a/test/test-applications/integrations/TestApplication.NServiceBus/TestApplication.NServiceBus.csproj +++ b/test/test-applications/integrations/TestApplication.NServiceBus/TestApplication.NServiceBus.csproj @@ -1,7 +1,7 @@ - net8.0;net7.0;net6.0 + net9.0;net8.0 $(TargetFrameworks);net472 diff --git a/test/test-applications/integrations/TestApplication.OracleMda.Core/TestApplication.OracleMda.Core.csproj b/test/test-applications/integrations/TestApplication.OracleMda.Core/TestApplication.OracleMda.Core.csproj index 5da0bd110d..d29c1bf318 100644 --- a/test/test-applications/integrations/TestApplication.OracleMda.Core/TestApplication.OracleMda.Core.csproj +++ b/test/test-applications/integrations/TestApplication.OracleMda.Core/TestApplication.OracleMda.Core.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0 diff --git a/test/test-applications/integrations/TestApplication.Quartz/TestApplication.Quartz.csproj b/test/test-applications/integrations/TestApplication.Quartz/TestApplication.Quartz.csproj index 60f61cbd41..7d09b06c7e 100644 --- a/test/test-applications/integrations/TestApplication.Quartz/TestApplication.Quartz.csproj +++ b/test/test-applications/integrations/TestApplication.Quartz/TestApplication.Quartz.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0 $(TargetFrameworks);net472 $(DefineConstants);QUARTZ_3_7_0_OR_GREATER diff --git a/test/test-applications/integrations/TestApplication.Wcf.Client.DotNet/TestApplication.Wcf.Client.DotNet.csproj b/test/test-applications/integrations/TestApplication.Wcf.Client.DotNet/TestApplication.Wcf.Client.DotNet.csproj index 771437d068..c11d60d756 100644 --- a/test/test-applications/integrations/TestApplication.Wcf.Client.DotNet/TestApplication.Wcf.Client.DotNet.csproj +++ b/test/test-applications/integrations/TestApplication.Wcf.Client.DotNet/TestApplication.Wcf.Client.DotNet.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0 diff --git a/test/test-applications/integrations/TestApplication.Worker/TestApplication.Worker.csproj b/test/test-applications/integrations/TestApplication.Worker/TestApplication.Worker.csproj index 066c0414c4..1f80c04144 100644 --- a/test/test-applications/integrations/TestApplication.Worker/TestApplication.Worker.csproj +++ b/test/test-applications/integrations/TestApplication.Worker/TestApplication.Worker.csproj @@ -1,7 +1,7 @@ - net8.0;net7.0;net6.0 + net9.0;net8.0 diff --git a/test/test-applications/integrations/dependency-libs/TestApplication.ContinuousProfiler.Fs/ClassFs.fs b/test/test-applications/integrations/dependency-libs/TestApplication.ContinuousProfiler.Fs/ClassFs.fs index 6cdedec563..6bac552a4f 100644 --- a/test/test-applications/integrations/dependency-libs/TestApplication.ContinuousProfiler.Fs/ClassFs.fs +++ b/test/test-applications/integrations/dependency-libs/TestApplication.ContinuousProfiler.Fs/ClassFs.fs @@ -9,5 +9,5 @@ open System.Threading; module ClassFs = let methodFs testParam = Console.WriteLine("Thread.Sleep - starting " + testParam) - Thread.Sleep(TimeSpan.FromSeconds(5)) // Give a chance for the continuous profiler to collect a profile. + Thread.Sleep(TimeSpan.FromSeconds(5.0)) // Give a chance for the continuous profiler to collect a profile. Console.WriteLine("Thread.Sleep - finished") diff --git a/test/test-applications/integrations/dependency-libs/TestApplication.ContinuousProfiler.Fs/TestApplication.ContinuousProfiler.Fs.fsproj b/test/test-applications/integrations/dependency-libs/TestApplication.ContinuousProfiler.Fs/TestApplication.ContinuousProfiler.Fs.fsproj index a7fb55478e..409df48f3c 100644 --- a/test/test-applications/integrations/dependency-libs/TestApplication.ContinuousProfiler.Fs/TestApplication.ContinuousProfiler.Fs.fsproj +++ b/test/test-applications/integrations/dependency-libs/TestApplication.ContinuousProfiler.Fs/TestApplication.ContinuousProfiler.Fs.fsproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0 true latest diff --git a/test/test-applications/integrations/dependency-libs/TestApplication.ContinuousProfiler.Vb/TestApplication.ContinuousProfiler.Vb.vbproj b/test/test-applications/integrations/dependency-libs/TestApplication.ContinuousProfiler.Vb/TestApplication.ContinuousProfiler.Vb.vbproj index e4309a5d0e..99094c7963 100644 --- a/test/test-applications/integrations/dependency-libs/TestApplication.ContinuousProfiler.Vb/TestApplication.ContinuousProfiler.Vb.vbproj +++ b/test/test-applications/integrations/dependency-libs/TestApplication.ContinuousProfiler.Vb/TestApplication.ContinuousProfiler.Vb.vbproj @@ -2,7 +2,7 @@ TestApplication.ContinuousProfiler.Vb - net8.0;net7.0;net6.0 + net9.0;net8.0 latest diff --git a/test/test-applications/mocks/Directory.Build.props b/test/test-applications/mocks/Directory.Build.props index bdfc4bd550..cc664cef4f 100644 --- a/test/test-applications/mocks/Directory.Build.props +++ b/test/test-applications/mocks/Directory.Build.props @@ -4,7 +4,7 @@ $(DefineConstants);DEFAULT_TEST_PACKAGE_VERSIONS - net8.0;net7.0;net6.0 + net9.0;net8.0 $(TargetFrameworks);net462 true diff --git a/test/test-applications/nuget-packages/Directory.Build.props b/test/test-applications/nuget-packages/Directory.Build.props index 82da6f16fc..405e17c1ca 100644 --- a/test/test-applications/nuget-packages/Directory.Build.props +++ b/test/test-applications/nuget-packages/Directory.Build.props @@ -5,7 +5,7 @@ - net8.0;net7.0;net6.0 + net9.0;net8.0 $(TargetFrameworks);net462 enable diff --git a/tools/DependencyListGenerator/DependencyListGenerator.csproj b/tools/DependencyListGenerator/DependencyListGenerator.csproj index 87e64339ae..b80dfbf104 100644 --- a/tools/DependencyListGenerator/DependencyListGenerator.csproj +++ b/tools/DependencyListGenerator/DependencyListGenerator.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable disable true diff --git a/tools/LibraryVersionsGenerator/LibraryVersionsGenerator.csproj b/tools/LibraryVersionsGenerator/LibraryVersionsGenerator.csproj index fcbb35c7f7..37e6b6b1b8 100644 --- a/tools/LibraryVersionsGenerator/LibraryVersionsGenerator.csproj +++ b/tools/LibraryVersionsGenerator/LibraryVersionsGenerator.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 From ab6870c2053519d310aed70c9f71c2ddbed178d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 11:26:24 +0100 Subject: [PATCH 12/29] Adjust nuke build --- build/Build.Steps.cs | 27 +++++++++----------------- build/Extensions/DepsJsonExtensions.cs | 3 +-- build/TargetFramework.cs | 3 +-- 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/build/Build.Steps.cs b/build/Build.Steps.cs index d9fdeedee0..e891b882b1 100644 --- a/build/Build.Steps.cs +++ b/build/Build.Steps.cs @@ -44,15 +44,11 @@ partial class Build private static readonly IEnumerable TargetFrameworks = new[] { TargetFramework.NET462, - TargetFramework.NET6_0 + TargetFramework.NET8_0 }; private static readonly IEnumerable TestFrameworks = TargetFrameworks - .Concat(TargetFramework.NET7_0 -#if NET8_0_OR_GREATER - , TargetFramework.NET8_0 -#endif - ); + .Concat(TargetFramework.NET9_0); Target CreateRequiredDirectories => _ => _ .Unlisted() @@ -291,15 +287,15 @@ DotNetBuildSettings BuildTestApplication(DotNetBuildSettings x) => .SetFramework(TargetFramework.NETCore3_1) .SetOutput(TracerHomeDirectory / MapToFolderOutput(TargetFramework.NETCore3_1))); - // AutoInstrumentationLoader publish is needed only for .NET 6.0 to support load from AutoInstrumentationStartupHook. + // AutoInstrumentationLoader publish is needed only for .NET 8.0 to support load from AutoInstrumentationStartupHook. DotNetPublish(s => s .SetProject(Solution.GetProjectByName(Projects.AutoInstrumentationLoader)) .SetConfiguration(BuildConfiguration) .SetTargetPlatformAnyCPU() .EnableNoBuild() .SetNoRestore(NoRestore) - .SetFramework(TargetFramework.NET6_0) - .SetOutput(TracerHomeDirectory / MapToFolderOutput(TargetFramework.NET6_0))); + .SetFramework(TargetFramework.NET8_0) + .SetOutput(TracerHomeDirectory / MapToFolderOutput(TargetFramework.NET8_0))); DotNetPublish(s => s .SetProject(Solution.GetProjectByName(Projects.AutoInstrumentationAspNetCoreBootstrapper)) @@ -307,8 +303,8 @@ DotNetBuildSettings BuildTestApplication(DotNetBuildSettings x) => .SetTargetPlatformAnyCPU() .EnableNoBuild() .SetNoRestore(NoRestore) - .SetFramework(TargetFramework.NET6_0) - .SetOutput(TracerHomeDirectory / MapToFolderOutput(TargetFramework.NET6_0))); + .SetFramework(TargetFramework.NET8_0) + .SetOutput(TracerHomeDirectory / MapToFolderOutput(TargetFramework.NET8_0))); RemoveFilesInNetFolderAvailableInAdditionalStore(); @@ -593,14 +589,9 @@ void RemoveFilesInNetFolderAvailableInAdditionalStore() // To allow roll forward for applications, like Roslyn, that target one tfm // but have a later runtime move the libraries under the original tfm folder // to the latest one. - if (folderRuntimeName == TargetFramework.NET6_0) - { - depsJson.RollFrameworkForward(TargetFramework.NET6_0, TargetFramework.NET8_0, architectureStores); - } - else if (folderRuntimeName == TargetFramework.NET7_0 || folderRuntimeName == TargetFramework.NET8_0) + if (folderRuntimeName == TargetFramework.NET8_0 || folderRuntimeName == TargetFramework.NET9_0) { - depsJson.RollFrameworkForward(TargetFramework.NET6_0, TargetFramework.NET8_0, architectureStores); - depsJson.RollFrameworkForward(TargetFramework.NET7_0, TargetFramework.NET8_0, architectureStores); + depsJson.RollFrameworkForward(TargetFramework.NET8_0, TargetFramework.NET9_0, architectureStores); } // Write the updated deps.json file. diff --git a/build/Extensions/DepsJsonExtensions.cs b/build/Extensions/DepsJsonExtensions.cs index f7fa241d58..b610d3c173 100644 --- a/build/Extensions/DepsJsonExtensions.cs +++ b/build/Extensions/DepsJsonExtensions.cs @@ -11,9 +11,8 @@ public static string GetFolderRuntimeName(this JsonObject depsJson) var runtimeName = depsJson["runtimeTarget"]["name"].GetValue(); var folderRuntimeName = runtimeName switch { - ".NETCoreApp,Version=v6.0" => "net6.0", - ".NETCoreApp,Version=v7.0" => "net7.0", ".NETCoreApp,Version=v8.0" => "net8.0", + ".NETCoreApp,Version=v9.0" => "net9.0", _ => throw new ArgumentOutOfRangeException(nameof(runtimeName), runtimeName, "This value is not supported. You have probably introduced new .NET version to AutoInstrumentation") }; diff --git a/build/TargetFramework.cs b/build/TargetFramework.cs index c13e6aa95c..e68fcd7321 100644 --- a/build/TargetFramework.cs +++ b/build/TargetFramework.cs @@ -10,9 +10,8 @@ public class TargetFramework : Enumeration public static readonly TargetFramework NOT_SPECIFIED = new() { Value = string.Empty }; public static readonly TargetFramework NET462 = new() { Value = "net462" }; public static readonly TargetFramework NETCore3_1 = new() { Value = "netcoreapp3.1" }; - public static readonly TargetFramework NET6_0 = new() { Value = "net6.0" }; - public static readonly TargetFramework NET7_0 = new() { Value = "net7.0" }; public static readonly TargetFramework NET8_0 = new() { Value = "net8.0" }; + public static readonly TargetFramework NET9_0 = new() { Value = "net9.0" }; public static readonly TargetFramework[] NetFramework = { NET462 From 8902ee32040dc5d07c9d29e0ffdd614554d7c86e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 11:38:11 +0100 Subject: [PATCH 13/29] Fix build tests --- ...nStructure_alpine-linux-arm64.verified.txt | 61 ++++----- ...ionStructure_alpine-linux-x64.verified.txt | 61 ++++----- ...ributionStructure_linux-arm64.verified.txt | 61 ++++----- ...stributionStructure_linux-x64.verified.txt | 61 ++++----- ...sts.DistributionStructure_osx.verified.txt | 61 ++++----- ...DistributionStructure_windows.verified.txt | 118 +++++++----------- 6 files changed, 160 insertions(+), 263 deletions(-) diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-arm64.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-arm64.verified.txt index b2e6309571..6d99b311f6 100644 --- a/test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-arm64.verified.txt +++ b/test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-arm64.verified.txt @@ -1,7 +1,6 @@ [ - /AdditionalDeps/shared/Microsoft.NETCore.App/6.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, - /AdditionalDeps/shared/Microsoft.NETCore.App/7.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, /AdditionalDeps/shared/Microsoft.NETCore.App/8.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, + /AdditionalDeps/shared/Microsoft.NETCore.App/9.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, /LICENSE, /instrument.sh, /linux-musl-arm64/OpenTelemetry.AutoInstrumentation.Native.so, @@ -9,7 +8,6 @@ /net/Grpc.Core.Api.dll, /net/Grpc.Net.Client.dll, /net/Grpc.Net.Common.dll, - /net/Microsoft.Extensions.Diagnostics.Abstractions.dll, /net/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, /net/OpenTelemetry.Api.ProviderBuilderExtensions.dll, /net/OpenTelemetry.Api.dll, @@ -50,39 +48,26 @@ /net/System.ServiceModel.Primitives.dll, /net/System.ServiceModel.dll, /net/ruleEngine.json, - /store/arm64/net6.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll, - /store/arm64/net6.0/microsoft.extensions.configuration.binder/8.0.1/lib/net8.0/Microsoft.Extensions.Configuration.Binder.dll, - /store/arm64/net6.0/microsoft.extensions.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.dll, - /store/arm64/net6.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, - /store/arm64/net6.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.dll, - /store/arm64/net6.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll, - /store/arm64/net6.0/microsoft.extensions.logging.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Configuration.dll, - /store/arm64/net6.0/microsoft.extensions.logging/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.dll, - /store/arm64/net6.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net8.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, - /store/arm64/net6.0/microsoft.extensions.options/8.0.0/lib/net8.0/Microsoft.Extensions.Options.dll, - /store/arm64/net6.0/microsoft.extensions.primitives/8.0.0/lib/net8.0/Microsoft.Extensions.Primitives.dll, - /store/arm64/net6.0/system.diagnostics.diagnosticsource/8.0.0/lib/net8.0/System.Diagnostics.DiagnosticSource.dll, - /store/arm64/net7.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll, - /store/arm64/net7.0/microsoft.extensions.configuration.binder/8.0.1/lib/net8.0/Microsoft.Extensions.Configuration.Binder.dll, - /store/arm64/net7.0/microsoft.extensions.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.dll, - /store/arm64/net7.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, - /store/arm64/net7.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.dll, - /store/arm64/net7.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll, - /store/arm64/net7.0/microsoft.extensions.logging.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Configuration.dll, - /store/arm64/net7.0/microsoft.extensions.logging/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.dll, - /store/arm64/net7.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net8.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, - /store/arm64/net7.0/microsoft.extensions.options/8.0.0/lib/net8.0/Microsoft.Extensions.Options.dll, - /store/arm64/net7.0/microsoft.extensions.primitives/8.0.0/lib/net8.0/Microsoft.Extensions.Primitives.dll, - /store/arm64/net7.0/system.diagnostics.diagnosticsource/8.0.0/lib/net8.0/System.Diagnostics.DiagnosticSource.dll, - /store/arm64/net8.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll, - /store/arm64/net8.0/microsoft.extensions.configuration.binder/8.0.1/lib/net8.0/Microsoft.Extensions.Configuration.Binder.dll, - /store/arm64/net8.0/microsoft.extensions.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.dll, - /store/arm64/net8.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, - /store/arm64/net8.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.dll, - /store/arm64/net8.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll, - /store/arm64/net8.0/microsoft.extensions.logging.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Configuration.dll, - /store/arm64/net8.0/microsoft.extensions.logging/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.dll, - /store/arm64/net8.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net8.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, - /store/arm64/net8.0/microsoft.extensions.options/8.0.0/lib/net8.0/Microsoft.Extensions.Options.dll, - /store/arm64/net8.0/microsoft.extensions.primitives/8.0.0/lib/net8.0/Microsoft.Extensions.Primitives.dll + /store/arm64/net8.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.Abstractions.dll, + /store/arm64/net8.0/microsoft.extensions.configuration.binder/8.0.1/lib/net9.0/Microsoft.Extensions.Configuration.Binder.dll, + /store/arm64/net8.0/microsoft.extensions.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.dll, + /store/arm64/net8.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, + /store/arm64/net8.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.dll, + /store/arm64/net8.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Abstractions.dll, + /store/arm64/net8.0/microsoft.extensions.logging.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Configuration.dll, + /store/arm64/net8.0/microsoft.extensions.logging/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.dll, + /store/arm64/net8.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net9.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, + /store/arm64/net8.0/microsoft.extensions.options/8.0.0/lib/net9.0/Microsoft.Extensions.Options.dll, + /store/arm64/net8.0/microsoft.extensions.primitives/8.0.0/lib/net9.0/Microsoft.Extensions.Primitives.dll, + /store/arm64/net9.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.Abstractions.dll, + /store/arm64/net9.0/microsoft.extensions.configuration.binder/8.0.1/lib/net9.0/Microsoft.Extensions.Configuration.Binder.dll, + /store/arm64/net9.0/microsoft.extensions.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.dll, + /store/arm64/net9.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, + /store/arm64/net9.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.dll, + /store/arm64/net9.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Abstractions.dll, + /store/arm64/net9.0/microsoft.extensions.logging.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Configuration.dll, + /store/arm64/net9.0/microsoft.extensions.logging/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.dll, + /store/arm64/net9.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net9.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, + /store/arm64/net9.0/microsoft.extensions.options/8.0.0/lib/net9.0/Microsoft.Extensions.Options.dll, + /store/arm64/net9.0/microsoft.extensions.primitives/8.0.0/lib/net9.0/Microsoft.Extensions.Primitives.dll ] \ No newline at end of file diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-x64.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-x64.verified.txt index 4212432db4..aa8c6520a5 100644 --- a/test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-x64.verified.txt +++ b/test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-x64.verified.txt @@ -1,7 +1,6 @@ [ - /AdditionalDeps/shared/Microsoft.NETCore.App/6.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, - /AdditionalDeps/shared/Microsoft.NETCore.App/7.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, /AdditionalDeps/shared/Microsoft.NETCore.App/8.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, + /AdditionalDeps/shared/Microsoft.NETCore.App/9.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, /LICENSE, /instrument.sh, /linux-musl-x64/OpenTelemetry.AutoInstrumentation.Native.so, @@ -9,7 +8,6 @@ /net/Grpc.Core.Api.dll, /net/Grpc.Net.Client.dll, /net/Grpc.Net.Common.dll, - /net/Microsoft.Extensions.Diagnostics.Abstractions.dll, /net/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, /net/OpenTelemetry.Api.ProviderBuilderExtensions.dll, /net/OpenTelemetry.Api.dll, @@ -50,39 +48,26 @@ /net/System.ServiceModel.Primitives.dll, /net/System.ServiceModel.dll, /net/ruleEngine.json, - /store/x64/net6.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll, - /store/x64/net6.0/microsoft.extensions.configuration.binder/8.0.1/lib/net8.0/Microsoft.Extensions.Configuration.Binder.dll, - /store/x64/net6.0/microsoft.extensions.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.dll, - /store/x64/net6.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, - /store/x64/net6.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.dll, - /store/x64/net6.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll, - /store/x64/net6.0/microsoft.extensions.logging.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Configuration.dll, - /store/x64/net6.0/microsoft.extensions.logging/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.dll, - /store/x64/net6.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net8.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, - /store/x64/net6.0/microsoft.extensions.options/8.0.0/lib/net8.0/Microsoft.Extensions.Options.dll, - /store/x64/net6.0/microsoft.extensions.primitives/8.0.0/lib/net8.0/Microsoft.Extensions.Primitives.dll, - /store/x64/net6.0/system.diagnostics.diagnosticsource/8.0.0/lib/net8.0/System.Diagnostics.DiagnosticSource.dll, - /store/x64/net7.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll, - /store/x64/net7.0/microsoft.extensions.configuration.binder/8.0.1/lib/net8.0/Microsoft.Extensions.Configuration.Binder.dll, - /store/x64/net7.0/microsoft.extensions.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.dll, - /store/x64/net7.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, - /store/x64/net7.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.dll, - /store/x64/net7.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll, - /store/x64/net7.0/microsoft.extensions.logging.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Configuration.dll, - /store/x64/net7.0/microsoft.extensions.logging/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.dll, - /store/x64/net7.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net8.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, - /store/x64/net7.0/microsoft.extensions.options/8.0.0/lib/net8.0/Microsoft.Extensions.Options.dll, - /store/x64/net7.0/microsoft.extensions.primitives/8.0.0/lib/net8.0/Microsoft.Extensions.Primitives.dll, - /store/x64/net7.0/system.diagnostics.diagnosticsource/8.0.0/lib/net8.0/System.Diagnostics.DiagnosticSource.dll, - /store/x64/net8.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll, - /store/x64/net8.0/microsoft.extensions.configuration.binder/8.0.1/lib/net8.0/Microsoft.Extensions.Configuration.Binder.dll, - /store/x64/net8.0/microsoft.extensions.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.dll, - /store/x64/net8.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, - /store/x64/net8.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.dll, - /store/x64/net8.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll, - /store/x64/net8.0/microsoft.extensions.logging.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Configuration.dll, - /store/x64/net8.0/microsoft.extensions.logging/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.dll, - /store/x64/net8.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net8.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, - /store/x64/net8.0/microsoft.extensions.options/8.0.0/lib/net8.0/Microsoft.Extensions.Options.dll, - /store/x64/net8.0/microsoft.extensions.primitives/8.0.0/lib/net8.0/Microsoft.Extensions.Primitives.dll + /store/x64/net8.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.Abstractions.dll, + /store/x64/net8.0/microsoft.extensions.configuration.binder/8.0.1/lib/net9.0/Microsoft.Extensions.Configuration.Binder.dll, + /store/x64/net8.0/microsoft.extensions.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.dll, + /store/x64/net8.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, + /store/x64/net8.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.dll, + /store/x64/net8.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Abstractions.dll, + /store/x64/net8.0/microsoft.extensions.logging.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Configuration.dll, + /store/x64/net8.0/microsoft.extensions.logging/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.dll, + /store/x64/net8.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net9.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, + /store/x64/net8.0/microsoft.extensions.options/8.0.0/lib/net9.0/Microsoft.Extensions.Options.dll, + /store/x64/net8.0/microsoft.extensions.primitives/8.0.0/lib/net9.0/Microsoft.Extensions.Primitives.dll, + /store/x64/net9.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.Abstractions.dll, + /store/x64/net9.0/microsoft.extensions.configuration.binder/8.0.1/lib/net9.0/Microsoft.Extensions.Configuration.Binder.dll, + /store/x64/net9.0/microsoft.extensions.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.dll, + /store/x64/net9.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, + /store/x64/net9.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.dll, + /store/x64/net9.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Abstractions.dll, + /store/x64/net9.0/microsoft.extensions.logging.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Configuration.dll, + /store/x64/net9.0/microsoft.extensions.logging/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.dll, + /store/x64/net9.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net9.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, + /store/x64/net9.0/microsoft.extensions.options/8.0.0/lib/net9.0/Microsoft.Extensions.Options.dll, + /store/x64/net9.0/microsoft.extensions.primitives/8.0.0/lib/net9.0/Microsoft.Extensions.Primitives.dll ] \ No newline at end of file diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_linux-arm64.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_linux-arm64.verified.txt index 8e5a7b0d41..75246d03a0 100644 --- a/test/IntegrationTests/BuildTests.DistributionStructure_linux-arm64.verified.txt +++ b/test/IntegrationTests/BuildTests.DistributionStructure_linux-arm64.verified.txt @@ -1,7 +1,6 @@ [ - /AdditionalDeps/shared/Microsoft.NETCore.App/6.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, - /AdditionalDeps/shared/Microsoft.NETCore.App/7.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, /AdditionalDeps/shared/Microsoft.NETCore.App/8.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, + /AdditionalDeps/shared/Microsoft.NETCore.App/9.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, /LICENSE, /instrument.sh, /linux-arm64/OpenTelemetry.AutoInstrumentation.Native.so, @@ -9,7 +8,6 @@ /net/Grpc.Core.Api.dll, /net/Grpc.Net.Client.dll, /net/Grpc.Net.Common.dll, - /net/Microsoft.Extensions.Diagnostics.Abstractions.dll, /net/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, /net/OpenTelemetry.Api.ProviderBuilderExtensions.dll, /net/OpenTelemetry.Api.dll, @@ -50,39 +48,26 @@ /net/System.ServiceModel.Primitives.dll, /net/System.ServiceModel.dll, /net/ruleEngine.json, - /store/arm64/net6.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll, - /store/arm64/net6.0/microsoft.extensions.configuration.binder/8.0.1/lib/net8.0/Microsoft.Extensions.Configuration.Binder.dll, - /store/arm64/net6.0/microsoft.extensions.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.dll, - /store/arm64/net6.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, - /store/arm64/net6.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.dll, - /store/arm64/net6.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll, - /store/arm64/net6.0/microsoft.extensions.logging.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Configuration.dll, - /store/arm64/net6.0/microsoft.extensions.logging/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.dll, - /store/arm64/net6.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net8.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, - /store/arm64/net6.0/microsoft.extensions.options/8.0.0/lib/net8.0/Microsoft.Extensions.Options.dll, - /store/arm64/net6.0/microsoft.extensions.primitives/8.0.0/lib/net8.0/Microsoft.Extensions.Primitives.dll, - /store/arm64/net6.0/system.diagnostics.diagnosticsource/8.0.0/lib/net8.0/System.Diagnostics.DiagnosticSource.dll, - /store/arm64/net7.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll, - /store/arm64/net7.0/microsoft.extensions.configuration.binder/8.0.1/lib/net8.0/Microsoft.Extensions.Configuration.Binder.dll, - /store/arm64/net7.0/microsoft.extensions.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.dll, - /store/arm64/net7.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, - /store/arm64/net7.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.dll, - /store/arm64/net7.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll, - /store/arm64/net7.0/microsoft.extensions.logging.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Configuration.dll, - /store/arm64/net7.0/microsoft.extensions.logging/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.dll, - /store/arm64/net7.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net8.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, - /store/arm64/net7.0/microsoft.extensions.options/8.0.0/lib/net8.0/Microsoft.Extensions.Options.dll, - /store/arm64/net7.0/microsoft.extensions.primitives/8.0.0/lib/net8.0/Microsoft.Extensions.Primitives.dll, - /store/arm64/net7.0/system.diagnostics.diagnosticsource/8.0.0/lib/net8.0/System.Diagnostics.DiagnosticSource.dll, - /store/arm64/net8.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll, - /store/arm64/net8.0/microsoft.extensions.configuration.binder/8.0.1/lib/net8.0/Microsoft.Extensions.Configuration.Binder.dll, - /store/arm64/net8.0/microsoft.extensions.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.dll, - /store/arm64/net8.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, - /store/arm64/net8.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.dll, - /store/arm64/net8.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll, - /store/arm64/net8.0/microsoft.extensions.logging.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Configuration.dll, - /store/arm64/net8.0/microsoft.extensions.logging/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.dll, - /store/arm64/net8.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net8.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, - /store/arm64/net8.0/microsoft.extensions.options/8.0.0/lib/net8.0/Microsoft.Extensions.Options.dll, - /store/arm64/net8.0/microsoft.extensions.primitives/8.0.0/lib/net8.0/Microsoft.Extensions.Primitives.dll + /store/arm64/net8.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.Abstractions.dll, + /store/arm64/net8.0/microsoft.extensions.configuration.binder/8.0.1/lib/net9.0/Microsoft.Extensions.Configuration.Binder.dll, + /store/arm64/net8.0/microsoft.extensions.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.dll, + /store/arm64/net8.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, + /store/arm64/net8.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.dll, + /store/arm64/net8.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Abstractions.dll, + /store/arm64/net8.0/microsoft.extensions.logging.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Configuration.dll, + /store/arm64/net8.0/microsoft.extensions.logging/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.dll, + /store/arm64/net8.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net9.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, + /store/arm64/net8.0/microsoft.extensions.options/8.0.0/lib/net9.0/Microsoft.Extensions.Options.dll, + /store/arm64/net8.0/microsoft.extensions.primitives/8.0.0/lib/net9.0/Microsoft.Extensions.Primitives.dll, + /store/arm64/net9.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.Abstractions.dll, + /store/arm64/net9.0/microsoft.extensions.configuration.binder/8.0.1/lib/net9.0/Microsoft.Extensions.Configuration.Binder.dll, + /store/arm64/net9.0/microsoft.extensions.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.dll, + /store/arm64/net9.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, + /store/arm64/net9.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.dll, + /store/arm64/net9.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Abstractions.dll, + /store/arm64/net9.0/microsoft.extensions.logging.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Configuration.dll, + /store/arm64/net9.0/microsoft.extensions.logging/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.dll, + /store/arm64/net9.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net9.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, + /store/arm64/net9.0/microsoft.extensions.options/8.0.0/lib/net9.0/Microsoft.Extensions.Options.dll, + /store/arm64/net9.0/microsoft.extensions.primitives/8.0.0/lib/net9.0/Microsoft.Extensions.Primitives.dll ] \ No newline at end of file diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_linux-x64.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_linux-x64.verified.txt index 638a298847..88e3e9a2cc 100644 --- a/test/IntegrationTests/BuildTests.DistributionStructure_linux-x64.verified.txt +++ b/test/IntegrationTests/BuildTests.DistributionStructure_linux-x64.verified.txt @@ -1,7 +1,6 @@ [ - /AdditionalDeps/shared/Microsoft.NETCore.App/6.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, - /AdditionalDeps/shared/Microsoft.NETCore.App/7.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, /AdditionalDeps/shared/Microsoft.NETCore.App/8.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, + /AdditionalDeps/shared/Microsoft.NETCore.App/9.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, /LICENSE, /instrument.sh, /linux-x64/OpenTelemetry.AutoInstrumentation.Native.so, @@ -9,7 +8,6 @@ /net/Grpc.Core.Api.dll, /net/Grpc.Net.Client.dll, /net/Grpc.Net.Common.dll, - /net/Microsoft.Extensions.Diagnostics.Abstractions.dll, /net/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, /net/OpenTelemetry.Api.ProviderBuilderExtensions.dll, /net/OpenTelemetry.Api.dll, @@ -50,39 +48,26 @@ /net/System.ServiceModel.Primitives.dll, /net/System.ServiceModel.dll, /net/ruleEngine.json, - /store/x64/net6.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll, - /store/x64/net6.0/microsoft.extensions.configuration.binder/8.0.1/lib/net8.0/Microsoft.Extensions.Configuration.Binder.dll, - /store/x64/net6.0/microsoft.extensions.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.dll, - /store/x64/net6.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, - /store/x64/net6.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.dll, - /store/x64/net6.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll, - /store/x64/net6.0/microsoft.extensions.logging.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Configuration.dll, - /store/x64/net6.0/microsoft.extensions.logging/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.dll, - /store/x64/net6.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net8.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, - /store/x64/net6.0/microsoft.extensions.options/8.0.0/lib/net8.0/Microsoft.Extensions.Options.dll, - /store/x64/net6.0/microsoft.extensions.primitives/8.0.0/lib/net8.0/Microsoft.Extensions.Primitives.dll, - /store/x64/net6.0/system.diagnostics.diagnosticsource/8.0.0/lib/net8.0/System.Diagnostics.DiagnosticSource.dll, - /store/x64/net7.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll, - /store/x64/net7.0/microsoft.extensions.configuration.binder/8.0.1/lib/net8.0/Microsoft.Extensions.Configuration.Binder.dll, - /store/x64/net7.0/microsoft.extensions.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.dll, - /store/x64/net7.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, - /store/x64/net7.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.dll, - /store/x64/net7.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll, - /store/x64/net7.0/microsoft.extensions.logging.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Configuration.dll, - /store/x64/net7.0/microsoft.extensions.logging/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.dll, - /store/x64/net7.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net8.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, - /store/x64/net7.0/microsoft.extensions.options/8.0.0/lib/net8.0/Microsoft.Extensions.Options.dll, - /store/x64/net7.0/microsoft.extensions.primitives/8.0.0/lib/net8.0/Microsoft.Extensions.Primitives.dll, - /store/x64/net7.0/system.diagnostics.diagnosticsource/8.0.0/lib/net8.0/System.Diagnostics.DiagnosticSource.dll, - /store/x64/net8.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll, - /store/x64/net8.0/microsoft.extensions.configuration.binder/8.0.1/lib/net8.0/Microsoft.Extensions.Configuration.Binder.dll, - /store/x64/net8.0/microsoft.extensions.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.dll, - /store/x64/net8.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, - /store/x64/net8.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.dll, - /store/x64/net8.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll, - /store/x64/net8.0/microsoft.extensions.logging.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Configuration.dll, - /store/x64/net8.0/microsoft.extensions.logging/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.dll, - /store/x64/net8.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net8.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, - /store/x64/net8.0/microsoft.extensions.options/8.0.0/lib/net8.0/Microsoft.Extensions.Options.dll, - /store/x64/net8.0/microsoft.extensions.primitives/8.0.0/lib/net8.0/Microsoft.Extensions.Primitives.dll + /store/x64/net8.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.Abstractions.dll, + /store/x64/net8.0/microsoft.extensions.configuration.binder/8.0.1/lib/net9.0/Microsoft.Extensions.Configuration.Binder.dll, + /store/x64/net8.0/microsoft.extensions.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.dll, + /store/x64/net8.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, + /store/x64/net8.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.dll, + /store/x64/net8.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Abstractions.dll, + /store/x64/net8.0/microsoft.extensions.logging.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Configuration.dll, + /store/x64/net8.0/microsoft.extensions.logging/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.dll, + /store/x64/net8.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net9.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, + /store/x64/net8.0/microsoft.extensions.options/8.0.0/lib/net9.0/Microsoft.Extensions.Options.dll, + /store/x64/net8.0/microsoft.extensions.primitives/8.0.0/lib/net9.0/Microsoft.Extensions.Primitives.dll, + /store/x64/net9.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.Abstractions.dll, + /store/x64/net9.0/microsoft.extensions.configuration.binder/8.0.1/lib/net9.0/Microsoft.Extensions.Configuration.Binder.dll, + /store/x64/net9.0/microsoft.extensions.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.dll, + /store/x64/net9.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, + /store/x64/net9.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.dll, + /store/x64/net9.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Abstractions.dll, + /store/x64/net9.0/microsoft.extensions.logging.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Configuration.dll, + /store/x64/net9.0/microsoft.extensions.logging/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.dll, + /store/x64/net9.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net9.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, + /store/x64/net9.0/microsoft.extensions.options/8.0.0/lib/net9.0/Microsoft.Extensions.Options.dll, + /store/x64/net9.0/microsoft.extensions.primitives/8.0.0/lib/net9.0/Microsoft.Extensions.Primitives.dll ] \ No newline at end of file diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt index 867c4ccb72..1d894acccb 100644 --- a/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt +++ b/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt @@ -1,14 +1,12 @@ [ - /AdditionalDeps/shared/Microsoft.NETCore.App/6.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, - /AdditionalDeps/shared/Microsoft.NETCore.App/7.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, /AdditionalDeps/shared/Microsoft.NETCore.App/8.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, + /AdditionalDeps/shared/Microsoft.NETCore.App/9.0.0/OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, /LICENSE, /instrument.sh, /net/Google.Protobuf.dll, /net/Grpc.Core.Api.dll, /net/Grpc.Net.Client.dll, /net/Grpc.Net.Common.dll, - /net/Microsoft.Extensions.Diagnostics.Abstractions.dll, /net/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, /net/OpenTelemetry.Api.ProviderBuilderExtensions.dll, /net/OpenTelemetry.Api.dll, @@ -50,39 +48,26 @@ /net/System.ServiceModel.dll, /net/ruleEngine.json, /osx-x64/OpenTelemetry.AutoInstrumentation.Native.dylib, - /store/x64/net6.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll, - /store/x64/net6.0/microsoft.extensions.configuration.binder/8.0.1/lib/net8.0/Microsoft.Extensions.Configuration.Binder.dll, - /store/x64/net6.0/microsoft.extensions.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.dll, - /store/x64/net6.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, - /store/x64/net6.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.dll, - /store/x64/net6.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll, - /store/x64/net6.0/microsoft.extensions.logging.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Configuration.dll, - /store/x64/net6.0/microsoft.extensions.logging/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.dll, - /store/x64/net6.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net8.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, - /store/x64/net6.0/microsoft.extensions.options/8.0.0/lib/net8.0/Microsoft.Extensions.Options.dll, - /store/x64/net6.0/microsoft.extensions.primitives/8.0.0/lib/net8.0/Microsoft.Extensions.Primitives.dll, - /store/x64/net6.0/system.diagnostics.diagnosticsource/8.0.0/lib/net8.0/System.Diagnostics.DiagnosticSource.dll, - /store/x64/net7.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll, - /store/x64/net7.0/microsoft.extensions.configuration.binder/8.0.1/lib/net8.0/Microsoft.Extensions.Configuration.Binder.dll, - /store/x64/net7.0/microsoft.extensions.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.dll, - /store/x64/net7.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, - /store/x64/net7.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.dll, - /store/x64/net7.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll, - /store/x64/net7.0/microsoft.extensions.logging.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Configuration.dll, - /store/x64/net7.0/microsoft.extensions.logging/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.dll, - /store/x64/net7.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net8.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, - /store/x64/net7.0/microsoft.extensions.options/8.0.0/lib/net8.0/Microsoft.Extensions.Options.dll, - /store/x64/net7.0/microsoft.extensions.primitives/8.0.0/lib/net8.0/Microsoft.Extensions.Primitives.dll, - /store/x64/net7.0/system.diagnostics.diagnosticsource/8.0.0/lib/net8.0/System.Diagnostics.DiagnosticSource.dll, - /store/x64/net8.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll, - /store/x64/net8.0/microsoft.extensions.configuration.binder/8.0.1/lib/net8.0/Microsoft.Extensions.Configuration.Binder.dll, - /store/x64/net8.0/microsoft.extensions.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Configuration.dll, - /store/x64/net8.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, - /store/x64/net8.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net8.0/Microsoft.Extensions.DependencyInjection.dll, - /store/x64/net8.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll, - /store/x64/net8.0/microsoft.extensions.logging.configuration/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.Configuration.dll, - /store/x64/net8.0/microsoft.extensions.logging/8.0.0/lib/net8.0/Microsoft.Extensions.Logging.dll, - /store/x64/net8.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net8.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, - /store/x64/net8.0/microsoft.extensions.options/8.0.0/lib/net8.0/Microsoft.Extensions.Options.dll, - /store/x64/net8.0/microsoft.extensions.primitives/8.0.0/lib/net8.0/Microsoft.Extensions.Primitives.dll + /store/x64/net8.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.Abstractions.dll, + /store/x64/net8.0/microsoft.extensions.configuration.binder/8.0.1/lib/net9.0/Microsoft.Extensions.Configuration.Binder.dll, + /store/x64/net8.0/microsoft.extensions.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.dll, + /store/x64/net8.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, + /store/x64/net8.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.dll, + /store/x64/net8.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Abstractions.dll, + /store/x64/net8.0/microsoft.extensions.logging.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Configuration.dll, + /store/x64/net8.0/microsoft.extensions.logging/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.dll, + /store/x64/net8.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net9.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, + /store/x64/net8.0/microsoft.extensions.options/8.0.0/lib/net9.0/Microsoft.Extensions.Options.dll, + /store/x64/net8.0/microsoft.extensions.primitives/8.0.0/lib/net9.0/Microsoft.Extensions.Primitives.dll, + /store/x64/net9.0/microsoft.extensions.configuration.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.Abstractions.dll, + /store/x64/net9.0/microsoft.extensions.configuration.binder/8.0.1/lib/net9.0/Microsoft.Extensions.Configuration.Binder.dll, + /store/x64/net9.0/microsoft.extensions.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Configuration.dll, + /store/x64/net9.0/microsoft.extensions.dependencyinjection.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll, + /store/x64/net9.0/microsoft.extensions.dependencyinjection/8.0.0/lib/net9.0/Microsoft.Extensions.DependencyInjection.dll, + /store/x64/net9.0/microsoft.extensions.logging.abstractions/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Abstractions.dll, + /store/x64/net9.0/microsoft.extensions.logging.configuration/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.Configuration.dll, + /store/x64/net9.0/microsoft.extensions.logging/8.0.0/lib/net9.0/Microsoft.Extensions.Logging.dll, + /store/x64/net9.0/microsoft.extensions.options.configurationextensions/8.0.0/lib/net9.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll, + /store/x64/net9.0/microsoft.extensions.options/8.0.0/lib/net9.0/Microsoft.Extensions.Options.dll, + /store/x64/net9.0/microsoft.extensions.primitives/8.0.0/lib/net9.0/Microsoft.Extensions.Primitives.dll ] \ No newline at end of file diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt index fe2b2c7a6b..71d015ab47 100644 --- a/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt +++ b/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt @@ -1,14 +1,12 @@ [ - \AdditionalDeps\shared\Microsoft.NETCore.App\6.0.0\OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, - \AdditionalDeps\shared\Microsoft.NETCore.App\7.0.0\OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, \AdditionalDeps\shared\Microsoft.NETCore.App\8.0.0\OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, + \AdditionalDeps\shared\Microsoft.NETCore.App\9.0.0\OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json, \LICENSE, \instrument.sh, \net\Google.Protobuf.dll, \net\Grpc.Core.Api.dll, \net\Grpc.Net.Client.dll, \net\Grpc.Net.Common.dll, - \net\Microsoft.Extensions.Diagnostics.Abstractions.dll, \net\MongoDB.Driver.Core.Extensions.DiagnosticSources.dll, \net\OpenTelemetry.Api.ProviderBuilderExtensions.dll, \net\OpenTelemetry.Api.dll, @@ -200,76 +198,50 @@ \netfx\libgrpc_csharp_ext.x64.dylib, \netfx\libgrpc_csharp_ext.x64.so, \netfx\netstandard.dll, - \store\x64\net6.0\microsoft.extensions.configuration.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.Abstractions.dll, - \store\x64\net6.0\microsoft.extensions.configuration.binder\8.0.1\lib\net8.0\Microsoft.Extensions.Configuration.Binder.dll, - \store\x64\net6.0\microsoft.extensions.configuration\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.dll, - \store\x64\net6.0\microsoft.extensions.dependencyinjection.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll, - \store\x64\net6.0\microsoft.extensions.dependencyinjection\8.0.0\lib\net8.0\Microsoft.Extensions.DependencyInjection.dll, - \store\x64\net6.0\microsoft.extensions.logging.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Abstractions.dll, - \store\x64\net6.0\microsoft.extensions.logging.configuration\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Configuration.dll, - \store\x64\net6.0\microsoft.extensions.logging\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.dll, - \store\x64\net6.0\microsoft.extensions.options.configurationextensions\8.0.0\lib\net8.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll, - \store\x64\net6.0\microsoft.extensions.options\8.0.0\lib\net8.0\Microsoft.Extensions.Options.dll, - \store\x64\net6.0\microsoft.extensions.primitives\8.0.0\lib\net8.0\Microsoft.Extensions.Primitives.dll, - \store\x64\net6.0\system.diagnostics.diagnosticsource\8.0.0\lib\net8.0\System.Diagnostics.DiagnosticSource.dll, - \store\x64\net7.0\microsoft.extensions.configuration.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.Abstractions.dll, - \store\x64\net7.0\microsoft.extensions.configuration.binder\8.0.1\lib\net8.0\Microsoft.Extensions.Configuration.Binder.dll, - \store\x64\net7.0\microsoft.extensions.configuration\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.dll, - \store\x64\net7.0\microsoft.extensions.dependencyinjection.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll, - \store\x64\net7.0\microsoft.extensions.dependencyinjection\8.0.0\lib\net8.0\Microsoft.Extensions.DependencyInjection.dll, - \store\x64\net7.0\microsoft.extensions.logging.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Abstractions.dll, - \store\x64\net7.0\microsoft.extensions.logging.configuration\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Configuration.dll, - \store\x64\net7.0\microsoft.extensions.logging\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.dll, - \store\x64\net7.0\microsoft.extensions.options.configurationextensions\8.0.0\lib\net8.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll, - \store\x64\net7.0\microsoft.extensions.options\8.0.0\lib\net8.0\Microsoft.Extensions.Options.dll, - \store\x64\net7.0\microsoft.extensions.primitives\8.0.0\lib\net8.0\Microsoft.Extensions.Primitives.dll, - \store\x64\net7.0\system.diagnostics.diagnosticsource\8.0.0\lib\net8.0\System.Diagnostics.DiagnosticSource.dll, - \store\x64\net8.0\microsoft.extensions.configuration.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.Abstractions.dll, - \store\x64\net8.0\microsoft.extensions.configuration.binder\8.0.1\lib\net8.0\Microsoft.Extensions.Configuration.Binder.dll, - \store\x64\net8.0\microsoft.extensions.configuration\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.dll, - \store\x64\net8.0\microsoft.extensions.dependencyinjection.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll, - \store\x64\net8.0\microsoft.extensions.dependencyinjection\8.0.0\lib\net8.0\Microsoft.Extensions.DependencyInjection.dll, - \store\x64\net8.0\microsoft.extensions.logging.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Abstractions.dll, - \store\x64\net8.0\microsoft.extensions.logging.configuration\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Configuration.dll, - \store\x64\net8.0\microsoft.extensions.logging\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.dll, - \store\x64\net8.0\microsoft.extensions.options.configurationextensions\8.0.0\lib\net8.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll, - \store\x64\net8.0\microsoft.extensions.options\8.0.0\lib\net8.0\Microsoft.Extensions.Options.dll, - \store\x64\net8.0\microsoft.extensions.primitives\8.0.0\lib\net8.0\Microsoft.Extensions.Primitives.dll, - \store\x86\net6.0\microsoft.extensions.configuration.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.Abstractions.dll, - \store\x86\net6.0\microsoft.extensions.configuration.binder\8.0.1\lib\net8.0\Microsoft.Extensions.Configuration.Binder.dll, - \store\x86\net6.0\microsoft.extensions.configuration\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.dll, - \store\x86\net6.0\microsoft.extensions.dependencyinjection.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll, - \store\x86\net6.0\microsoft.extensions.dependencyinjection\8.0.0\lib\net8.0\Microsoft.Extensions.DependencyInjection.dll, - \store\x86\net6.0\microsoft.extensions.logging.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Abstractions.dll, - \store\x86\net6.0\microsoft.extensions.logging.configuration\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Configuration.dll, - \store\x86\net6.0\microsoft.extensions.logging\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.dll, - \store\x86\net6.0\microsoft.extensions.options.configurationextensions\8.0.0\lib\net8.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll, - \store\x86\net6.0\microsoft.extensions.options\8.0.0\lib\net8.0\Microsoft.Extensions.Options.dll, - \store\x86\net6.0\microsoft.extensions.primitives\8.0.0\lib\net8.0\Microsoft.Extensions.Primitives.dll, - \store\x86\net6.0\system.diagnostics.diagnosticsource\8.0.0\lib\net8.0\System.Diagnostics.DiagnosticSource.dll, - \store\x86\net7.0\microsoft.extensions.configuration.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.Abstractions.dll, - \store\x86\net7.0\microsoft.extensions.configuration.binder\8.0.1\lib\net8.0\Microsoft.Extensions.Configuration.Binder.dll, - \store\x86\net7.0\microsoft.extensions.configuration\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.dll, - \store\x86\net7.0\microsoft.extensions.dependencyinjection.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll, - \store\x86\net7.0\microsoft.extensions.dependencyinjection\8.0.0\lib\net8.0\Microsoft.Extensions.DependencyInjection.dll, - \store\x86\net7.0\microsoft.extensions.logging.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Abstractions.dll, - \store\x86\net7.0\microsoft.extensions.logging.configuration\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Configuration.dll, - \store\x86\net7.0\microsoft.extensions.logging\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.dll, - \store\x86\net7.0\microsoft.extensions.options.configurationextensions\8.0.0\lib\net8.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll, - \store\x86\net7.0\microsoft.extensions.options\8.0.0\lib\net8.0\Microsoft.Extensions.Options.dll, - \store\x86\net7.0\microsoft.extensions.primitives\8.0.0\lib\net8.0\Microsoft.Extensions.Primitives.dll, - \store\x86\net7.0\system.diagnostics.diagnosticsource\8.0.0\lib\net8.0\System.Diagnostics.DiagnosticSource.dll, - \store\x86\net8.0\microsoft.extensions.configuration.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.Abstractions.dll, - \store\x86\net8.0\microsoft.extensions.configuration.binder\8.0.1\lib\net8.0\Microsoft.Extensions.Configuration.Binder.dll, - \store\x86\net8.0\microsoft.extensions.configuration\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.dll, - \store\x86\net8.0\microsoft.extensions.dependencyinjection.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll, - \store\x86\net8.0\microsoft.extensions.dependencyinjection\8.0.0\lib\net8.0\Microsoft.Extensions.DependencyInjection.dll, - \store\x86\net8.0\microsoft.extensions.logging.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Abstractions.dll, - \store\x86\net8.0\microsoft.extensions.logging.configuration\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Configuration.dll, - \store\x86\net8.0\microsoft.extensions.logging\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.dll, - \store\x86\net8.0\microsoft.extensions.options.configurationextensions\8.0.0\lib\net8.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll, - \store\x86\net8.0\microsoft.extensions.options\8.0.0\lib\net8.0\Microsoft.Extensions.Options.dll, - \store\x86\net8.0\microsoft.extensions.primitives\8.0.0\lib\net8.0\Microsoft.Extensions.Primitives.dll, + \store\x64\net8.0\microsoft.extensions.configuration.abstractions\8.0.0\lib\net9.0\Microsoft.Extensions.Configuration.Abstractions.dll, + \store\x64\net8.0\microsoft.extensions.configuration.binder\8.0.1\lib\net9.0\Microsoft.Extensions.Configuration.Binder.dll, + \store\x64\net8.0\microsoft.extensions.configuration\8.0.0\lib\net9.0\Microsoft.Extensions.Configuration.dll, + \store\x64\net8.0\microsoft.extensions.dependencyinjection.abstractions\8.0.0\lib\net9.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll, + \store\x64\net8.0\microsoft.extensions.dependencyinjection\8.0.0\lib\net9.0\Microsoft.Extensions.DependencyInjection.dll, + \store\x64\net8.0\microsoft.extensions.logging.abstractions\8.0.0\lib\net9.0\Microsoft.Extensions.Logging.Abstractions.dll, + \store\x64\net8.0\microsoft.extensions.logging.configuration\8.0.0\lib\net9.0\Microsoft.Extensions.Logging.Configuration.dll, + \store\x64\net8.0\microsoft.extensions.logging\8.0.0\lib\net9.0\Microsoft.Extensions.Logging.dll, + \store\x64\net8.0\microsoft.extensions.options.configurationextensions\8.0.0\lib\net9.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll, + \store\x64\net8.0\microsoft.extensions.options\8.0.0\lib\net9.0\Microsoft.Extensions.Options.dll, + \store\x64\net8.0\microsoft.extensions.primitives\8.0.0\lib\net9.0\Microsoft.Extensions.Primitives.dll, + \store\x64\net9.0\microsoft.extensions.configuration.abstractions\8.0.0\lib\net9.0\Microsoft.Extensions.Configuration.Abstractions.dll, + \store\x64\net9.0\microsoft.extensions.configuration.binder\8.0.1\lib\net9.0\Microsoft.Extensions.Configuration.Binder.dll, + \store\x64\net9.0\microsoft.extensions.configuration\8.0.0\lib\net9.0\Microsoft.Extensions.Configuration.dll, + \store\x64\net9.0\microsoft.extensions.dependencyinjection.abstractions\8.0.0\lib\net9.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll, + \store\x64\net9.0\microsoft.extensions.dependencyinjection\8.0.0\lib\net9.0\Microsoft.Extensions.DependencyInjection.dll, + \store\x64\net9.0\microsoft.extensions.logging.abstractions\8.0.0\lib\net9.0\Microsoft.Extensions.Logging.Abstractions.dll, + \store\x64\net9.0\microsoft.extensions.logging.configuration\8.0.0\lib\net9.0\Microsoft.Extensions.Logging.Configuration.dll, + \store\x64\net9.0\microsoft.extensions.logging\8.0.0\lib\net9.0\Microsoft.Extensions.Logging.dll, + \store\x64\net9.0\microsoft.extensions.options.configurationextensions\8.0.0\lib\net9.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll, + \store\x64\net9.0\microsoft.extensions.options\8.0.0\lib\net9.0\Microsoft.Extensions.Options.dll, + \store\x64\net9.0\microsoft.extensions.primitives\8.0.0\lib\net9.0\Microsoft.Extensions.Primitives.dll, + \store\x86\net8.0\microsoft.extensions.configuration.abstractions\8.0.0\lib\net9.0\Microsoft.Extensions.Configuration.Abstractions.dll, + \store\x86\net8.0\microsoft.extensions.configuration.binder\8.0.1\lib\net9.0\Microsoft.Extensions.Configuration.Binder.dll, + \store\x86\net8.0\microsoft.extensions.configuration\8.0.0\lib\net9.0\Microsoft.Extensions.Configuration.dll, + \store\x86\net8.0\microsoft.extensions.dependencyinjection.abstractions\8.0.0\lib\net9.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll, + \store\x86\net8.0\microsoft.extensions.dependencyinjection\8.0.0\lib\net9.0\Microsoft.Extensions.DependencyInjection.dll, + \store\x86\net8.0\microsoft.extensions.logging.abstractions\8.0.0\lib\net9.0\Microsoft.Extensions.Logging.Abstractions.dll, + \store\x86\net8.0\microsoft.extensions.logging.configuration\8.0.0\lib\net9.0\Microsoft.Extensions.Logging.Configuration.dll, + \store\x86\net8.0\microsoft.extensions.logging\8.0.0\lib\net9.0\Microsoft.Extensions.Logging.dll, + \store\x86\net8.0\microsoft.extensions.options.configurationextensions\8.0.0\lib\net9.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll, + \store\x86\net8.0\microsoft.extensions.options\8.0.0\lib\net9.0\Microsoft.Extensions.Options.dll, + \store\x86\net8.0\microsoft.extensions.primitives\8.0.0\lib\net9.0\Microsoft.Extensions.Primitives.dll, + \store\x86\net9.0\microsoft.extensions.configuration.abstractions\8.0.0\lib\net9.0\Microsoft.Extensions.Configuration.Abstractions.dll, + \store\x86\net9.0\microsoft.extensions.configuration.binder\8.0.1\lib\net9.0\Microsoft.Extensions.Configuration.Binder.dll, + \store\x86\net9.0\microsoft.extensions.configuration\8.0.0\lib\net9.0\Microsoft.Extensions.Configuration.dll, + \store\x86\net9.0\microsoft.extensions.dependencyinjection.abstractions\8.0.0\lib\net9.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll, + \store\x86\net9.0\microsoft.extensions.dependencyinjection\8.0.0\lib\net9.0\Microsoft.Extensions.DependencyInjection.dll, + \store\x86\net9.0\microsoft.extensions.logging.abstractions\8.0.0\lib\net9.0\Microsoft.Extensions.Logging.Abstractions.dll, + \store\x86\net9.0\microsoft.extensions.logging.configuration\8.0.0\lib\net9.0\Microsoft.Extensions.Logging.Configuration.dll, + \store\x86\net9.0\microsoft.extensions.logging\8.0.0\lib\net9.0\Microsoft.Extensions.Logging.dll, + \store\x86\net9.0\microsoft.extensions.options.configurationextensions\8.0.0\lib\net9.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll, + \store\x86\net9.0\microsoft.extensions.options\8.0.0\lib\net9.0\Microsoft.Extensions.Options.dll, + \store\x86\net9.0\microsoft.extensions.primitives\8.0.0\lib\net9.0\Microsoft.Extensions.Primitives.dll, \win-x64\OpenTelemetry.AutoInstrumentation.Native.dll, \win-x86\OpenTelemetry.AutoInstrumentation.Native.dll ] \ No newline at end of file From 737a3c3d8e0caab2d7e6db5d9f45494de9388087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 11:45:33 +0100 Subject: [PATCH 14/29] Update examples documentation --- examples/playground/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/playground/README.md b/examples/playground/README.md index 97ffdc38c5..774ad4606b 100644 --- a/examples/playground/README.md +++ b/examples/playground/README.md @@ -22,9 +22,9 @@ and run the playground application with auto instrumentation. ./examples/playground/run.sh ``` -| Env var | Description | Default | -|-----------------|--------------------------------------------------------------|----------| -| `CONFIGURATION` | Build configuration. Possible values: `Debug`, `Release`. | `Debug` | -| `DOTNET` | .NET version. Possible values: `net8.0`, `net7.0`, `net6.0`. | `net8.0` | +| Env var | Description | Default | +|-----------------|-----------------------------------------------------------|----------| +| `CONFIGURATION` | Build configuration. Possible values: `Debug`, `Release`. | `Debug` | +| `DOTNET` | .NET version. Possible values: `net9.0`, `net8.0`. | `net8.0` | The application should be hosted on . From dfea6fef6f6254492a2d7d7d4e065b0b8d10aabe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 11:53:05 +0100 Subject: [PATCH 15/29] Cleanup net6 references in project files --- .../TestApplication.Azure/TestApplication.Azure.csproj | 2 -- .../TestApplication.GrpcNetClient.csproj | 9 --------- .../TestApplication.SqlClient.Microsoft.csproj | 1 - 3 files changed, 12 deletions(-) diff --git a/test/test-applications/integrations/TestApplication.Azure/TestApplication.Azure.csproj b/test/test-applications/integrations/TestApplication.Azure/TestApplication.Azure.csproj index 0883abc664..b897f16155 100644 --- a/test/test-applications/integrations/TestApplication.Azure/TestApplication.Azure.csproj +++ b/test/test-applications/integrations/TestApplication.Azure/TestApplication.Azure.csproj @@ -2,7 +2,5 @@ - - diff --git a/test/test-applications/integrations/TestApplication.GrpcNetClient/TestApplication.GrpcNetClient.csproj b/test/test-applications/integrations/TestApplication.GrpcNetClient/TestApplication.GrpcNetClient.csproj index f57c46fd99..ab8ce561fd 100644 --- a/test/test-applications/integrations/TestApplication.GrpcNetClient/TestApplication.GrpcNetClient.csproj +++ b/test/test-applications/integrations/TestApplication.GrpcNetClient/TestApplication.GrpcNetClient.csproj @@ -1,13 +1,4 @@  - - - Exe - - CS8981;$(NoWarn) - - - - diff --git a/test/test-applications/integrations/TestApplication.SqlClient.Microsoft/TestApplication.SqlClient.Microsoft.csproj b/test/test-applications/integrations/TestApplication.SqlClient.Microsoft/TestApplication.SqlClient.Microsoft.csproj index 61a78d1b02..063f519d3d 100644 --- a/test/test-applications/integrations/TestApplication.SqlClient.Microsoft/TestApplication.SqlClient.Microsoft.csproj +++ b/test/test-applications/integrations/TestApplication.SqlClient.Microsoft/TestApplication.SqlClient.Microsoft.csproj @@ -6,7 +6,6 @@ - From 3691f324c7c9e44ed8cdbe454ca681288631acae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 11:53:32 +0100 Subject: [PATCH 16/29] Fix tests --- test/NuGetPackagesTests/InstrumentationTargetTests.cs | 4 ++-- .../LoaderTests.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/NuGetPackagesTests/InstrumentationTargetTests.cs b/test/NuGetPackagesTests/InstrumentationTargetTests.cs index 9f7b31766b..7b49cfa36d 100644 --- a/test/NuGetPackagesTests/InstrumentationTargetTests.cs +++ b/test/NuGetPackagesTests/InstrumentationTargetTests.cs @@ -148,7 +148,7 @@ private void CreateTestApp(string tfm) // Always create the app targeting a fixed framework version to simplify // text replacement in the project file. - RunDotNetCli($"new console --framework net6.0").Should().Be(0); + RunDotNetCli($"new console --framework net8.0").Should().Be(0); ChangeProjectDefaultsAndTargetFramework(tfm); @@ -191,7 +191,7 @@ private void ChangeProjectDefaultsAndTargetFramework(string tfm) { var projectFile = $"{TargetAppName}.csproj"; var projectText = File.ReadAllText(projectFile); - projectText = projectText.Replace("net6.0", $"{tfm}"); + projectText = projectText.Replace("net8.0", $"{tfm}"); projectText = projectText.Replace("enable", $"disable"); projectText = projectText.Replace("enable", $"disable"); File.WriteAllText(projectFile, projectText); diff --git a/test/OpenTelemetry.AutoInstrumentation.Loader.Tests/LoaderTests.cs b/test/OpenTelemetry.AutoInstrumentation.Loader.Tests/LoaderTests.cs index 08806d2622..25eb3ef7c1 100644 --- a/test/OpenTelemetry.AutoInstrumentation.Loader.Tests/LoaderTests.cs +++ b/test/OpenTelemetry.AutoInstrumentation.Loader.Tests/LoaderTests.cs @@ -26,7 +26,7 @@ public void Ctor_LoadsManagedAssembly() var srcDir = Path.Combine(profilerDirectory, "net462"); var dstDir = Path.Combine(profilerDirectory, "netfx"); #else - var srcDir = Path.Combine(profilerDirectory, "net6.0"); + var srcDir = Path.Combine(profilerDirectory, "net8.0"); var dstDir = Path.Combine(profilerDirectory, "net"); #endif From ef15410991add30ef61d4fc0c07dcfc377b53e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 12:29:29 +0100 Subject: [PATCH 17/29] Cleanup target frameworks for generated tests targets --- build/LibraryVersions.g.cs | 12 ++++----- test/IntegrationTests/LibraryVersions.g.cs | 12 +++------ .../PackageVersionDefinitions.cs | 25 +++++++++++-------- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/build/LibraryVersions.g.cs b/build/LibraryVersions.g.cs index 2c0e4cabc4..f54706a8e8 100644 --- a/build/LibraryVersions.g.cs +++ b/build/LibraryVersions.g.cs @@ -34,7 +34,7 @@ public static partial class LibraryVersion new List { new("6.0.35"), - new("8.0.10", supportedFrameworks: new string[] {"net8.0"}), + new("8.0.10"), } }, { @@ -43,8 +43,8 @@ public static partial class LibraryVersion { new("6.0.3"), new("7.0.0"), - new("8.0.0", supportedFrameworks: new string[] {"net8.0"}), - new("8.0.2", supportedFrameworks: new string[] {"net8.0"}), + new("8.0.0"), + new("8.0.2"), } }, { @@ -120,8 +120,8 @@ public static partial class LibraryVersion new List { new("8.2.4"), - new("9.1.0", supportedFrameworks: new string[] {"net8.0"}), - new("9.2.3", supportedFrameworks: new string[] {"net8.0"}), + new("9.1.0", supportedFrameworks: new string[] {"net9.0","net8.0"}), + new("9.2.3", supportedFrameworks: new string[] {"net9.0","net8.0"}), } }, { @@ -171,7 +171,7 @@ public static partial class LibraryVersion { new("4.10.2"), new("6.2.0"), - new("8.0.0", supportedFrameworks: new string[] {"net8.0"}), + new("8.0.0", supportedFrameworks: new string[] {"net9.0","net8.0"}), } }, { diff --git a/test/IntegrationTests/LibraryVersions.g.cs b/test/IntegrationTests/LibraryVersions.g.cs index 8c5f88e066..70f9d71e6f 100644 --- a/test/IntegrationTests/LibraryVersions.g.cs +++ b/test/IntegrationTests/LibraryVersions.g.cs @@ -48,9 +48,7 @@ public static TheoryData EntityFrameworkCore theoryData.Add(string.Empty); #else theoryData.Add("6.0.35"); -#if NET8_0 theoryData.Add("8.0.10"); -#endif #endif return theoryData; } @@ -65,12 +63,8 @@ public static TheoryData EntityFrameworkCorePomeloMySql #else theoryData.Add("6.0.3"); theoryData.Add("7.0.0"); -#if NET8_0 theoryData.Add("8.0.0"); -#endif -#if NET8_0 theoryData.Add("8.0.2"); -#endif #endif return theoryData; } @@ -206,10 +200,10 @@ public static TheoryData NServiceBus theoryData.Add(string.Empty); #else theoryData.Add("8.2.4"); -#if NET8_0 +#if NET9_0 || NET8_0 theoryData.Add("9.1.0"); #endif -#if NET8_0 +#if NET9_0 || NET8_0 theoryData.Add("9.2.3"); #endif #endif @@ -301,7 +295,7 @@ public static TheoryData WCFCoreClient #else theoryData.Add("4.10.2"); theoryData.Add("6.2.0"); -#if NET8_0 +#if NET9_0 || NET8_0 theoryData.Add("8.0.0"); #endif #endif diff --git a/tools/LibraryVersionsGenerator/PackageVersionDefinitions.cs b/tools/LibraryVersionsGenerator/PackageVersionDefinitions.cs index 4da4ef5872..a25fa91a99 100644 --- a/tools/LibraryVersionsGenerator/PackageVersionDefinitions.cs +++ b/tools/LibraryVersionsGenerator/PackageVersionDefinitions.cs @@ -47,8 +47,8 @@ all lower versions than 8.15.10 contains references impacted by { new("6.0.35"), // new("7.0.20"), all versions contains references to vulnerable packages https://github.com/advisories/GHSA-hh2w-p6rv-4g7w - new("8.0.10", supportedTargetFrameworks: new[] { "net8.0" }, supportedExecutionFrameworks: new[] { "net8.0" }), - new("*", supportedTargetFrameworks: new[] { "net8.0" }, supportedExecutionFrameworks: new[] { "net8.0" }) + new("8.0.10"), + new("*") } }, new() @@ -60,8 +60,8 @@ all lower versions than 8.15.10 contains references impacted by { new("6.0.3"), new("7.0.0"), - new("8.0.0", supportedTargetFrameworks: new[] { "net8.0" }, supportedExecutionFrameworks: new[] { "net8.0" }), - new("*", supportedTargetFrameworks: new[] { "net8.0" }, supportedExecutionFrameworks: new[] { "net8.0" }) + new("8.0.0"), + new("*") } }, new() @@ -109,7 +109,7 @@ all lower versions than 8.15.10 contains references impacted by { // new("1.1.4"), - high vulnerability https://github.com/dotnet/announcements/issues/292, test should be skipped // new("2.1.7"), transitive vulnerabilities https://github.com/advisories/GHSA-rxg9-xrhp-64gj - // new("3.1.7", supportedTargetFrameworks: new[] { "net8.0", "net7.0", "net6.0" }, supportedExecutionFrameworks: new[] { "net8.0", "net7.0", "net6.0" }), // 3.1.* is not supported on .NET Framework. For details check: https://github.com/open-telemetry/opentelemetry-dotnet/issues/4243, transitive vulnerabilities https://github.com/advisories/GHSA-rxg9-xrhp-64gj + // new("3.1.7", supportedTargetFrameworks: new[] { "net8.0" }, supportedExecutionFrameworks: new[] { "net8.0" }), // 3.1.* is not supported on .NET Framework. For details check: https://github.com/open-telemetry/opentelemetry-dotnet/issues/4243, transitive vulnerabilities https://github.com/advisories/GHSA-rxg9-xrhp-64gj // new("4.0.6"), transitive vulnerabilities https://github.com/advisories/GHSA-rxg9-xrhp-64gj new("5.2.2"), new("*") @@ -182,8 +182,10 @@ all lower versions than 8.15.10 contains references impacted by { // new("8.0.0"), - transitive vulnerabilities https://github.com/advisories/GHSA-8g4q-xg66-9fp4, <=8.2.3 new("8.2.4"), - new("9.1.0", supportedTargetFrameworks: new[] { "net8.0" }, supportedExecutionFrameworks: new[] { "net8.0" }), // breaking change, new Meter name - new("*", supportedTargetFrameworks: new[] { "net8.0" }, supportedExecutionFrameworks: new[] { "net8.0" }) + new("9.1.0", supportedTargetFrameworks: ["net9.0", "net8.0"], supportedExecutionFrameworks: ["net9.0", "net8.0" + ]), // breaking change, new Meter name + new("*", supportedTargetFrameworks: ["net9.0", "net8.0"], supportedExecutionFrameworks: ["net9.0", "net8.0" + ]) } }, new() @@ -194,8 +196,8 @@ all lower versions than 8.15.10 contains references impacted by Versions = new List { // new("23.4.0", supportedTargetFrameworks: new[] { "net472" }, supportedExecutionFrameworks: new[] { "net462" }), transitive vulnerability https://github.com/advisories/GHSA-447r-wph3-92pm, <= 23.5.0 - new("23.5.1", supportedTargetFrameworks: new[] { "net472" }, supportedExecutionFrameworks: new[] { "net462" }), - new("*", supportedTargetFrameworks: new[] { "net472" }, supportedExecutionFrameworks: new[] { "net462" }) + new("23.5.1", supportedTargetFrameworks: ["net472"], supportedExecutionFrameworks: ["net462"]), + new("*", supportedTargetFrameworks: ["net472"], supportedExecutionFrameworks: ["net462"]) } }, new() @@ -255,7 +257,8 @@ all lower versions than 8.15.10 contains references impacted by { new("4.10.2"), new("6.2.0"), - new("*", supportedTargetFrameworks: new[] { "net8.0" }, supportedExecutionFrameworks: new[] { "net8.0" }) + new("*", supportedTargetFrameworks: ["net9.0", "net8.0"], supportedExecutionFrameworks: ["net9.0", "net8.0" + ]) } }, new() @@ -265,7 +268,7 @@ all lower versions than 8.15.10 contains references impacted by TestApplicationName = "TestApplication.Kafka", Versions = new List { - new("1.4.0", supportedPlatforms: new[] { "x64" }), + new("1.4.0", supportedPlatforms: ["x64"]), new("1.6.2"), // First version that supports both arm64 and x64 new("1.8.2"), // 1.8.0-1.8.1 are known to have issues with arm64 new("*") From 7e55b4f53cfbc3cb0c6636dfb9031a5f451b3925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 12:59:00 +0100 Subject: [PATCH 18/29] Adjust conditional compilation --- build/Build.NuGet.Steps.cs | 17 +------------- .../Continuations/ContinuationGenerator.cs | 4 ++-- .../ValueTaskContinuationGenerator.cs | 2 +- .../ValueTaskContinuationGenerator`1.cs | 2 +- .../CallTarget/Handlers/EndMethodHandler`1.cs | 4 ++-- .../Configurations/ConfigurationKeys.cs | 2 +- .../Configurations/DelayedInitialization.cs | 6 ++--- .../EnvironmentConfigurationMetricHelper.cs | 23 ++++++++----------- .../EnvironmentConfigurationTracerHelper.cs | 14 +++-------- .../Configurations/InstrumentationOptions.cs | 4 ++-- .../Configurations/MetricInstrumentation.cs | 2 +- .../Configurations/ResourceConfigurator.cs | 4 ++-- .../Configurations/ResourceDetector.cs | 2 +- .../Configurations/TracerInstrumentation.cs | 8 +++---- .../ContinuousProfiler/BufferProcessor.cs | 2 +- .../ContinuousProfilerProcessor.cs | 2 +- .../FrameworkDescription.NetCore.cs | 2 +- .../HeadersCapture/ActivityExtensions.cs | 4 ++-- .../Instrumentation.cs | 16 ++++++------- .../Logger/LoggingBuilderIntegration.cs | 2 +- .../StackExchangeRedisConstants.cs | 2 +- .../StackExchangeRedisInitializer.cs | 2 +- .../StackExchangeRedisIntegration.cs | 2 +- .../StackExchangeRedisIntegrationAsync.cs | 2 +- .../Wcf/Client/WcfClientIntegration.cs | 2 +- .../Initializers/AspNetCoreInitializer.cs | 2 +- .../AspNetCoreMetricsInitializer.cs | 2 +- .../EntityFrameworkCoreInitializer.cs | 2 +- .../Logger/LogBuilderExtensions.cs | 2 +- .../NativeMethods.cs | 6 ++--- .../PluginManager.ContinuousProfiler.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- test/IntegrationTests/AzureTests.cs | 4 +--- test/IntegrationTests/BuildTests.cs | 2 +- .../ContinuousProfilerContextTrackingTests.cs | 2 +- .../ContinuousProfilerTests.cs | 2 +- test/IntegrationTests/CustomSdkTests.cs | 10 +------- test/IntegrationTests/DotNetCliTests.cs | 4 ---- .../EntityFrameworkCorePomeloMySqlTests.cs | 2 +- .../EntityFrameworkCoreTests.cs | 2 +- test/IntegrationTests/GraphQLTests.cs | 2 +- .../Helpers/CollectorRequestHelper.cs | 2 +- .../Helpers/CollectorResponseHelper.cs | 4 ++-- .../Helpers/DirectoryHelpers.cs | 2 +- .../Helpers/MockCorrelationCollector.cs | 2 +- .../Helpers/MockProfilesCollector.cs | 2 +- test/IntegrationTests/Helpers/PathHandler.cs | 2 +- test/IntegrationTests/Helpers/TestHelper.cs | 2 +- .../Helpers/TestHttpServer.AspNetCore.cs | 2 +- test/IntegrationTests/HttpTests.cs | 23 +------------------ test/IntegrationTests/LogTests.cs | 2 +- test/IntegrationTests/MassTransitTests.cs | 2 +- test/IntegrationTests/MinimalApiTests.cs | 6 +---- test/IntegrationTests/MySqlDataTests.cs | 2 +- test/IntegrationTests/PluginsTests.cs | 4 +--- test/IntegrationTests/RedisCollection.cs | 2 +- test/IntegrationTests/SmokeTests.cs | 8 +++---- test/IntegrationTests/SqlClientSystemTests.cs | 2 +- .../StackExchangeRedisTests.cs | 2 +- test/IntegrationTests/WcfDotNetTests.cs | 2 +- test/IntegrationTests/WorkerTests.cs | 2 +- test/NuGetPackagesTests/NugetSampleTests.cs | 4 +--- .../Configurations/SettingsTests.cs | 16 ++++++------- .../Util/DirectoryHelpers.cs | 2 +- .../TestApplication.CustomSdk.csproj | 3 +-- .../TestApplication.Http/Program.cs | 8 ------- .../TestApplication.Http/Startup.cs | 2 -- 67 files changed, 104 insertions(+), 186 deletions(-) diff --git a/build/Build.NuGet.Steps.cs b/build/Build.NuGet.Steps.cs index a456b0d239..aa555313cc 100644 --- a/build/Build.NuGet.Steps.cs +++ b/build/Build.NuGet.Steps.cs @@ -150,28 +150,13 @@ partial class Build .Description("Builds the TestApplications.* used by the NuGetPackagesTests") .Executes(() => { - string MapToNet8RuntimeIdentifiers(string oldRuntimeIdentifier) - { -#if NET8_0_OR_GREATER - return oldRuntimeIdentifier; -#else - switch (oldRuntimeIdentifier) - { - case "ubuntu.20.04-x64": return "linux-x64"; - case "osx.11.0-x64": return "osx-x64"; - case "win10-x64": return "win-x64"; - } - throw new NotSupportedException($"{oldRuntimeIdentifier} is not supported. Extend MapToNet8RuntimeIdentifiers."); -#endif - } - foreach (var packagesTestApplicationProject in Solution.GetNuGetPackagesTestApplications()) { // Unlike the integration apps these require a restore step. DotNetBuild(s => s .SetProjectFile(packagesTestApplicationProject) .SetProperty("NuGetPackageVersion", VersionHelper.GetVersion()) - .SetRuntime(MapToNet8RuntimeIdentifiers(RuntimeInformation.RuntimeIdentifier)) + .SetRuntime(RuntimeInformation.RuntimeIdentifier) .SetSelfContained(true) .SetConfiguration(BuildConfiguration) .SetPlatform(Platform)); diff --git a/src/OpenTelemetry.AutoInstrumentation/CallTarget/Handlers/Continuations/ContinuationGenerator.cs b/src/OpenTelemetry.AutoInstrumentation/CallTarget/Handlers/Continuations/ContinuationGenerator.cs index c18c50bfb8..927b2035c0 100644 --- a/src/OpenTelemetry.AutoInstrumentation/CallTarget/Handlers/Continuations/ContinuationGenerator.cs +++ b/src/OpenTelemetry.AutoInstrumentation/CallTarget/Handlers/Continuations/ContinuationGenerator.cs @@ -15,7 +15,7 @@ internal class ContinuationGenerator [MethodImpl(MethodImplOptions.AggressiveInlining)] protected static TReturn ToTReturn(TFrom returnValue) { -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER return Unsafe.As(ref returnValue); #else return ContinuationsHelper.Convert(returnValue); @@ -25,7 +25,7 @@ protected static TReturn ToTReturn(TFrom returnValue) [MethodImpl(MethodImplOptions.AggressiveInlining)] protected static TTo FromTReturn(TReturn? returnValue) { -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER return Unsafe.As(ref returnValue); #else return ContinuationsHelper.Convert(returnValue); diff --git a/src/OpenTelemetry.AutoInstrumentation/CallTarget/Handlers/Continuations/ValueTaskContinuationGenerator.cs b/src/OpenTelemetry.AutoInstrumentation/CallTarget/Handlers/Continuations/ValueTaskContinuationGenerator.cs index 118970b9d5..ba5dea50a1 100644 --- a/src/OpenTelemetry.AutoInstrumentation/CallTarget/Handlers/Continuations/ValueTaskContinuationGenerator.cs +++ b/src/OpenTelemetry.AutoInstrumentation/CallTarget/Handlers/Continuations/ValueTaskContinuationGenerator.cs @@ -3,7 +3,7 @@ namespace OpenTelemetry.AutoInstrumentation.CallTarget.Handlers.Continuations; -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER internal class ValueTaskContinuationGenerator : ContinuationGenerator { private static readonly ContinuationMethodDelegate? _continuation; diff --git a/src/OpenTelemetry.AutoInstrumentation/CallTarget/Handlers/Continuations/ValueTaskContinuationGenerator`1.cs b/src/OpenTelemetry.AutoInstrumentation/CallTarget/Handlers/Continuations/ValueTaskContinuationGenerator`1.cs index a47b737891..0395123ade 100644 --- a/src/OpenTelemetry.AutoInstrumentation/CallTarget/Handlers/Continuations/ValueTaskContinuationGenerator`1.cs +++ b/src/OpenTelemetry.AutoInstrumentation/CallTarget/Handlers/Continuations/ValueTaskContinuationGenerator`1.cs @@ -5,7 +5,7 @@ namespace OpenTelemetry.AutoInstrumentation.CallTarget.Handlers.Continuations; -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER internal class ValueTaskContinuationGenerator : ContinuationGenerator { private static readonly ContinuationMethodDelegate? _continuation; diff --git a/src/OpenTelemetry.AutoInstrumentation/CallTarget/Handlers/EndMethodHandler`1.cs b/src/OpenTelemetry.AutoInstrumentation/CallTarget/Handlers/EndMethodHandler`1.cs index bf8fa8582a..9c13b0a736 100644 --- a/src/OpenTelemetry.AutoInstrumentation/CallTarget/Handlers/EndMethodHandler`1.cs +++ b/src/OpenTelemetry.AutoInstrumentation/CallTarget/Handlers/EndMethodHandler`1.cs @@ -39,7 +39,7 @@ static EndMethodHandler() // The type is a Task<> _continuationGenerator = (ContinuationGenerator?)Activator.CreateInstance(typeof(TaskContinuationGenerator<,,,>).MakeGenericType(typeof(TIntegration), typeof(TTarget), returnType, ContinuationsHelper.GetResultType(returnType))); } -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER else if (genericReturnType == typeof(ValueTask<>)) { // The type is a ValueTask<> @@ -54,7 +54,7 @@ static EndMethodHandler() // The type is a Task _continuationGenerator = new TaskContinuationGenerator(); } -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER else if (returnType == typeof(ValueTask)) { // The type is a ValueTask diff --git a/src/OpenTelemetry.AutoInstrumentation/Configurations/ConfigurationKeys.cs b/src/OpenTelemetry.AutoInstrumentation/Configurations/ConfigurationKeys.cs index cd3db33384..806ce7079b 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Configurations/ConfigurationKeys.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Configurations/ConfigurationKeys.cs @@ -109,7 +109,7 @@ public static class InstrumentationOptions public const string AspNetInstrumentationCaptureResponseHeaders = "OTEL_DOTNET_AUTO_TRACES_ASPNET_INSTRUMENTATION_CAPTURE_RESPONSE_HEADERS"; #endif -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER /// /// Configuration key for ASP.NET Core instrumentation to enable capturing HTTP request headers as span tags. /// diff --git a/src/OpenTelemetry.AutoInstrumentation/Configurations/DelayedInitialization.cs b/src/OpenTelemetry.AutoInstrumentation/Configurations/DelayedInitialization.cs index f747272193..92f419fa84 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Configurations/DelayedInitialization.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Configurations/DelayedInitialization.cs @@ -20,7 +20,7 @@ public static void AddAspNet(LazyInstrumentationLoader lazyInstrumentationLoader } #endif -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER [MethodImpl(MethodImplOptions.NoInlining)] public static void AddAspNetCore(LazyInstrumentationLoader lazyInstrumentationLoader, PluginManager pluginManager, TracerSettings tracerSettings) { @@ -46,7 +46,7 @@ public static void AddSqlClient(LazyInstrumentationLoader lazyInstrumentationLoa new SqlClientInitializer(lazyInstrumentationLoader, pluginManager, tracerSettings); } -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER [MethodImpl(MethodImplOptions.NoInlining)] public static void AddEntityFrameworkCore(LazyInstrumentationLoader lazyInstrumentationLoader, PluginManager pluginManager, TracerSettings tracerSettings) @@ -84,7 +84,7 @@ public static void AddAspNet(LazyInstrumentationLoader lazyInstrumentationLoader } #endif -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER [MethodImpl(MethodImplOptions.NoInlining)] public static void AddAspNetCore(LazyInstrumentationLoader lazyInstrumentationLoader) { diff --git a/src/OpenTelemetry.AutoInstrumentation/Configurations/EnvironmentConfigurationMetricHelper.cs b/src/OpenTelemetry.AutoInstrumentation/Configurations/EnvironmentConfigurationMetricHelper.cs index cb16ed4873..8eb7c9f54c 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Configurations/EnvironmentConfigurationMetricHelper.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Configurations/EnvironmentConfigurationMetricHelper.cs @@ -30,12 +30,12 @@ public static MeterProviderBuilder UseEnvironmentVariables( MetricInstrumentation.NetRuntime => Wrappers.AddRuntimeInstrumentation(builder, pluginManager), MetricInstrumentation.Process => Wrappers.AddProcessInstrumentation(builder), MetricInstrumentation.NServiceBus => builder -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER .AddMeter("NServiceBus.Core.Pipeline.Incoming") // NServiceBus 9.1.0+ #endif .AddMeter("NServiceBus.Core"), // NServiceBus [8,0.0, 9.1.0) -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER MetricInstrumentation.AspNetCore => Wrappers.AddAspNetCoreInstrumentation(builder, lazyInstrumentationLoader), #endif _ => null, @@ -83,7 +83,7 @@ public static MeterProviderBuilder AddAspNetInstrumentation(MeterProviderBuilder } #endif -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER [MethodImpl(MethodImplOptions.NoInlining)] public static MeterProviderBuilder AddAspNetCoreInstrumentation(MeterProviderBuilder builder, LazyInstrumentationLoader lazyInstrumentationLoader) { @@ -107,18 +107,15 @@ public static MeterProviderBuilder AddAspNetCoreInstrumentation(MeterProviderBui [MethodImpl(MethodImplOptions.NoInlining)] public static MeterProviderBuilder AddHttpClientInstrumentation(MeterProviderBuilder builder, LazyInstrumentationLoader lazyInstrumentationLoader) { -#if NET6_0_OR_GREATER - if (Environment.Version.Major >= 8) - { - // HTTP has build in support for metrics in .NET8. Executing OpenTelemetry.Instrumentation.Http in this case leads to duplicated metrics. - return builder - .AddMeter("System.Net.Http") - .AddMeter("System.Net.NameResolution"); - } -#endif - +#if NET8_0_OR_GREATER + // HTTP has build in support for metrics in .NET8. Executing OpenTelemetry.Instrumentation.Http in this case leads to duplicated metrics. + return builder + .AddMeter("System.Net.Http") + .AddMeter("System.Net.NameResolution"); +#else DelayedInitialization.Metrics.AddHttpClient(lazyInstrumentationLoader); return builder.AddMeter("OpenTelemetry.Instrumentation.Http"); +#endif } [MethodImpl(MethodImplOptions.NoInlining)] diff --git a/src/OpenTelemetry.AutoInstrumentation/Configurations/EnvironmentConfigurationTracerHelper.cs b/src/OpenTelemetry.AutoInstrumentation/Configurations/EnvironmentConfigurationTracerHelper.cs index 5cb2f8f4b0..400c02f7d8 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Configurations/EnvironmentConfigurationTracerHelper.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Configurations/EnvironmentConfigurationTracerHelper.cs @@ -41,7 +41,7 @@ public static TracerProviderBuilder UseEnvironmentVariables( TracerInstrumentation.WcfClient => AddWcfIfNeeded(builder, ref wcfInstrumentationAdded), TracerInstrumentation.OracleMda => Wrappers.AddOracleMdaInstrumentation(builder, lazyInstrumentationLoader, settings), TracerInstrumentation.RabbitMq => builder.AddSource("RabbitMQ.Client.Publisher").AddSource("RabbitMQ.Client.Subscriber"), -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER TracerInstrumentation.AspNetCore => Wrappers.AddAspNetCoreInstrumentation(builder, pluginManager, lazyInstrumentationLoader, settings), TracerInstrumentation.MassTransit => builder.AddSource("MassTransit"), TracerInstrumentation.MySqlData => builder.AddSource("connector-net"), @@ -136,19 +136,11 @@ public static TracerProviderBuilder AddAspNetInstrumentation(TracerProviderBuild } #endif -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER [MethodImpl(MethodImplOptions.NoInlining)] public static TracerProviderBuilder AddAspNetCoreInstrumentation(TracerProviderBuilder builder, PluginManager pluginManager, LazyInstrumentationLoader lazyInstrumentationLoader, TracerSettings tracerSettings) { DelayedInitialization.Traces.AddAspNetCore(lazyInstrumentationLoader, pluginManager, tracerSettings); - - if (Environment.Version.Major == 6) - { - return builder - .AddSource("OpenTelemetry.Instrumentation.AspNetCore") - .AddLegacySource("Microsoft.AspNetCore.Hosting.HttpRequestIn"); - } - return builder.AddSource("Microsoft.AspNetCore"); } @@ -208,7 +200,7 @@ public static TracerProviderBuilder AddQuartzInstrumentation(TracerProviderBuild .AddLegacySource("Quartz.Job.Veto"); } -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER [MethodImpl(MethodImplOptions.NoInlining)] public static TracerProviderBuilder AddEntityFrameworkCoreInstrumentation(TracerProviderBuilder builder, PluginManager pluginManager, LazyInstrumentationLoader lazyInstrumentationLoader, TracerSettings tracerSettings) { diff --git a/src/OpenTelemetry.AutoInstrumentation/Configurations/InstrumentationOptions.cs b/src/OpenTelemetry.AutoInstrumentation/Configurations/InstrumentationOptions.cs index 4232be7f99..5b1a88f2fa 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Configurations/InstrumentationOptions.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Configurations/InstrumentationOptions.cs @@ -16,7 +16,7 @@ internal InstrumentationOptions(Configuration configuration) AspNetInstrumentationCaptureRequestHeaders = configuration.ParseHeaders(ConfigurationKeys.Traces.InstrumentationOptions.AspNetInstrumentationCaptureRequestHeaders, AdditionalTag.CreateHttpRequestCache); AspNetInstrumentationCaptureResponseHeaders = configuration.ParseHeaders(ConfigurationKeys.Traces.InstrumentationOptions.AspNetInstrumentationCaptureResponseHeaders, AdditionalTag.CreateHttpResponseCache); #endif -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER AspNetCoreInstrumentationCaptureRequestHeaders = configuration.ParseHeaders(ConfigurationKeys.Traces.InstrumentationOptions.AspNetCoreInstrumentationCaptureRequestHeaders, AdditionalTag.CreateHttpRequestCache); AspNetCoreInstrumentationCaptureResponseHeaders = configuration.ParseHeaders(ConfigurationKeys.Traces.InstrumentationOptions.AspNetCoreInstrumentationCaptureResponseHeaders, AdditionalTag.CreateHttpResponseCache); EntityFrameworkCoreSetDbStatementForText = configuration.GetBool(ConfigurationKeys.Traces.InstrumentationOptions.EntityFrameworkCoreSetDbStatementForText) ?? false; @@ -43,7 +43,7 @@ internal InstrumentationOptions(Configuration configuration) public IReadOnlyList AspNetInstrumentationCaptureResponseHeaders { get; } #endif -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER /// /// Gets the list of HTTP request headers to be captured as the span tags by ASP.NET Core instrumentation. /// diff --git a/src/OpenTelemetry.AutoInstrumentation/Configurations/MetricInstrumentation.cs b/src/OpenTelemetry.AutoInstrumentation/Configurations/MetricInstrumentation.cs index feb5e84e87..d5918599bf 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Configurations/MetricInstrumentation.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Configurations/MetricInstrumentation.cs @@ -35,7 +35,7 @@ internal enum MetricInstrumentation /// NServiceBus = 5, -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER /// /// ASP.NET Core instrumentation. /// diff --git a/src/OpenTelemetry.AutoInstrumentation/Configurations/ResourceConfigurator.cs b/src/OpenTelemetry.AutoInstrumentation/Configurations/ResourceConfigurator.cs index 5cabe7de70..24fc041cea 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Configurations/ResourceConfigurator.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Configurations/ResourceConfigurator.cs @@ -26,7 +26,7 @@ public static ResourceBuilder CreateResourceBuilder(IReadOnlyList Wrappers.AddContainerResourceDetector(resourceBuilder), #endif ResourceDetector.AzureAppService => Wrappers.AddAzureAppServiceResourceDetector(resourceBuilder), @@ -56,7 +56,7 @@ public static ResourceBuilder CreateResourceBuilder(IReadOnlyList internal enum ResourceDetector { -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER /// /// Container resource detector. /// diff --git a/src/OpenTelemetry.AutoInstrumentation/Configurations/TracerInstrumentation.cs b/src/OpenTelemetry.AutoInstrumentation/Configurations/TracerInstrumentation.cs index c7a1210bfa..b3e3509d84 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Configurations/TracerInstrumentation.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Configurations/TracerInstrumentation.cs @@ -25,7 +25,7 @@ internal enum TracerInstrumentation /// SqlClient = 2, -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER /// /// GraphQL instrumentation. /// @@ -42,7 +42,7 @@ internal enum TracerInstrumentation /// Npgsql = 5, -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER /// /// MySqlData instrumentation. /// @@ -65,7 +65,7 @@ internal enum TracerInstrumentation WcfService = 9, #endif -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER /// /// MassTransit instrumentation. /// @@ -87,7 +87,7 @@ internal enum TracerInstrumentation /// Quartz = 13, -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER /// /// Entity Framework Core instrumentation. /// diff --git a/src/OpenTelemetry.AutoInstrumentation/ContinuousProfiler/BufferProcessor.cs b/src/OpenTelemetry.AutoInstrumentation/ContinuousProfiler/BufferProcessor.cs index c26a8cfbc6..f43488333a 100644 --- a/src/OpenTelemetry.AutoInstrumentation/ContinuousProfiler/BufferProcessor.cs +++ b/src/OpenTelemetry.AutoInstrumentation/ContinuousProfiler/BufferProcessor.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using OpenTelemetry.AutoInstrumentation.Logging; diff --git a/src/OpenTelemetry.AutoInstrumentation/ContinuousProfiler/ContinuousProfilerProcessor.cs b/src/OpenTelemetry.AutoInstrumentation/ContinuousProfiler/ContinuousProfilerProcessor.cs index ad57ab28e1..18feaad171 100644 --- a/src/OpenTelemetry.AutoInstrumentation/ContinuousProfiler/ContinuousProfilerProcessor.cs +++ b/src/OpenTelemetry.AutoInstrumentation/ContinuousProfiler/ContinuousProfilerProcessor.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using System.Diagnostics; using System.Globalization; diff --git a/src/OpenTelemetry.AutoInstrumentation/FrameworkDescription.NetCore.cs b/src/OpenTelemetry.AutoInstrumentation/FrameworkDescription.NetCore.cs index cdb67e349a..b649e4046a 100644 --- a/src/OpenTelemetry.AutoInstrumentation/FrameworkDescription.NetCore.cs +++ b/src/OpenTelemetry.AutoInstrumentation/FrameworkDescription.NetCore.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using System.Runtime.InteropServices; namespace OpenTelemetry.AutoInstrumentation; diff --git a/src/OpenTelemetry.AutoInstrumentation/HeadersCapture/ActivityExtensions.cs b/src/OpenTelemetry.AutoInstrumentation/HeadersCapture/ActivityExtensions.cs index 10967af9d3..d66ba4f41b 100644 --- a/src/OpenTelemetry.AutoInstrumentation/HeadersCapture/ActivityExtensions.cs +++ b/src/OpenTelemetry.AutoInstrumentation/HeadersCapture/ActivityExtensions.cs @@ -4,7 +4,7 @@ using System.Collections.Specialized; using System.Diagnostics; using System.Net.Http.Headers; -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using Microsoft.AspNetCore.Http; #endif @@ -40,7 +40,7 @@ public static void AddHeadersAsTags(this Activity activity, IReadOnlyList additionalTags, IHeaderDictionary headers) { if (!activity.IsAllDataRequested) diff --git a/src/OpenTelemetry.AutoInstrumentation/Instrumentation.cs b/src/OpenTelemetry.AutoInstrumentation/Instrumentation.cs index 8ad86672a8..a69095930e 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Instrumentation.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Instrumentation.cs @@ -1,11 +1,11 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using System.Diagnostics; #endif using OpenTelemetry.AutoInstrumentation.Configurations; -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using OpenTelemetry.AutoInstrumentation.ContinuousProfiler; #endif using OpenTelemetry.AutoInstrumentation.Diagnostics; @@ -33,7 +33,7 @@ internal static class Instrumentation private static MeterProvider? _meterProvider; private static PluginManager? _pluginManager; -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER private static ContinuousProfilerProcessor? _profilerProcessor; #endif @@ -89,7 +89,7 @@ public static void Initialize() _pluginManager = new PluginManager(GeneralSettings.Value); _pluginManager.Initializing(); -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER var profilerEnabled = GeneralSettings.Value.ProfilerEnabled; if (profilerEnabled) @@ -217,7 +217,7 @@ public static void Initialize() } } -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER private static void InitializeContinuousProfiling( object continuousProfilerExporter, bool threadSamplingEnabled, @@ -283,7 +283,7 @@ private static void AddLazilyLoadedMetricInstrumentations(LazyInstrumentationLoa DelayedInitialization.Metrics.AddAspNet(lazyInstrumentationLoader, pluginManager); break; #endif -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER case MetricInstrumentation.AspNetCore: DelayedInitialization.Metrics.AddAspNetCore(lazyInstrumentationLoader); break; @@ -336,7 +336,7 @@ private static void AddLazilyLoadedTraceInstrumentations(LazyInstrumentationLoad break; case TracerInstrumentation.WcfClient: break; -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER case TracerInstrumentation.AspNetCore: DelayedInitialization.Traces.AddAspNetCore(lazyInstrumentationLoader, pluginManager, tracerSettings); break; @@ -395,7 +395,7 @@ private static void OnExit(object? sender, EventArgs e) try { -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER LazyInstrumentationLoader?.Dispose(); if (_profilerProcessor != null) { diff --git a/src/OpenTelemetry.AutoInstrumentation/Instrumentations/Logger/LoggingBuilderIntegration.cs b/src/OpenTelemetry.AutoInstrumentation/Instrumentations/Logger/LoggingBuilderIntegration.cs index 0aef8b683b..a7fe856bfc 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Instrumentations/Logger/LoggingBuilderIntegration.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Instrumentations/Logger/LoggingBuilderIntegration.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using OpenTelemetry.AutoInstrumentation.CallTarget; namespace OpenTelemetry.AutoInstrumentation.Instrumentations.Logger; diff --git a/src/OpenTelemetry.AutoInstrumentation/Instrumentations/StackExchangeRedis/StackExchangeRedisConstants.cs b/src/OpenTelemetry.AutoInstrumentation/Instrumentations/StackExchangeRedis/StackExchangeRedisConstants.cs index ffeb509674..f67494c132 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Instrumentations/StackExchangeRedis/StackExchangeRedisConstants.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Instrumentations/StackExchangeRedis/StackExchangeRedisConstants.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER namespace OpenTelemetry.AutoInstrumentation.Instrumentations.StackExchangeRedis; diff --git a/src/OpenTelemetry.AutoInstrumentation/Instrumentations/StackExchangeRedis/StackExchangeRedisInitializer.cs b/src/OpenTelemetry.AutoInstrumentation/Instrumentations/StackExchangeRedis/StackExchangeRedisInitializer.cs index 17d7e1f466..694c4d9e8e 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Instrumentations/StackExchangeRedis/StackExchangeRedisInitializer.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Instrumentations/StackExchangeRedis/StackExchangeRedisInitializer.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER namespace OpenTelemetry.AutoInstrumentation.Instrumentations.StackExchangeRedis; diff --git a/src/OpenTelemetry.AutoInstrumentation/Instrumentations/StackExchangeRedis/StackExchangeRedisIntegration.cs b/src/OpenTelemetry.AutoInstrumentation/Instrumentations/StackExchangeRedis/StackExchangeRedisIntegration.cs index 27c5b7ac96..8d035b2057 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Instrumentations/StackExchangeRedis/StackExchangeRedisIntegration.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Instrumentations/StackExchangeRedis/StackExchangeRedisIntegration.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using OpenTelemetry.AutoInstrumentation.CallTarget; using OpenTelemetry.AutoInstrumentation.Configurations; diff --git a/src/OpenTelemetry.AutoInstrumentation/Instrumentations/StackExchangeRedis/StackExchangeRedisIntegrationAsync.cs b/src/OpenTelemetry.AutoInstrumentation/Instrumentations/StackExchangeRedis/StackExchangeRedisIntegrationAsync.cs index 403fbb8d20..acd1ee143c 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Instrumentations/StackExchangeRedis/StackExchangeRedisIntegrationAsync.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Instrumentations/StackExchangeRedis/StackExchangeRedisIntegrationAsync.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using OpenTelemetry.AutoInstrumentation.CallTarget; diff --git a/src/OpenTelemetry.AutoInstrumentation/Instrumentations/Wcf/Client/WcfClientIntegration.cs b/src/OpenTelemetry.AutoInstrumentation/Instrumentations/Wcf/Client/WcfClientIntegration.cs index 64d67629ba..e4337c3d25 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Instrumentations/Wcf/Client/WcfClientIntegration.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Instrumentations/Wcf/Client/WcfClientIntegration.cs @@ -38,7 +38,7 @@ namespace OpenTelemetry.AutoInstrumentation.Instrumentations.Wcf.Client; maximumVersion: WcfCommonConstants.Max4Version, integrationName: WcfClientConstants.IntegrationName, type: InstrumentationType.Trace)] -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER [InstrumentMethod( assemblyName: WcfCommonConstants.ServiceModelPrimitivesAssemblyName, typeName: WcfClientConstants.ChannelFactoryTypeName, diff --git a/src/OpenTelemetry.AutoInstrumentation/Loading/Initializers/AspNetCoreInitializer.cs b/src/OpenTelemetry.AutoInstrumentation/Loading/Initializers/AspNetCoreInitializer.cs index cf03fbdfda..c101f53bf9 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Loading/Initializers/AspNetCoreInitializer.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Loading/Initializers/AspNetCoreInitializer.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using System.Diagnostics; using Microsoft.AspNetCore.Http; using OpenTelemetry.AutoInstrumentation.Configurations; diff --git a/src/OpenTelemetry.AutoInstrumentation/Loading/Initializers/AspNetCoreMetricsInitializer.cs b/src/OpenTelemetry.AutoInstrumentation/Loading/Initializers/AspNetCoreMetricsInitializer.cs index e80463c711..4020e1f67e 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Loading/Initializers/AspNetCoreMetricsInitializer.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Loading/Initializers/AspNetCoreMetricsInitializer.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using System.Reflection; diff --git a/src/OpenTelemetry.AutoInstrumentation/Loading/Initializers/EntityFrameworkCoreInitializer.cs b/src/OpenTelemetry.AutoInstrumentation/Loading/Initializers/EntityFrameworkCoreInitializer.cs index 6137494551..3448d7bfcf 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Loading/Initializers/EntityFrameworkCoreInitializer.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Loading/Initializers/EntityFrameworkCoreInitializer.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using OpenTelemetry.AutoInstrumentation.Configurations; using OpenTelemetry.AutoInstrumentation.Plugins; diff --git a/src/OpenTelemetry.AutoInstrumentation/Logger/LogBuilderExtensions.cs b/src/OpenTelemetry.AutoInstrumentation/Logger/LogBuilderExtensions.cs index 916cb2963e..27087429eb 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Logger/LogBuilderExtensions.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Logger/LogBuilderExtensions.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/src/OpenTelemetry.AutoInstrumentation/NativeMethods.cs b/src/OpenTelemetry.AutoInstrumentation/NativeMethods.cs index fbf8dc2af1..90f20ab785 100644 --- a/src/OpenTelemetry.AutoInstrumentation/NativeMethods.cs +++ b/src/OpenTelemetry.AutoInstrumentation/NativeMethods.cs @@ -43,7 +43,7 @@ public static void AddDerivedInstrumentations(string id, NativeCallTargetDefinit } } -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER public static void ConfigureNativeContinuousProfiler(bool threadSamplingEnabled, uint threadSamplingInterval, bool allocationSamplingEnabled, uint maxMemorySamplesPerMinute) { if (IsWindows) @@ -92,7 +92,7 @@ private static class Windows [DllImport("OpenTelemetry.AutoInstrumentation.Native.dll")] public static extern void ConfigureContinuousProfiler(bool threadSamplingEnabled, uint threadSamplingInterval, bool allocationSamplingEnabled, uint maxMemorySamplesPerMinute); -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER [DllImport("OpenTelemetry.AutoInstrumentation.Native.dll")] public static extern int ContinuousProfilerReadThreadSamples(int len, byte[] buf); @@ -117,7 +117,7 @@ private static class NonWindows [DllImport("OpenTelemetry.AutoInstrumentation.Native")] public static extern void ConfigureContinuousProfiler(bool threadSamplingEnabled, uint threadSamplingInterval, bool allocationSamplingEnabled, uint maxMemorySamplesPerMinute); -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER [DllImport("OpenTelemetry.AutoInstrumentation.Native")] public static extern int ContinuousProfilerReadThreadSamples(int len, byte[] buf); diff --git a/src/OpenTelemetry.AutoInstrumentation/Plugins/PluginManager.ContinuousProfiler.cs b/src/OpenTelemetry.AutoInstrumentation/Plugins/PluginManager.ContinuousProfiler.cs index 07f0023ec5..9cc2514df3 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Plugins/PluginManager.ContinuousProfiler.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Plugins/PluginManager.ContinuousProfiler.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER namespace OpenTelemetry.AutoInstrumentation.Plugins; diff --git a/src/OpenTelemetry.AutoInstrumentation/Properties/AssemblyInfo.cs b/src/OpenTelemetry.AutoInstrumentation/Properties/AssemblyInfo.cs index ec873ba405..1b4aa7533f 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Properties/AssemblyInfo.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Properties/AssemblyInfo.cs @@ -6,7 +6,7 @@ [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] [assembly: InternalsVisibleTo("IntegrationTests, PublicKey=00240000048000009400000006020000002400005253413100040000010001008db7c66f4ebdc6aac4196be5ce1ff4b59b020028e6dbd6e46f15aa40b3215975b92d0a8e45aba5f36114a8cb56241fbfa49f4c017e6c62197857e4e9f62451bc23d3a660e20861f95a57f23e20c77d413ad216ff1bb55f94104d4c501e32b03219d8603fb6fa73401c6ae6808c8daa61b9eaee5d2377d3c23c9ca6016c6582d8")] [assembly: InternalsVisibleTo("NuGetPackagesTests, PublicKey=00240000048000009400000006020000002400005253413100040000010001008db7c66f4ebdc6aac4196be5ce1ff4b59b020028e6dbd6e46f15aa40b3215975b92d0a8e45aba5f36114a8cb56241fbfa49f4c017e6c62197857e4e9f62451bc23d3a660e20861f95a57f23e20c77d413ad216ff1bb55f94104d4c501e32b03219d8603fb6fa73401c6ae6808c8daa61b9eaee5d2377d3c23c9ca6016c6582d8")] -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER [assembly: InternalsVisibleTo("OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper, PublicKey=00240000048000009400000006020000002400005253413100040000010001008db7c66f4ebdc6aac4196be5ce1ff4b59b020028e6dbd6e46f15aa40b3215975b92d0a8e45aba5f36114a8cb56241fbfa49f4c017e6c62197857e4e9f62451bc23d3a660e20861f95a57f23e20c77d413ad216ff1bb55f94104d4c501e32b03219d8603fb6fa73401c6ae6808c8daa61b9eaee5d2377d3c23c9ca6016c6582d8")] #endif [assembly: InternalsVisibleTo("OpenTelemetry.AutoInstrumentation.Bootstrapping.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001008db7c66f4ebdc6aac4196be5ce1ff4b59b020028e6dbd6e46f15aa40b3215975b92d0a8e45aba5f36114a8cb56241fbfa49f4c017e6c62197857e4e9f62451bc23d3a660e20861f95a57f23e20c77d413ad216ff1bb55f94104d4c501e32b03219d8603fb6fa73401c6ae6808c8daa61b9eaee5d2377d3c23c9ca6016c6582d8")] diff --git a/test/IntegrationTests/AzureTests.cs b/test/IntegrationTests/AzureTests.cs index e709f2c7a6..1f5e661b1a 100644 --- a/test/IntegrationTests/AzureTests.cs +++ b/test/IntegrationTests/AzureTests.cs @@ -29,10 +29,8 @@ public void SubmitsTraces(string packageVersion) collector.Expect("Azure.Core.Http"); collector.Expect("Azure.Storage.Blobs.BlobContainerClient"); -#if NET7_0_OR_GREATER +#if NET8_0_OR_GREATER collector.Expect("System.Net.Http"); -#elif NET6_0_OR_GREATER - collector.Expect("OpenTelemetry.Instrumentation.Http.HttpClient"); #elif NETFRAMEWORK // On .NET Framework the "OpenTelemetry.Instrumentation.Http.HttpWebRequest" // ends up being suppressed by the addition of headers via the Azure instrumentation diff --git a/test/IntegrationTests/BuildTests.cs b/test/IntegrationTests/BuildTests.cs index 8c25ea9caa..cbda980787 100644 --- a/test/IntegrationTests/BuildTests.cs +++ b/test/IntegrationTests/BuildTests.cs @@ -31,7 +31,7 @@ public Task DistributionStructure() .DisableDiff(); } -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER [Fact] public void NetFolderDoesNotContainAnyLibraryFromAdditionalStore() { diff --git a/test/IntegrationTests/ContinuousProfilerContextTrackingTests.cs b/test/IntegrationTests/ContinuousProfilerContextTrackingTests.cs index 0bc009d609..2a939e88e6 100644 --- a/test/IntegrationTests/ContinuousProfilerContextTrackingTests.cs +++ b/test/IntegrationTests/ContinuousProfilerContextTrackingTests.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using System.Text.Json; using FluentAssertions; diff --git a/test/IntegrationTests/ContinuousProfilerTests.cs b/test/IntegrationTests/ContinuousProfilerTests.cs index 8b123e9ebd..e31b8dcfc5 100644 --- a/test/IntegrationTests/ContinuousProfilerTests.cs +++ b/test/IntegrationTests/ContinuousProfilerTests.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using IntegrationTests.Helpers; using OpenTelemetry.Proto.Profiles.V1Experimental; diff --git a/test/IntegrationTests/CustomSdkTests.cs b/test/IntegrationTests/CustomSdkTests.cs index 6efcee5e12..3a6dda8526 100644 --- a/test/IntegrationTests/CustomSdkTests.cs +++ b/test/IntegrationTests/CustomSdkTests.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using Google.Protobuf; using IntegrationTests.Helpers; using OpenTelemetry.Proto.Trace.V1; @@ -32,11 +32,7 @@ public void SubmitsTraces() collector.ResourceExpector.Expect("test_attr", "added_manually"); collector.Expect("OpenTelemetry.Instrumentation.StackExchangeRedis", span => !IsTopLevel(span)); -#if NET7_0_OR_GREATER collector.Expect("System.Net.Http", span => !IsTopLevel(span)); -#else - collector.Expect("OpenTelemetry.Instrumentation.Http.HttpClient", span => !IsTopLevel(span)); -#endif collector.Expect("TestApplication.CustomSdk", span => IsTopLevel(span)); collector.Expect("NServiceBus.Core", span => IsTopLevel(span)); @@ -66,11 +62,7 @@ public void SubmitsMetrics() collector.ResourceExpector.Expect("test_attr", "added_manually"); collector.Expect("OpenTelemetry.Instrumentation.Http"); -#if NET8_0_OR_GREATER collector.Expect("NServiceBus.Core.Pipeline.Incoming"); -#else - collector.Expect("NServiceBus.Core"); -#endif collector.Expect("TestApplication.CustomSdk"); EnableBytecodeInstrumentation(); diff --git a/test/IntegrationTests/DotNetCliTests.cs b/test/IntegrationTests/DotNetCliTests.cs index f173af7a0f..ea87278208 100644 --- a/test/IntegrationTests/DotNetCliTests.cs +++ b/test/IntegrationTests/DotNetCliTests.cs @@ -109,11 +109,7 @@ private void RunAppWithDotNetCliAndAssertHttpSpans(string arguments) var collector = new MockSpansCollector(Output); SetExporter(collector); -#if NET7_0_OR_GREATER collector.Expect("System.Net.Http"); -#else - collector.Expect("OpenTelemetry.Instrumentation.Http.HttpClient"); -#endif RunDotNetCli(arguments); diff --git a/test/IntegrationTests/EntityFrameworkCorePomeloMySqlTests.cs b/test/IntegrationTests/EntityFrameworkCorePomeloMySqlTests.cs index b317f878ca..3afa526af6 100644 --- a/test/IntegrationTests/EntityFrameworkCorePomeloMySqlTests.cs +++ b/test/IntegrationTests/EntityFrameworkCorePomeloMySqlTests.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using IntegrationTests.Helpers; using Xunit.Abstractions; diff --git a/test/IntegrationTests/EntityFrameworkCoreTests.cs b/test/IntegrationTests/EntityFrameworkCoreTests.cs index 8ffa2c8aea..a1e2583f41 100644 --- a/test/IntegrationTests/EntityFrameworkCoreTests.cs +++ b/test/IntegrationTests/EntityFrameworkCoreTests.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using IntegrationTests.Helpers; using Xunit.Abstractions; diff --git a/test/IntegrationTests/GraphQLTests.cs b/test/IntegrationTests/GraphQLTests.cs index f263e1fbe3..160928e8cc 100644 --- a/test/IntegrationTests/GraphQLTests.cs +++ b/test/IntegrationTests/GraphQLTests.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using System.Net; using System.Text; diff --git a/test/IntegrationTests/Helpers/CollectorRequestHelper.cs b/test/IntegrationTests/Helpers/CollectorRequestHelper.cs index 603797b6fb..417a6954db 100644 --- a/test/IntegrationTests/Helpers/CollectorRequestHelper.cs +++ b/test/IntegrationTests/Helpers/CollectorRequestHelper.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using Microsoft.AspNetCore.Http; namespace IntegrationTests.Helpers; diff --git a/test/IntegrationTests/Helpers/CollectorResponseHelper.cs b/test/IntegrationTests/Helpers/CollectorResponseHelper.cs index a6289d5e09..89b8a49d94 100644 --- a/test/IntegrationTests/Helpers/CollectorResponseHelper.cs +++ b/test/IntegrationTests/Helpers/CollectorResponseHelper.cs @@ -7,7 +7,7 @@ #endif using Google.Protobuf; -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using Microsoft.AspNetCore.Http; #endif @@ -41,7 +41,7 @@ public static void GenerateEmptyJsonResponse(this HttpListenerContext ctx) } #endif -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER public static async Task GenerateEmptyProtobufResponseAsync(this HttpContext ctx) where T : IMessage, new() { diff --git a/test/IntegrationTests/Helpers/DirectoryHelpers.cs b/test/IntegrationTests/Helpers/DirectoryHelpers.cs index f6c6e37d84..079b9d6c9e 100644 --- a/test/IntegrationTests/Helpers/DirectoryHelpers.cs +++ b/test/IntegrationTests/Helpers/DirectoryHelpers.cs @@ -7,7 +7,7 @@ internal static class DirectoryHelpers { public static DirectoryInfo CreateTempDirectory() { -#if NET7_0_OR_GREATER +#if NET8_0_OR_GREATER return Directory.CreateTempSubdirectory("native_logs"); #else var tempDir = Path.Combine(Path.GetTempPath(), "native_logs_" + Path.GetRandomFileName()); diff --git a/test/IntegrationTests/Helpers/MockCorrelationCollector.cs b/test/IntegrationTests/Helpers/MockCorrelationCollector.cs index 97313f7959..8098d84aa3 100644 --- a/test/IntegrationTests/Helpers/MockCorrelationCollector.cs +++ b/test/IntegrationTests/Helpers/MockCorrelationCollector.cs @@ -1,6 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using System.Collections.Concurrent; using System.Diagnostics; using FluentAssertions; diff --git a/test/IntegrationTests/Helpers/MockProfilesCollector.cs b/test/IntegrationTests/Helpers/MockProfilesCollector.cs index 8849986dd3..f8e3e3137c 100644 --- a/test/IntegrationTests/Helpers/MockProfilesCollector.cs +++ b/test/IntegrationTests/Helpers/MockProfilesCollector.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using System.Collections.Concurrent; using System.Text; diff --git a/test/IntegrationTests/Helpers/PathHandler.cs b/test/IntegrationTests/Helpers/PathHandler.cs index 27751ba843..9085b18693 100644 --- a/test/IntegrationTests/Helpers/PathHandler.cs +++ b/test/IntegrationTests/Helpers/PathHandler.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using Microsoft.AspNetCore.Http; namespace IntegrationTests.Helpers; diff --git a/test/IntegrationTests/Helpers/TestHelper.cs b/test/IntegrationTests/Helpers/TestHelper.cs index 6ac6a7a059..54bb7876cb 100644 --- a/test/IntegrationTests/Helpers/TestHelper.cs +++ b/test/IntegrationTests/Helpers/TestHelper.cs @@ -72,7 +72,7 @@ public void SetExporter(MockLogsCollector collector) SetEnvironmentVariable("OTEL_EXPORTER_OTLP_ENDPOINT", $"http://localhost:{collector.Port}"); } -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER public void SetExporter(MockProfilesCollector collector) { SetEnvironmentVariable("OTEL_EXPORTER_OTLP_ENDPOINT", $"http://localhost:{collector.Port}"); diff --git a/test/IntegrationTests/Helpers/TestHttpServer.AspNetCore.cs b/test/IntegrationTests/Helpers/TestHttpServer.AspNetCore.cs index e16d9401ce..294852d723 100644 --- a/test/IntegrationTests/Helpers/TestHttpServer.AspNetCore.cs +++ b/test/IntegrationTests/Helpers/TestHttpServer.AspNetCore.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using System.Net; using Microsoft.AspNetCore.Builder; diff --git a/test/IntegrationTests/HttpTests.cs b/test/IntegrationTests/HttpTests.cs index 3de468a2db..726ffc87f3 100644 --- a/test/IntegrationTests/HttpTests.cs +++ b/test/IntegrationTests/HttpTests.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using FluentAssertions; using FluentAssertions.Execution; using IntegrationTests.Helpers; @@ -27,22 +27,14 @@ public void SubmitTraces(string propagators) using var collector = new MockSpansCollector(Output); SetExporter(collector); Span? clientSpan = null; -#if NET7_0_OR_GREATER collector.Expect("System.Net.Http", span => -#else - collector.Expect("OpenTelemetry.Instrumentation.Http.HttpClient", span => -#endif { clientSpan = span; return true; }); Span? serverSpan = null; -#if NET7_0_OR_GREATER collector.Expect("Microsoft.AspNetCore", span => -#else - collector.Expect("OpenTelemetry.Instrumentation.AspNetCore", span => -#endif { serverSpan = span; return true; @@ -75,11 +67,7 @@ public void SubmitTracesCapturesHttpHeaders() using var collector = new MockSpansCollector(Output); SetExporter(collector); -#if NET7_0_OR_GREATER collector.Expect("System.Net.Http", span => -#else - collector.Expect("OpenTelemetry.Instrumentation.Http.HttpClient", span => -#endif { return span.Attributes.Any(x => x.Key == "http.request.header.custom-request-test-header1" && x.Value.StringValue == "Test-Value1") && span.Attributes.Any(x => x.Key == "http.request.header.custom-request-test-header3" && x.Value.StringValue == "Test-Value3") @@ -89,11 +77,7 @@ public void SubmitTracesCapturesHttpHeaders() && span.Attributes.All(x => x.Key != "http.response.header.custom-response-test-header3"); }); -#if NET7_0_OR_GREATER collector.Expect("Microsoft.AspNetCore", span => -#else - collector.Expect("OpenTelemetry.Instrumentation.AspNetCore", span => -#endif { return span.Attributes.Any(x => x.Key == "http.request.header.custom-request-test-header2" && x.Value.StringValue == "Test-Value2") && span.Attributes.All(x => x.Key != "http.request.header.custom-request-test-header1") @@ -119,7 +103,6 @@ public void SubmitMetrics() { using var collector = new MockMetricsCollector(Output); SetExporter(collector); -#if NET8_0_OR_GREATER collector.Expect("System.Net.Http"); collector.Expect("System.Net.NameResolution"); collector.Expect("Microsoft.AspNetCore.Hosting"); @@ -129,10 +112,6 @@ public void SubmitMetrics() collector.Expect("Microsoft.AspNetCore.Diagnostics"); collector.Expect("Microsoft.AspNetCore.RateLimiting"); collector.ExpectAdditionalEntries(x => x.All(m => m.InstrumentationScopeName != "OpenTelemetry.Instrumentation.AspNetCore" && m.InstrumentationScopeName != "OpenTelemetry.Instrumentation.Http")); -#else - collector.Expect("OpenTelemetry.Instrumentation.AspNetCore"); - collector.Expect("OpenTelemetry.Instrumentation.Http"); -#endif RunTestApplication(); diff --git a/test/IntegrationTests/LogTests.cs b/test/IntegrationTests/LogTests.cs index fce107852d..a05181eee5 100644 --- a/test/IntegrationTests/LogTests.cs +++ b/test/IntegrationTests/LogTests.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using IntegrationTests.Helpers; using OpenTelemetry.Proto.Logs.V1; using Xunit.Abstractions; diff --git a/test/IntegrationTests/MassTransitTests.cs b/test/IntegrationTests/MassTransitTests.cs index 8481d0239d..1dd822bef3 100644 --- a/test/IntegrationTests/MassTransitTests.cs +++ b/test/IntegrationTests/MassTransitTests.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using IntegrationTests.Helpers; using Xunit.Abstractions; using static OpenTelemetry.Proto.Trace.V1.Span.Types; diff --git a/test/IntegrationTests/MinimalApiTests.cs b/test/IntegrationTests/MinimalApiTests.cs index f7d83f985d..9e3be129a2 100644 --- a/test/IntegrationTests/MinimalApiTests.cs +++ b/test/IntegrationTests/MinimalApiTests.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using IntegrationTests.Helpers; using OpenTelemetry.Proto.Logs.V1; @@ -23,10 +23,6 @@ public MinimalApiTests(ITestOutputHelper output) [Trait("Category", "EndToEnd")] public async Task SubmitsLogsWithoutDuplicates(bool enableByteCodeInstrumentation, bool enableHostingStartupAssembly) { -#if NET6_0 - Skip.If(EnvironmentTools.IsMacOS(), "Known issue on MacOS."); -#endif - using var collector = new MockLogsCollector(Output); SetExporter(collector); diff --git a/test/IntegrationTests/MySqlDataTests.cs b/test/IntegrationTests/MySqlDataTests.cs index 3534632328..613ac902a6 100644 --- a/test/IntegrationTests/MySqlDataTests.cs +++ b/test/IntegrationTests/MySqlDataTests.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using IntegrationTests.Helpers; using Xunit.Abstractions; diff --git a/test/IntegrationTests/PluginsTests.cs b/test/IntegrationTests/PluginsTests.cs index 03804a0fb8..f9c43af379 100644 --- a/test/IntegrationTests/PluginsTests.cs +++ b/test/IntegrationTests/PluginsTests.cs @@ -34,10 +34,8 @@ public void SubmitsTraces() collector.Expect("MyCompany.MyProduct.MyLibrary"); #if NETFRAMEWORK collector.Expect("OpenTelemetry.Instrumentation.Http.HttpWebRequest", span => span.Attributes.Any(att => att.Key == "example.plugin")); -#elif NET7_0_OR_GREATER - collector.Expect("System.Net.Http", span => span.Attributes.Any(att => att.Key == "example.plugin")); #else - collector.Expect("OpenTelemetry.Instrumentation.Http.HttpClient", span => span.Attributes.Any(att => att.Key == "example.plugin")); + collector.Expect("System.Net.Http", span => span.Attributes.Any(att => att.Key == "example.plugin")); #endif SetEnvironmentVariable("OTEL_DOTNET_AUTO_PLUGINS", "TestApplication.Plugins.Plugin, TestApplication.Plugins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"); diff --git a/test/IntegrationTests/RedisCollection.cs b/test/IntegrationTests/RedisCollection.cs index 5d9cecd7b8..3ab499e86b 100644 --- a/test/IntegrationTests/RedisCollection.cs +++ b/test/IntegrationTests/RedisCollection.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using DotNet.Testcontainers.Builders; using DotNet.Testcontainers.Containers; diff --git a/test/IntegrationTests/SmokeTests.cs b/test/IntegrationTests/SmokeTests.cs index 5fea1c7320..e5ab676573 100644 --- a/test/IntegrationTests/SmokeTests.cs +++ b/test/IntegrationTests/SmokeTests.cs @@ -151,7 +151,7 @@ public void MetricsResource() collector.ResourceExpector.AssertExpectations(); } -#if NET6_0_OR_GREATER // The feature is not supported on .NET Framework +#if NET8_0_OR_GREATER // The feature is not supported on .NET Framework [Fact] [Trait("Category", "EndToEnd")] public void LogsResource() @@ -360,7 +360,7 @@ public void PrometheusAndOtlpMetricsExporter() } #endif -#if NET6_0_OR_GREATER // The feature is not supported on .NET Framework +#if NET8_0_OR_GREATER // The feature is not supported on .NET Framework [Fact] [Trait("Category", "EndToEnd")] public void SubmitLogs() @@ -630,10 +630,8 @@ private void VerifyTestApplicationInstrumented(TestAppStartupMode startupMode = collector.Expect("MyCompany.MyProduct.MyLibrary"); #if NETFRAMEWORK collector.Expect("OpenTelemetry.Instrumentation.Http.HttpWebRequest"); -#elif NET7_0_OR_GREATER - collector.Expect("System.Net.Http"); #else - collector.Expect("OpenTelemetry.Instrumentation.Http.HttpClient"); + collector.Expect("System.Net.Http"); #endif EnableOnlyHttpClientTraceInstrumentation(); diff --git a/test/IntegrationTests/SqlClientSystemTests.cs b/test/IntegrationTests/SqlClientSystemTests.cs index f80568bec8..d9aee49615 100644 --- a/test/IntegrationTests/SqlClientSystemTests.cs +++ b/test/IntegrationTests/SqlClientSystemTests.cs @@ -23,7 +23,7 @@ public static TheoryData GetData() foreach (var version in LibraryVersion.SqlClientSystem) { -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER theoryData.Add(version, true); #endif theoryData.Add(version, false); diff --git a/test/IntegrationTests/StackExchangeRedisTests.cs b/test/IntegrationTests/StackExchangeRedisTests.cs index 1ade01e6c8..917d8d7fa6 100644 --- a/test/IntegrationTests/StackExchangeRedisTests.cs +++ b/test/IntegrationTests/StackExchangeRedisTests.cs @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER using IntegrationTests.Helpers; using Xunit.Abstractions; diff --git a/test/IntegrationTests/WcfDotNetTests.cs b/test/IntegrationTests/WcfDotNetTests.cs index 7dd38f99cb..05069b2928 100644 --- a/test/IntegrationTests/WcfDotNetTests.cs +++ b/test/IntegrationTests/WcfDotNetTests.cs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // This test won't work outside of windows as it need the server side which is .NET Framework only. -#if NET6_0_OR_GREATER && _WINDOWS +#if NET8_0_OR_GREATER && _WINDOWS using Xunit.Abstractions; namespace IntegrationTests; diff --git a/test/IntegrationTests/WorkerTests.cs b/test/IntegrationTests/WorkerTests.cs index 7e268984ac..c39e24cb3c 100644 --- a/test/IntegrationTests/WorkerTests.cs +++ b/test/IntegrationTests/WorkerTests.cs @@ -5,7 +5,7 @@ using OpenTelemetry.Proto.Logs.V1; using Xunit.Abstractions; -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER namespace IntegrationTests; diff --git a/test/NuGetPackagesTests/NugetSampleTests.cs b/test/NuGetPackagesTests/NugetSampleTests.cs index 82d341bfc8..4fad776651 100644 --- a/test/NuGetPackagesTests/NugetSampleTests.cs +++ b/test/NuGetPackagesTests/NugetSampleTests.cs @@ -148,10 +148,8 @@ private void RunAndAssertHttpSpans(Action appLauncherAction) #if NETFRAMEWORK collector.Expect("OpenTelemetry.Instrumentation.Http.HttpWebRequest"); -#elif NET7_0_OR_GREATER +#elif NET8_0_OR_GREATER collector.Expect("System.Net.Http"); -#else - collector.Expect("OpenTelemetry.Instrumentation.Http.HttpClient"); #endif appLauncherAction(); diff --git a/test/OpenTelemetry.AutoInstrumentation.Tests/Configurations/SettingsTests.cs b/test/OpenTelemetry.AutoInstrumentation.Tests/Configurations/SettingsTests.cs index 4678fb1fb9..5db2f23671 100644 --- a/test/OpenTelemetry.AutoInstrumentation.Tests/Configurations/SettingsTests.cs +++ b/test/OpenTelemetry.AutoInstrumentation.Tests/Configurations/SettingsTests.cs @@ -58,7 +58,7 @@ internal void TracerSettings_DefaultValues() settings.InstrumentationOptions.AspNetInstrumentationCaptureRequestHeaders.Should().BeEmpty(); settings.InstrumentationOptions.AspNetInstrumentationCaptureResponseHeaders.Should().BeEmpty(); #endif -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER settings.InstrumentationOptions.AspNetCoreInstrumentationCaptureRequestHeaders.Should().BeEmpty(); settings.InstrumentationOptions.AspNetCoreInstrumentationCaptureResponseHeaders.Should().BeEmpty(); settings.InstrumentationOptions.EntityFrameworkCoreSetDbStatementForText.Should().BeFalse(); @@ -292,12 +292,12 @@ internal void Propagators_FailFast(string propagators) #if NETFRAMEWORK [InlineData("ASPNET", TracerInstrumentation.AspNet)] #endif -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER [InlineData("GRAPHQL", TracerInstrumentation.GraphQL)] #endif [InlineData("HTTPCLIENT", TracerInstrumentation.HttpClient)] [InlineData("MONGODB", TracerInstrumentation.MongoDB)] -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER [InlineData("MYSQLDATA", TracerInstrumentation.MySqlData)] [InlineData("STACKEXCHANGEREDIS", TracerInstrumentation.StackExchangeRedis)] #endif @@ -307,13 +307,13 @@ internal void Propagators_FailFast(string propagators) #if NETFRAMEWORK [InlineData("WCFSERVICE", TracerInstrumentation.WcfService)] #endif -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER [InlineData("MASSTRANSIT", TracerInstrumentation.MassTransit)] #endif [InlineData("NSERVICEBUS", TracerInstrumentation.NServiceBus)] [InlineData("ELASTICSEARCH", TracerInstrumentation.Elasticsearch)] [InlineData("QUARTZ", TracerInstrumentation.Quartz)] -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER [InlineData("ENTITYFRAMEWORKCORE", TracerInstrumentation.EntityFrameworkCore)] [InlineData("ASPNETCORE", TracerInstrumentation.AspNetCore)] #endif @@ -342,7 +342,7 @@ internal void TracerSettings_Instrumentations_SupportedValues(string tracerInstr [InlineData("HTTPCLIENT", MetricInstrumentation.HttpClient)] [InlineData("PROCESS", MetricInstrumentation.Process)] [InlineData("NSERVICEBUS", MetricInstrumentation.NServiceBus)] -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER [InlineData("ASPNETCORE", MetricInstrumentation.AspNetCore)] #endif internal void MeterSettings_Instrumentations_SupportedValues(string meterInstrumentation, MetricInstrumentation expectedMetricInstrumentation) @@ -410,7 +410,7 @@ internal void FlushOnUnhandledException_DependsOnCorrespondingEnvVariable(string } [Theory] -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER [InlineData("CONTAINER", ResourceDetector.Container)] #endif [InlineData("AZUREAPPSERVICE", ResourceDetector.AzureAppService)] @@ -470,7 +470,7 @@ private static void ClearEnvVars() Environment.SetEnvironmentVariable(ConfigurationKeys.Traces.InstrumentationOptions.AspNetInstrumentationCaptureResponseHeaders, null); #endif -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER Environment.SetEnvironmentVariable(ConfigurationKeys.Traces.InstrumentationOptions.AspNetCoreInstrumentationCaptureRequestHeaders, null); Environment.SetEnvironmentVariable(ConfigurationKeys.Traces.InstrumentationOptions.AspNetCoreInstrumentationCaptureResponseHeaders, null); Environment.SetEnvironmentVariable(ConfigurationKeys.Traces.InstrumentationOptions.GraphQLSetDocument, null); diff --git a/test/OpenTelemetry.AutoInstrumentation.Tests/Util/DirectoryHelpers.cs b/test/OpenTelemetry.AutoInstrumentation.Tests/Util/DirectoryHelpers.cs index dbfdcb5ffa..e1c2b11990 100644 --- a/test/OpenTelemetry.AutoInstrumentation.Tests/Util/DirectoryHelpers.cs +++ b/test/OpenTelemetry.AutoInstrumentation.Tests/Util/DirectoryHelpers.cs @@ -7,7 +7,7 @@ internal static class DirectoryHelpers { public static DirectoryInfo CreateTempDirectory() { -#if NET7_0_OR_GREATER +#if NET8_0_OR_GREATER return Directory.CreateTempSubdirectory("managed_logs"); #else var tempDir = Path.Combine(Path.GetTempPath(), "managed_logs_" + Path.GetRandomFileName()); diff --git a/test/test-applications/integrations/TestApplication.CustomSdk/TestApplication.CustomSdk.csproj b/test/test-applications/integrations/TestApplication.CustomSdk/TestApplication.CustomSdk.csproj index d0a39b2c8e..e3d8e9954d 100644 --- a/test/test-applications/integrations/TestApplication.CustomSdk/TestApplication.CustomSdk.csproj +++ b/test/test-applications/integrations/TestApplication.CustomSdk/TestApplication.CustomSdk.csproj @@ -10,8 +10,7 @@ - - + diff --git a/test/test-applications/integrations/TestApplication.Http/Program.cs b/test/test-applications/integrations/TestApplication.Http/Program.cs index a29e492935..9e066aca4a 100644 --- a/test/test-applications/integrations/TestApplication.Http/Program.cs +++ b/test/test-applications/integrations/TestApplication.Http/Program.cs @@ -3,14 +3,10 @@ using System.Diagnostics; using System.Net.Http; -#if NET8_0_OR_GREATER using System.Threading.RateLimiting; -#endif using Microsoft.AspNetCore.Hosting.Server; using Microsoft.AspNetCore.Hosting.Server.Features; -#if NET8_0_OR_GREATER using Microsoft.AspNetCore.SignalR.Client; -#endif namespace TestApplication.Http; @@ -37,22 +33,18 @@ public static void Main(string[] args) httpClient.DefaultRequestHeaders.Add("Custom-Request-Test-Header3", "Test-Value3"); httpClient.GetAsync($"{dnsAddress}/test").Wait(); httpClient.GetAsync($"{dnsAddress}/exception").Wait(); -#if NET8_0_OR_GREATER var hubConnection = new HubConnectionBuilder().WithUrl($"{dnsAddress}/signalr").Build(); hubConnection.StartAsync().Wait(); hubConnection.StopAsync().Wait(); -#endif } public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) -#if NET8_0_OR_GREATER .ConfigureServices( services => services .AddRateLimiter(rateLimiterOptions => rateLimiterOptions.GlobalLimiter = PartitionedRateLimiter.Create(httpContext => RateLimitPartition.GetNoLimiter("1"))) .AddConnections() .AddSignalR()) -#endif .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); diff --git a/test/test-applications/integrations/TestApplication.Http/Startup.cs b/test/test-applications/integrations/TestApplication.Http/Startup.cs index a204ffa63f..efacd4e42f 100644 --- a/test/test-applications/integrations/TestApplication.Http/Startup.cs +++ b/test/test-applications/integrations/TestApplication.Http/Startup.cs @@ -25,12 +25,10 @@ public void ConfigureServices(IServiceCollection services) public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { app -#if NET8_0_OR_GREATER .UseRouting() // enables metrics for Microsoft.AspNetCore.Routing in .NET8+ .UseExceptionHandler(new ExceptionHandlerOptions { ExceptionHandler = _ => Task.CompletedTask }) // together with call to /exception enables metrics for Microsoft.AspNetCore.Diagnostics for .NET8+ .UseRateLimiter() // enables metrics for Microsoft.AspNetCore.RateLimiting in .NET8+ .UseEndpoints(x => x.MapHub("/signalr")) // together with connection to SignalR Hub enables metrics for Microsoft.AspNetCore.Http.Connections for .NET8 -#endif .Map( "/test", configuration => configuration.Run(async context => From 5c4e553e1861149b0514d0baf863ffaf89ef56b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 13:04:04 +0100 Subject: [PATCH 19/29] Remove legacy code from LogBuilderExtensions --- .../Logger/LogBuilderExtensions.cs | 32 +------------------ 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/src/OpenTelemetry.AutoInstrumentation/Logger/LogBuilderExtensions.cs b/src/OpenTelemetry.AutoInstrumentation/Logger/LogBuilderExtensions.cs index 27087429eb..b84dc37d09 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Logger/LogBuilderExtensions.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Logger/LogBuilderExtensions.cs @@ -13,22 +13,11 @@ namespace OpenTelemetry.AutoInstrumentation.Logger; internal static class LogBuilderExtensions { private static Type? _loggingProviderSdkType; - private static volatile bool _hostingStartupRan; // this method is only called from LoggingBuilderIntegration public static void AddOpenTelemetryLogsFromIntegration(ILoggingBuilder builder) { - // For Net6, if HostingStartupAssembly is configured, we don't want to call integration again for host's ServiceCollection. - // OpenTelemetryLogger-related services were already added to WebApplicationServiceCollection and will - // be copied to host's ServiceCollection later. We can't depend on integration's - // capability to detect if integration was called before (by checking if ServiceDescriptor with - // given type is already added to ServiceCollection) as copying services from WebApplicationServiceCollection - // to host's ServiceCollection happens AFTER integration is called. - - // All of this additional checking is NOT needed for net7. There we can rely on integration's capability - // to detect if integration was called before, because WebApplicationServiceCollection is not used when building host. - - if (builder.Services is ServiceCollection && !(IsNet6() && _hostingStartupRan && IsHostServiceCollection(builder.Services))) + if (builder.Services is ServiceCollection) { AddOpenTelemetryLogs(builder); } @@ -38,7 +27,6 @@ public static void AddOpenTelemetryLogsFromIntegration(ILoggingBuilder builder) public static void AddOpenTelemetryLogsFromStartup(this ILoggingBuilder builder) { AddOpenTelemetryLogs(builder); - _hostingStartupRan = true; } private static void AddOpenTelemetryLogs(ILoggingBuilder builder) @@ -106,23 +94,5 @@ private static void AddOpenTelemetryLogs(ILoggingBuilder builder) throw; } } - - private static bool IsNet6() - { - var frameworkDescription = FrameworkDescription.Instance; - return frameworkDescription.Name == ".NET" && frameworkDescription.ProductVersion.StartsWith("6"); - } - - private static bool IsHostServiceCollection(IServiceCollection builderServices) - { - var applicationLifetimeType = Type.GetType("Microsoft.Extensions.Hosting.Internal.ApplicationLifetime, Microsoft.Extensions.Hosting"); - if (applicationLifetimeType == null) - { - return false; - } - - var applicationLifetimeDescriptor = builderServices.FirstOrDefault(sd => sd.ImplementationType == applicationLifetimeType); - return applicationLifetimeDescriptor != null; - } } #endif From bbc24b1cd154c94471e5b9fbd1123aa74d345e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 13:06:15 +0100 Subject: [PATCH 20/29] Fix dev comment --- test/IntegrationTests/GraphQLTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/IntegrationTests/GraphQLTests.cs b/test/IntegrationTests/GraphQLTests.cs index 160928e8cc..ec47a98040 100644 --- a/test/IntegrationTests/GraphQLTests.cs +++ b/test/IntegrationTests/GraphQLTests.cs @@ -63,7 +63,7 @@ public async Task SubmitsTraces(string packageVersion, bool setDocument) SetEnvironmentVariable("OTEL_DOTNET_AUTO_GRAPHQL_SET_DOCUMENT", setDocument.ToString()); SetEnvironmentVariable("OTEL_DOTNET_AUTO_TRACES_INSTRUMENTATION_ENABLED", "false"); - SetEnvironmentVariable("OTEL_DOTNET_AUTO_METRICS_INSTRUMENTATION_ENABLED", "false"); // disable metrics to disable side effect of AspNetCore - working propagation on .NET6 and .NET7 + SetEnvironmentVariable("OTEL_DOTNET_AUTO_METRICS_INSTRUMENTATION_ENABLED", "false"); // disable metrics to disable side effect of AspNetCore - working propagation on .NET SetEnvironmentVariable("OTEL_DOTNET_AUTO_TRACES_GRAPHQL_INSTRUMENTATION_ENABLED", "true"); SetEnvironmentVariable("OTEL_DOTNET_AUTO_TRACES_ASPNETCORE_INSTRUMENTATION_ENABLED", "true"); // AspNetCore Instrumentation enables propagation used in this test SetEnvironmentVariable("OTEL_TRACES_SAMPLER", "always_on"); From 1c2405b25a9f69da00f97f782c8482876affac28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 13:10:15 +0100 Subject: [PATCH 21/29] Adjust CI to execute scripts tests against .net9 --- .github/workflows/build-container.yml | 4 ++-- .github/workflows/build.yml | 8 ++++---- .github/workflows/release-publish.yml | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml index 144f91a436..4095bc32f4 100644 --- a/.github/workflows/build-container.yml +++ b/.github/workflows/build-container.yml @@ -43,10 +43,10 @@ jobs: docker build -t mybuildimage -f "./docker/${{ matrix.base-image }}.dockerfile" ./docker docker run --mount type=bind,source="${GITHUB_WORKSPACE}",target=/project --rm mybuildimage /bin/sh -c ' set -e - dotnet publish -f net8.0 -c Release ./test/test-applications/integrations/TestApplication.Smoke + dotnet publish -f net9.0 -c Release ./test/test-applications/integrations/TestApplication.Smoke export OTEL_DOTNET_AUTO_HOME="${PWD}/bin/tracer-home" . ./instrument.sh - ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net8.0/publish/TestApplication.Smoke + ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net9.0/publish/TestApplication.Smoke test "$(ls -A /var/log/opentelemetry/dotnet )" ' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c6d4cacf77..9c5eda3a0d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -101,10 +101,10 @@ jobs: shell: bash run: | set -e - dotnet publish -f net8.0 -c Release ./test/test-applications/integrations/TestApplication.Smoke + dotnet publish -f net9.0 -c Release ./test/test-applications/integrations/TestApplication.Smoke export OTEL_DOTNET_AUTO_HOME="${PWD}/bin/tracer-home" . ./instrument.sh - ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net8.0/publish/TestApplication.Smoke + ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net9.0/publish/TestApplication.Smoke test "$(ls -A '${{ matrix.log-dir }}' )" - name: Test the Windows PowerShell module instructions from README.md @@ -115,12 +115,12 @@ jobs: Import-Module "${PWD}/bin/installation-scripts/OpenTelemetry.DotNet.Auto.psm1" [System.Environment]::SetEnvironmentVariable("OTEL_DOTNET_AUTO_INSTALL_DIR", "${PWD}/bin/tracer-home", [System.EnvironmentVariableTarget]::Machine) Register-OpenTelemetryForCurrentSession -OTelServiceName "MyServiceDisplayName" - ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net8.0/TestApplication.Smoke.exe + ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net9.0/TestApplication.Smoke.exe if (-not $?) { throw "dotnet help returned exit code: $LASTEXITCODE" } if (-not (Test-Path $log_path)) { throw "Log file does not exist. Instrumentation test failed." } Remove-Item $log_path Unregister-OpenTelemetryForCurrentSession - ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net8.0/TestApplication.Smoke.exe + ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net9.0/TestApplication.Smoke.exe if (-not $?) { throw "dotnet help returned exit code: $LASTEXITCODE" } if (Test-Path $log_path) { throw "Log file exists. Instrumentation unregister failed." } diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 472044104c..811c4b0804 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -22,7 +22,7 @@ jobs: mkdir testapp cd testapp dotnet new console - dotnet publish -f net8.0 -c Release + dotnet publish -f net9.0 -c Release $module_url = "https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/OpenTelemetry.DotNet.Auto.psm1" $dl_path = Join-Path $env:temp "OpenTelemetry.DotNet.Auto.psm1" $log_path = "C:\ProgramData\OpenTelemetry .NET AutoInstrumentation\logs\*" @@ -31,12 +31,12 @@ jobs: Install-OpenTelemetryCore $install_dir = Get-OpenTelemetryInstallDirectory Register-OpenTelemetryForCurrentSession -OTelServiceName "MyServiceDisplayName" - ./bin/Release/net8.0/publish/testapp + ./bin/Release/net9.0/publish/testapp if (-not $?) { throw "dotnet help returned exit code: $LASTEXITCODE" } if (-not (Test-Path $log_path)) { throw "Log file does not exist. Instrumentation test failed." } Remove-Item $log_path Unregister-OpenTelemetryForCurrentSession - ./bin/Release/net8.0/publish/testapp + ./bin/Release/net9.0/publish/testapp if (-not $?) { throw "dotnet help returned exit code: $LASTEXITCODE" } if (Test-Path $log_path) { throw "Log file exists. Instrumentation unregister failed." } Uninstall-OpenTelemetryCore @@ -85,13 +85,13 @@ jobs: mkdir testapp cd testapp dotnet new console - dotnet publish -f net8.0 -c Release + dotnet publish -f net9.0 -c Release curl -sSfL https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/otel-dotnet-auto-install.sh -O sh ./otel-dotnet-auto-install.sh test "$(ls -A "$HOME/.otel-dotnet-auto")" curl -sSfL https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/instrument.sh -O . ./instrument.sh - ./bin/Release/net8.0/publish/testapp + ./bin/Release/net9.0/publish/testapp test "$(ls -A '${{ matrix.log-dir }}' )" shell-scripts-container: From e0fa3b1bfbba333ebfc286554b2b13ce567bd47e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 13:21:13 +0100 Subject: [PATCH 22/29] revert demo target versions. It should be fixed just after next release --- examples/demo/Client/Examples.Client.csproj | 2 +- examples/demo/Service/Examples.Service.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/demo/Client/Examples.Client.csproj b/examples/demo/Client/Examples.Client.csproj index a47cf75648..f67f521030 100644 --- a/examples/demo/Client/Examples.Client.csproj +++ b/examples/demo/Client/Examples.Client.csproj @@ -2,7 +2,7 @@ Exe - net9.0 + net8.0 enable diff --git a/examples/demo/Service/Examples.Service.csproj b/examples/demo/Service/Examples.Service.csproj index d496d8dd5b..82008da538 100644 --- a/examples/demo/Service/Examples.Service.csproj +++ b/examples/demo/Service/Examples.Service.csproj @@ -1,7 +1,7 @@ - net9.0 + net8.0 enable From c69b842da8bb7996b1a26964e28bae1ef38b40ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 13:39:58 +0100 Subject: [PATCH 23/29] Centos Stream9 - install .NET9 --- docker/centos-stream9.dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docker/centos-stream9.dockerfile b/docker/centos-stream9.dockerfile index 1e3505f8a9..91dcfb8f03 100644 --- a/docker/centos-stream9.dockerfile +++ b/docker/centos-stream9.dockerfile @@ -2,9 +2,8 @@ FROM quay.io/centos/centos:stream9 # Install dotnet sdk RUN dnf install -y \ - dotnet-sdk-8.0 \ - dotnet-sdk-7.0 \ - dotnet-sdk-6.0 + dotnet-sdk-9.0 \ + dotnet-sdk-8.0 # https://github.com/dotnet/runtime/issues/65874 RUN update-crypto-policies --set LEGACY From 64a6155c74286e4a727d3260a3eb4b7e6e937184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 14:04:15 +0100 Subject: [PATCH 24/29] Fix LoggingBuilder integration for version 9.* --- .../InstrumentationDefinitions.g.cs | 2 +- .../Instrumentations/Logger/LoggingBuilderIntegration.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OpenTelemetry.AutoInstrumentation/Generated/net8.0/SourceGenerators/SourceGenerators.InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs b/src/OpenTelemetry.AutoInstrumentation/Generated/net8.0/SourceGenerators/SourceGenerators.InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs index 3589715890..a412b42832 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Generated/net8.0/SourceGenerators/SourceGenerators.InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Generated/net8.0/SourceGenerators/SourceGenerators.InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs @@ -79,7 +79,7 @@ private static NativeCallTargetDefinition[] GetDefinitionsArray() // ILogger if (logSettings.EnabledInstrumentations.Contains(LogInstrumentation.ILogger)) { - nativeCallTargetDefinitions.Add(new("Microsoft.Extensions.Logging", "Microsoft.Extensions.Logging.LoggingBuilder", ".ctor", new[] {"System.Void", "Microsoft.Extensions.DependencyInjection.IServiceCollection"}, 8, 0, 0, 8, 65535, 65535, AssemblyFullName, "OpenTelemetry.AutoInstrumentation.Instrumentations.Logger.LoggingBuilderIntegration")); + nativeCallTargetDefinitions.Add(new("Microsoft.Extensions.Logging", "Microsoft.Extensions.Logging.LoggingBuilder", ".ctor", new[] {"System.Void", "Microsoft.Extensions.DependencyInjection.IServiceCollection"}, 8, 0, 0, 9, 65535, 65535, AssemblyFullName, "OpenTelemetry.AutoInstrumentation.Instrumentations.Logger.LoggingBuilderIntegration")); } } diff --git a/src/OpenTelemetry.AutoInstrumentation/Instrumentations/Logger/LoggingBuilderIntegration.cs b/src/OpenTelemetry.AutoInstrumentation/Instrumentations/Logger/LoggingBuilderIntegration.cs index a7fe856bfc..add3027b58 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Instrumentations/Logger/LoggingBuilderIntegration.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Instrumentations/Logger/LoggingBuilderIntegration.cs @@ -16,7 +16,7 @@ namespace OpenTelemetry.AutoInstrumentation.Instrumentations.Logger; returnTypeName: ClrNames.Void, parameterTypeNames: new[] { "Microsoft.Extensions.DependencyInjection.IServiceCollection" }, minimumVersion: "8.0.0", - maximumVersion: "8.*.*", + maximumVersion: "9.*.*", integrationName: "ILogger", type: InstrumentationType.Log)] public static class LoggingBuilderIntegration @@ -35,7 +35,7 @@ internal static CallTargetReturn OnMethodEnd(TTarget instance, Exceptio { var logBuilderExtensionsType = Type.GetType("OpenTelemetry.AutoInstrumentation.Logger.LogBuilderExtensions, OpenTelemetry.AutoInstrumentation"); var methodInfo = logBuilderExtensionsType?.GetMethod("AddOpenTelemetryLogsFromIntegration"); - methodInfo?.Invoke(null, new[] { (object)instance }); + methodInfo?.Invoke(null, [instance]); } return CallTargetReturn.GetDefault(); From adbaf8e061ada567dd90ccd7ad025b049eaaceec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 17:42:13 +0100 Subject: [PATCH 25/29] drop debugger launch --- tools/SdkVersionAnalyzer/Program.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/SdkVersionAnalyzer/Program.cs b/tools/SdkVersionAnalyzer/Program.cs index 21c1774a4d..1571ae231f 100644 --- a/tools/SdkVersionAnalyzer/Program.cs +++ b/tools/SdkVersionAnalyzer/Program.cs @@ -9,7 +9,6 @@ internal static class Program { public static int Main(string[] args) { - Debugger.Launch(); if (args.Length < 2) { Console.WriteLine("At least 2 arguments required - operation mode and directory root."); From 6e61cc3213ee816cd8fd09f2f8c6c3ea1a5a5986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 18:33:24 +0100 Subject: [PATCH 26/29] cleanup using --- tools/SdkVersionAnalyzer/Program.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/SdkVersionAnalyzer/Program.cs b/tools/SdkVersionAnalyzer/Program.cs index 1571ae231f..bf21ba02c6 100644 --- a/tools/SdkVersionAnalyzer/Program.cs +++ b/tools/SdkVersionAnalyzer/Program.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -using System.Diagnostics; - namespace SdkVersionAnalyzer; internal static class Program From fd87e30b9dc7a543cd575b884541f983c495627e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 18:35:59 +0100 Subject: [PATCH 27/29] sync versions in the comments Co-authored-by: Rasmus Kuusmann --- tools/SdkVersionAnalyzer/ActionWorkflowAnalyzer.cs | 2 +- tools/SdkVersionAnalyzer/DockerfileAnalyzer.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/SdkVersionAnalyzer/ActionWorkflowAnalyzer.cs b/tools/SdkVersionAnalyzer/ActionWorkflowAnalyzer.cs index 6a611ea052..eccd716847 100644 --- a/tools/SdkVersionAnalyzer/ActionWorkflowAnalyzer.cs +++ b/tools/SdkVersionAnalyzer/ActionWorkflowAnalyzer.cs @@ -84,7 +84,7 @@ private static Scalar GetNewDotnetVersionScalar(DotnetSdkVersion newDotnetSdkVer // Use ctor with default values, apart from ScalarStyle. // Use ScalarStyle.Literal to get dotnet-version with value similar to below: // dotnet-version: | - // 8.0.403 + // 8.0.404 // 9.0.100 return new Scalar(AnchorName.Empty, TagName.Empty, val, ScalarStyle.Literal, true, true, Mark.Empty, Mark.Empty); diff --git a/tools/SdkVersionAnalyzer/DockerfileAnalyzer.cs b/tools/SdkVersionAnalyzer/DockerfileAnalyzer.cs index 16cc615289..1e1f13579b 100644 --- a/tools/SdkVersionAnalyzer/DockerfileAnalyzer.cs +++ b/tools/SdkVersionAnalyzer/DockerfileAnalyzer.cs @@ -55,7 +55,7 @@ private static bool VerifySdkVersions(string content, DotnetSdkVersion expectedD // && echo "SHA256: $(sha256sum dotnet-install.sh)" \ // && echo "de4957e41252191427a8ba0866f640b9f19c98fad62305919de41bd332e9c820 dotnet-install.sh" | sha256sum -c \ // && chmod +x ./dotnet-install.sh \ - // && ./dotnet-install.sh -v 8.0.403 --install-dir /usr/share/dotnet --no-path \ + // && ./dotnet-install.sh -v 8.0.404 --install-dir /usr/share/dotnet --no-path \ // && ./dotnet-install.sh -v 9.0.100 --install-dir /usr/share/dotnet --no-path \ // && rm dotnet-install.sh From 8d642e288ebb8a98fc9e696fde2212cc421d7603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Thu, 21 Nov 2024 06:42:46 +0100 Subject: [PATCH 28/29] DuckTyping - include GH item in TODO comment --- src/OpenTelemetry.AutoInstrumentation/DuckTyping/DuckType.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/OpenTelemetry.AutoInstrumentation/DuckTyping/DuckType.cs b/src/OpenTelemetry.AutoInstrumentation/DuckTyping/DuckType.cs index ff47fef8dc..7e0538d336 100644 --- a/src/OpenTelemetry.AutoInstrumentation/DuckTyping/DuckType.cs +++ b/src/OpenTelemetry.AutoInstrumentation/DuckTyping/DuckType.cs @@ -330,7 +330,9 @@ private static ModuleBuilder CreateTypeAndModuleBuilder(Type typeToDeriveFrom, T parentType = typeof(ValueType); typeAttributes = TypeAttributes.Public | TypeAttributes.AnsiClass | TypeAttributes.BeforeFieldInit | TypeAttributes.SequentialLayout | TypeAttributes.Sealed #pragma warning disable SYSLIB0050 - // TODO double check how to handle TypeAttributes.Serializable which is obsolete + // TODO verify how to handle TypeAttributes.Serializable which is obsolete. + // It was working fine with binaries compiled against .NET6 executed in .NET8 runtime. + // https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/3799 | TypeAttributes.Serializable; #pragma warning restore SYSLIB0050 if (typeToDeriveFrom.IsInterface) From 6ac1c0472f60fdb07af01c2227fa1226d09d343c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Thu, 21 Nov 2024 06:45:42 +0100 Subject: [PATCH 29/29] TransientDependenciesTests - update comment --- .../TransientDependenciesTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/OpenTelemetry.AutoInstrumentation.Tests/TransientDependenciesTests.cs b/test/OpenTelemetry.AutoInstrumentation.Tests/TransientDependenciesTests.cs index cbe640c6b7..4ac1c7b652 100644 --- a/test/OpenTelemetry.AutoInstrumentation.Tests/TransientDependenciesTests.cs +++ b/test/OpenTelemetry.AutoInstrumentation.Tests/TransientDependenciesTests.cs @@ -1,8 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// This test is defined in NET8.0 because the tool is written in .NET 8.0 -// The actual test is testing .NET 462 context. +// This test is defined in NET 9.0 because the tool is written in .NET 9.0 +// The actual test is testing .NET Framework 4.6.2 context. #if NET9_0_OR_GREATER using System.Reflection;