From d84f0edf7779fb0afd4e4a80a012abe6edd473cc Mon Sep 17 00:00:00 2001 From: Alan West <3676547+alanwest@users.noreply.github.com> Date: Tue, 7 Jun 2022 20:46:15 -0700 Subject: [PATCH] Use DiagnosticSource 7.0 and drop netcoreapp3.1 target (#3351) * Remove AspNetCore 3.1 test app * Remove netcoreapp3.1 target from projects * Bump to DiagnosticSource 7.0.0-preview.4.22229.4 * Enable CI on net7.0 branch * Remove trailing space --- .github/workflows/apicompatibility.yml | 2 +- .github/workflows/code-coverage.yml | 4 +- .github/workflows/docfx.yml | 4 +- .github/workflows/dotnet-format-md.yml | 2 +- .github/workflows/dotnet-format.yml | 4 +- .github/workflows/integration-md.yml | 8 +-- .github/workflows/integration.yml | 10 +-- .github/workflows/linux-ci-md.yml | 4 +- .github/workflows/linux-ci.yml | 6 +- .github/workflows/markdownlint.yml | 4 +- .github/workflows/sanitycheck.yml | 4 +- .github/workflows/windows-ci-md.yml | 4 +- .github/workflows/windows-ci.yml | 6 +- OpenTelemetry.sln | 7 -- build/Common.props | 2 +- docs/Directory.Build.props | 2 +- .../PublicAPI.Shipped.txt | 0 .../PublicAPI.Unshipped.txt | 0 .../OpenTelemetry.Exporter.Prometheus.csproj | 4 +- ...elemetry.Instrumentation.AspNetCore.csproj | 7 +- test/Benchmarks/Benchmarks.csproj | 2 +- ...OpenTelemetry.Exporter.Jaeger.Tests.csproj | 2 +- ...xporter.OpenTelemetryProtocol.Tests.csproj | 2 +- ...Telemetry.Exporter.Prometheus.Tests.csproj | 6 +- ...OpenTelemetry.Exporter.ZPages.Tests.csproj | 2 +- ...OpenTelemetry.Exporter.Zipkin.Tests.csproj | 2 +- ...nTelemetry.Extensions.Hosting.Tests.csproj | 2 +- ...emetry.Extensions.Propagators.Tests.csproj | 2 +- ...ry.Instrumentation.AspNetCore.Tests.csproj | 2 +- ...elemetry.Instrumentation.Grpc.Tests.csproj | 2 +- ...elemetry.Instrumentation.Http.Tests.csproj | 2 +- ...try.Instrumentation.SqlClient.Tests.csproj | 2 +- ...strumentation.W3cTraceContext.Tests.csproj | 6 +- ...enTelemetry.Shims.OpenTracing.Tests.csproj | 2 +- .../OpenTelemetry.Tests.Stress.Metrics.csproj | 2 +- .../OpenTelemetry.Tests.Stress.csproj | 2 +- .../OpenTelemetry.Tests.csproj | 2 +- test/TestApp.AspNetCore.3.1/AssemblyInfo.cs | 24 ------- .../CallbackMiddleware.cs | 48 ------------- .../Controllers/ChildActivityController.cs | 46 ------------ .../Controllers/ForwardController.cs | 71 ------------------- .../Controllers/ValuesController.cs | 56 --------------- test/TestApp.AspNetCore.3.1/Program.cs | 33 --------- test/TestApp.AspNetCore.3.1/README.md | 13 ---- test/TestApp.AspNetCore.3.1/Startup.cs | 63 ---------------- .../TestApp.AspNetCore.3.1.csproj | 23 ------ .../appsettings.Development.json | 10 --- test/TestApp.AspNetCore.3.1/appsettings.json | 15 ---- 48 files changed, 53 insertions(+), 475 deletions(-) rename src/OpenTelemetry.Exporter.Prometheus/.publicApi/{netcoreapp3.1 => net6.0}/PublicAPI.Shipped.txt (100%) rename src/OpenTelemetry.Exporter.Prometheus/.publicApi/{netcoreapp3.1 => net6.0}/PublicAPI.Unshipped.txt (100%) delete mode 100644 test/TestApp.AspNetCore.3.1/AssemblyInfo.cs delete mode 100644 test/TestApp.AspNetCore.3.1/CallbackMiddleware.cs delete mode 100644 test/TestApp.AspNetCore.3.1/Controllers/ChildActivityController.cs delete mode 100644 test/TestApp.AspNetCore.3.1/Controllers/ForwardController.cs delete mode 100644 test/TestApp.AspNetCore.3.1/Controllers/ValuesController.cs delete mode 100644 test/TestApp.AspNetCore.3.1/Program.cs delete mode 100644 test/TestApp.AspNetCore.3.1/README.md delete mode 100644 test/TestApp.AspNetCore.3.1/Startup.cs delete mode 100644 test/TestApp.AspNetCore.3.1/TestApp.AspNetCore.3.1.csproj delete mode 100644 test/TestApp.AspNetCore.3.1/appsettings.Development.json delete mode 100644 test/TestApp.AspNetCore.3.1/appsettings.json diff --git a/.github/workflows/apicompatibility.yml b/.github/workflows/apicompatibility.yml index 937d296de..b953fb9ab 100644 --- a/.github/workflows/apicompatibility.yml +++ b/.github/workflows/apicompatibility.yml @@ -2,7 +2,7 @@ name: API Compatibility on: pull_request: - branches: [ main ] + branches: [ main, net7.0 ] paths-ignore: - '**.md' diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index 772d8e45a..19edc8ed7 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -2,11 +2,11 @@ name: Code Coverage on: push: - branches: [ main ] + branches: [ main, net7.0 ] paths-ignore: - '**.md' pull_request: - branches: [ main ] + branches: [ main, net7.0 ] paths-ignore: - '**.md' diff --git a/.github/workflows/docfx.yml b/.github/workflows/docfx.yml index b183f8531..9de27064f 100644 --- a/.github/workflows/docfx.yml +++ b/.github/workflows/docfx.yml @@ -2,9 +2,9 @@ name: docfx on: push: - branches: [ main ] + branches: [ main, net7.0 ] pull_request: - branches: [ main ] + branches: [ main, net7.0 ] jobs: build: diff --git a/.github/workflows/dotnet-format-md.yml b/.github/workflows/dotnet-format-md.yml index 5453ddca9..6a093eb64 100644 --- a/.github/workflows/dotnet-format-md.yml +++ b/.github/workflows/dotnet-format-md.yml @@ -9,7 +9,7 @@ name: dotnet format on: pull_request: - branches: [ main ] + branches: [ main, net7.0 ] paths: - '**.md' diff --git a/.github/workflows/dotnet-format.yml b/.github/workflows/dotnet-format.yml index 472fc5f68..ea8666ae6 100644 --- a/.github/workflows/dotnet-format.yml +++ b/.github/workflows/dotnet-format.yml @@ -2,12 +2,12 @@ name: dotnet format on: push: - branches: [ main ] + branches: [ main, net7.0 ] paths: - '**.cs' - '.editorconfig' pull_request: - branches: [ main ] + branches: [ main, net7.0 ] paths: - '**.cs' - '.editorconfig' diff --git a/.github/workflows/integration-md.yml b/.github/workflows/integration-md.yml index aec19d819..f346041b0 100644 --- a/.github/workflows/integration-md.yml +++ b/.github/workflows/integration-md.yml @@ -9,7 +9,7 @@ name: Integration Tests on: pull_request: - branches: [ main ] + branches: [ main, net7.0 ] paths: - '**.md' @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: [netcoreapp3.1,net6.0] + version: [net6.0] steps: - run: 'echo "No build required"' @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: [netcoreapp3.1,net6.0] + version: [net6.0] steps: - run: 'echo "No build required"' @@ -34,6 +34,6 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: [netcoreapp3.1,net6.0] + version: [net6.0] steps: - run: 'echo "No build required"' diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index b3d53770e..052e12fff 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -2,11 +2,11 @@ name: Integration Tests on: push: - branches: [ main ] + branches: [ main, net7.0 ] paths-ignore: - '**.md' pull_request: - branches: [ main ] + branches: [ main, net7.0 ] paths-ignore: - '**.md' @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - version: [netcoreapp3.1,net6.0] + version: [net6.0] steps: - uses: actions/checkout@v3 @@ -28,7 +28,7 @@ jobs: strategy: fail-fast: false matrix: - version: [netcoreapp3.1,net6.0] + version: [net6.0] steps: - uses: actions/checkout@v3 @@ -40,7 +40,7 @@ jobs: strategy: fail-fast: false matrix: - version: [netcoreapp3.1,net6.0] + version: [net6.0] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/linux-ci-md.yml b/.github/workflows/linux-ci-md.yml index cec69098e..43975cfaf 100644 --- a/.github/workflows/linux-ci-md.yml +++ b/.github/workflows/linux-ci-md.yml @@ -9,7 +9,7 @@ name: Linux on: pull_request: - branches: [ main ] + branches: [ main, net7.0 ] paths: - '**.md' @@ -19,7 +19,7 @@ jobs: strategy: matrix: - version: [netcoreapp3.1,net6.0] + version: [net6.0] steps: - run: 'echo "No build required"' diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index c8fec659c..ae55acfb4 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -2,11 +2,11 @@ name: Linux on: push: - branches: [ main ] + branches: [ main, net7.0 ] paths-ignore: - '**.md' pull_request: - branches: [ main ] + branches: [ main, net7.0 ] paths-ignore: - '**.md' @@ -16,7 +16,7 @@ jobs: strategy: matrix: - version: [netcoreapp3.1,net6.0] + version: [net6.0] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml index 97f85f9e2..1fbb52e9f 100644 --- a/.github/workflows/markdownlint.yml +++ b/.github/workflows/markdownlint.yml @@ -2,11 +2,11 @@ name: markdownlint on: push: - branches: [ main ] + branches: [ main, net7.0 ] paths: - '**.md' pull_request: - branches: [ main ] + branches: [ main, net7.0 ] paths: - '**.md' diff --git a/.github/workflows/sanitycheck.yml b/.github/workflows/sanitycheck.yml index a52563198..ef2e5cd14 100644 --- a/.github/workflows/sanitycheck.yml +++ b/.github/workflows/sanitycheck.yml @@ -2,9 +2,9 @@ name: sanitycheck on: push: - branches: [ main ] + branches: [ main, net7.0 ] pull_request: - branches: [ main ] + branches: [ main, net7.0 ] jobs: misspell: diff --git a/.github/workflows/windows-ci-md.yml b/.github/workflows/windows-ci-md.yml index 2e2bfd561..1b409793a 100644 --- a/.github/workflows/windows-ci-md.yml +++ b/.github/workflows/windows-ci-md.yml @@ -9,7 +9,7 @@ name: Windows on: pull_request: - branches: [ main ] + branches: [ main, net7.0 ] paths: - '**.md' @@ -19,7 +19,7 @@ jobs: strategy: matrix: - version: [net462,netcoreapp3.1,net6.0] + version: [net462,net6.0] steps: - run: 'echo "No build required"' diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 9996cd8ea..45f7783f0 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -2,11 +2,11 @@ name: Windows on: push: - branches: [ main ] + branches: [ main, net7.0 ] paths-ignore: - '**.md' pull_request: - branches: [ main ] + branches: [ main, net7.0 ] paths-ignore: - '**.md' @@ -16,7 +16,7 @@ jobs: strategy: matrix: - version: [net462,netcoreapp3.1,net6.0] + version: [net462,net6.0] steps: - uses: actions/checkout@v3 diff --git a/OpenTelemetry.sln b/OpenTelemetry.sln index e74cd2724..b15e5d2b0 100644 --- a/OpenTelemetry.sln +++ b/OpenTelemetry.sln @@ -50,8 +50,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentati EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testdata", "testdata", "{77C7929A-2EED-4AA6-8705-B5C443C8AA0F}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestApp.AspNetCore.3.1", "test\TestApp.AspNetCore.3.1\TestApp.AspNetCore.3.1.csproj", "{F2F81E76-6A0E-466B-B673-EBBF1A9ED075}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{E359BB2B-9AEC-497D-B321-7DF2450C3B8E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.Jaeger", "src\OpenTelemetry.Exporter.Jaeger\OpenTelemetry.Exporter.Jaeger.csproj", "{8D47E3CF-9AE3-42FE-9084-FEB72D9AD769}" @@ -266,10 +264,6 @@ Global {2A47F6A8-63E5-4237-8046-94CAF321E797}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A47F6A8-63E5-4237-8046-94CAF321E797}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A47F6A8-63E5-4237-8046-94CAF321E797}.Release|Any CPU.Build.0 = Release|Any CPU - {F2F81E76-6A0E-466B-B673-EBBF1A9ED075}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F2F81E76-6A0E-466B-B673-EBBF1A9ED075}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F2F81E76-6A0E-466B-B673-EBBF1A9ED075}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F2F81E76-6A0E-466B-B673-EBBF1A9ED075}.Release|Any CPU.Build.0 = Release|Any CPU {8D47E3CF-9AE3-42FE-9084-FEB72D9AD769}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8D47E3CF-9AE3-42FE-9084-FEB72D9AD769}.Debug|Any CPU.Build.0 = Debug|Any CPU {8D47E3CF-9AE3-42FE-9084-FEB72D9AD769}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -491,7 +485,6 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {F2F81E76-6A0E-466B-B673-EBBF1A9ED075} = {77C7929A-2EED-4AA6-8705-B5C443C8AA0F} {A533C800-3DC3-4D04-90A7-0CE7A1E6BDB3} = {F1D0972B-38CF-49C2-9F4B-4C5DE02FB71D} {E69578EB-B456-4062-A645-877CD964528B} = {F1D0972B-38CF-49C2-9F4B-4C5DE02FB71D} {C1542297-8763-4DF4-957C-489ED771C21D} = {7CB2F02E-03FA-4FFF-89A5-C51F107623FD} diff --git a/build/Common.props b/build/Common.props index b512b98b5..f1c8471b4 100644 --- a/build/Common.props +++ b/build/Common.props @@ -42,7 +42,7 @@ 1.3.0 [1.2.0-beta.354,2.0) 1.4.0 - 6.0.0 + 7.0.0-preview.4.22229.4 4.7.0 4.7.0 4.5.3 diff --git a/docs/Directory.Build.props b/docs/Directory.Build.props index 66de93982..9d8626a31 100644 --- a/docs/Directory.Build.props +++ b/docs/Directory.Build.props @@ -5,7 +5,7 @@ Exe - net6.0;netcoreapp3.1 + net6.0 $(TargetFrameworks);net462;net47;net471;net472;net48 diff --git a/src/OpenTelemetry.Exporter.Prometheus/.publicApi/netcoreapp3.1/PublicAPI.Shipped.txt b/src/OpenTelemetry.Exporter.Prometheus/.publicApi/net6.0/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.Prometheus/.publicApi/netcoreapp3.1/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Exporter.Prometheus/.publicApi/net6.0/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.Exporter.Prometheus/.publicApi/netcoreapp3.1/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.Prometheus/.publicApi/net6.0/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.Prometheus/.publicApi/netcoreapp3.1/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Exporter.Prometheus/.publicApi/net6.0/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Exporter.Prometheus/OpenTelemetry.Exporter.Prometheus.csproj b/src/OpenTelemetry.Exporter.Prometheus/OpenTelemetry.Exporter.Prometheus.csproj index c53448ea4..526089a32 100644 --- a/src/OpenTelemetry.Exporter.Prometheus/OpenTelemetry.Exporter.Prometheus.csproj +++ b/src/OpenTelemetry.Exporter.Prometheus/OpenTelemetry.Exporter.Prometheus.csproj @@ -2,7 +2,7 @@ - netcoreapp3.1;net462 + net6.0;net462 Prometheus exporter for OpenTelemetry .NET $(PackageTags);prometheus;metrics core- @@ -27,7 +27,7 @@ - + diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj b/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj index 82732cdb5..26335806a 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj @@ -1,7 +1,7 @@ - net6.0;netcoreapp3.1;netstandard2.1;netstandard2.0 + net6.0;netstandard2.1;netstandard2.0 ASP.NET Core instrumentation for OpenTelemetry .NET $(PackageTags);distributed-tracing;AspNetCore true @@ -28,11 +28,6 @@ - - - - - diff --git a/test/Benchmarks/Benchmarks.csproj b/test/Benchmarks/Benchmarks.csproj index 12e759d9f..f488c7c29 100644 --- a/test/Benchmarks/Benchmarks.csproj +++ b/test/Benchmarks/Benchmarks.csproj @@ -3,7 +3,7 @@ Exe - net6.0;netcoreapp3.1;net462 + net6.0;net462 false diff --git a/test/OpenTelemetry.Exporter.Jaeger.Tests/OpenTelemetry.Exporter.Jaeger.Tests.csproj b/test/OpenTelemetry.Exporter.Jaeger.Tests/OpenTelemetry.Exporter.Jaeger.Tests.csproj index 01ea3dce4..32705554e 100644 --- a/test/OpenTelemetry.Exporter.Jaeger.Tests/OpenTelemetry.Exporter.Jaeger.Tests.csproj +++ b/test/OpenTelemetry.Exporter.Jaeger.Tests/OpenTelemetry.Exporter.Jaeger.Tests.csproj @@ -2,7 +2,7 @@ Unit test project for Jaeger Exporter for OpenTelemetry - net6.0;netcoreapp3.1 + net6.0 $(TargetFrameworks);net462 false diff --git a/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj b/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj index bc0829061..95b2de799 100644 --- a/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj +++ b/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj @@ -2,7 +2,7 @@ - net6.0;netcoreapp3.1 + net6.0 $(TargetFrameworks);net462 $(TARGET_FRAMEWORK) false diff --git a/test/OpenTelemetry.Exporter.Prometheus.Tests/OpenTelemetry.Exporter.Prometheus.Tests.csproj b/test/OpenTelemetry.Exporter.Prometheus.Tests/OpenTelemetry.Exporter.Prometheus.Tests.csproj index e3ff74aba..9d8b6e138 100644 --- a/test/OpenTelemetry.Exporter.Prometheus.Tests/OpenTelemetry.Exporter.Prometheus.Tests.csproj +++ b/test/OpenTelemetry.Exporter.Prometheus.Tests/OpenTelemetry.Exporter.Prometheus.Tests.csproj @@ -2,7 +2,7 @@ Unit test project for Prometheus Exporter for OpenTelemetry - net6.0;netcoreapp3.1 + net6.0 $(TargetFrameworks);net462 false @@ -29,10 +29,6 @@ - - - - diff --git a/test/OpenTelemetry.Exporter.ZPages.Tests/OpenTelemetry.Exporter.ZPages.Tests.csproj b/test/OpenTelemetry.Exporter.ZPages.Tests/OpenTelemetry.Exporter.ZPages.Tests.csproj index 46a3ef710..6fad21338 100644 --- a/test/OpenTelemetry.Exporter.ZPages.Tests/OpenTelemetry.Exporter.ZPages.Tests.csproj +++ b/test/OpenTelemetry.Exporter.ZPages.Tests/OpenTelemetry.Exporter.ZPages.Tests.csproj @@ -2,7 +2,7 @@ - net6.0;netcoreapp3.1 + net6.0 $(TargetFrameworks);net462 false diff --git a/test/OpenTelemetry.Exporter.Zipkin.Tests/OpenTelemetry.Exporter.Zipkin.Tests.csproj b/test/OpenTelemetry.Exporter.Zipkin.Tests/OpenTelemetry.Exporter.Zipkin.Tests.csproj index ffadcae75..84e82aec2 100644 --- a/test/OpenTelemetry.Exporter.Zipkin.Tests/OpenTelemetry.Exporter.Zipkin.Tests.csproj +++ b/test/OpenTelemetry.Exporter.Zipkin.Tests/OpenTelemetry.Exporter.Zipkin.Tests.csproj @@ -2,7 +2,7 @@ Unit test project for Zipkin Exporter for OpenTelemetry - net6.0;netcoreapp3.1 + net6.0 $(TargetFrameworks);net462 false diff --git a/test/OpenTelemetry.Extensions.Hosting.Tests/OpenTelemetry.Extensions.Hosting.Tests.csproj b/test/OpenTelemetry.Extensions.Hosting.Tests/OpenTelemetry.Extensions.Hosting.Tests.csproj index 95b8de049..a17774b6b 100644 --- a/test/OpenTelemetry.Extensions.Hosting.Tests/OpenTelemetry.Extensions.Hosting.Tests.csproj +++ b/test/OpenTelemetry.Extensions.Hosting.Tests/OpenTelemetry.Extensions.Hosting.Tests.csproj @@ -2,7 +2,7 @@ Unit test project for OpenTelemetry .NET Core hosting library - net6.0;netcoreapp3.1 + net6.0 $(TargetFrameworks);net462 diff --git a/test/OpenTelemetry.Extensions.Propagators.Tests/OpenTelemetry.Extensions.Propagators.Tests.csproj b/test/OpenTelemetry.Extensions.Propagators.Tests/OpenTelemetry.Extensions.Propagators.Tests.csproj index 9186da7a9..485184b25 100644 --- a/test/OpenTelemetry.Extensions.Propagators.Tests/OpenTelemetry.Extensions.Propagators.Tests.csproj +++ b/test/OpenTelemetry.Extensions.Propagators.Tests/OpenTelemetry.Extensions.Propagators.Tests.csproj @@ -2,7 +2,7 @@ - net6.0;netcoreapp3.1;net462 + net6.0;net462 $(TARGET_FRAMEWORK) diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/OpenTelemetry.Instrumentation.AspNetCore.Tests.csproj b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/OpenTelemetry.Instrumentation.AspNetCore.Tests.csproj index 003cf214a..b4376a0a3 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/OpenTelemetry.Instrumentation.AspNetCore.Tests.csproj +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/OpenTelemetry.Instrumentation.AspNetCore.Tests.csproj @@ -2,7 +2,7 @@ Unit test project for OpenTelemetry ASP.NET Core instrumentation - net6.0;netcoreapp3.1 + net6.0 diff --git a/test/OpenTelemetry.Instrumentation.Grpc.Tests/OpenTelemetry.Instrumentation.Grpc.Tests.csproj b/test/OpenTelemetry.Instrumentation.Grpc.Tests/OpenTelemetry.Instrumentation.Grpc.Tests.csproj index 119c38e28..f780997f3 100644 --- a/test/OpenTelemetry.Instrumentation.Grpc.Tests/OpenTelemetry.Instrumentation.Grpc.Tests.csproj +++ b/test/OpenTelemetry.Instrumentation.Grpc.Tests/OpenTelemetry.Instrumentation.Grpc.Tests.csproj @@ -2,7 +2,7 @@ Unit test project for OpenTelemetry Grpc for .NET instrumentation - net6.0;netcoreapp3.1 + net6.0 $(TargetFrameworks);net462 diff --git a/test/OpenTelemetry.Instrumentation.Http.Tests/OpenTelemetry.Instrumentation.Http.Tests.csproj b/test/OpenTelemetry.Instrumentation.Http.Tests/OpenTelemetry.Instrumentation.Http.Tests.csproj index a38f1a99c..f5e6fdd3e 100644 --- a/test/OpenTelemetry.Instrumentation.Http.Tests/OpenTelemetry.Instrumentation.Http.Tests.csproj +++ b/test/OpenTelemetry.Instrumentation.Http.Tests/OpenTelemetry.Instrumentation.Http.Tests.csproj @@ -2,7 +2,7 @@ Unit test project for OpenTelemetry HTTP instrumentations - net6.0;netcoreapp3.1 + net6.0 $(TargetFrameworks);net462 diff --git a/test/OpenTelemetry.Instrumentation.SqlClient.Tests/OpenTelemetry.Instrumentation.SqlClient.Tests.csproj b/test/OpenTelemetry.Instrumentation.SqlClient.Tests/OpenTelemetry.Instrumentation.SqlClient.Tests.csproj index 8a9353c97..7f3f224f3 100644 --- a/test/OpenTelemetry.Instrumentation.SqlClient.Tests/OpenTelemetry.Instrumentation.SqlClient.Tests.csproj +++ b/test/OpenTelemetry.Instrumentation.SqlClient.Tests/OpenTelemetry.Instrumentation.SqlClient.Tests.csproj @@ -2,7 +2,7 @@ Unit test project for OpenTelemetry SqlClient instrumentations - net6.0;netcoreapp3.1 + net6.0 $(TargetFrameworks);net462 $(TARGET_FRAMEWORK) diff --git a/test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/OpenTelemetry.Instrumentation.W3cTraceContext.Tests.csproj b/test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/OpenTelemetry.Instrumentation.W3cTraceContext.Tests.csproj index de4eeeff8..d410a3bf3 100644 --- a/test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/OpenTelemetry.Instrumentation.W3cTraceContext.Tests.csproj +++ b/test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/OpenTelemetry.Instrumentation.W3cTraceContext.Tests.csproj @@ -3,7 +3,7 @@ Unit test project for OpenTelemetry ASP.NET Core instrumentation for W3C Trace Context Trace - net6.0;netcoreapp3.1 + net6.0 $(TARGET_FRAMEWORK) @@ -33,10 +33,6 @@ - - - - diff --git a/test/OpenTelemetry.Shims.OpenTracing.Tests/OpenTelemetry.Shims.OpenTracing.Tests.csproj b/test/OpenTelemetry.Shims.OpenTracing.Tests/OpenTelemetry.Shims.OpenTracing.Tests.csproj index 478fc22c7..3367474db 100644 --- a/test/OpenTelemetry.Shims.OpenTracing.Tests/OpenTelemetry.Shims.OpenTracing.Tests.csproj +++ b/test/OpenTelemetry.Shims.OpenTracing.Tests/OpenTelemetry.Shims.OpenTracing.Tests.csproj @@ -2,7 +2,7 @@ Unit test project for OpenTelemetry.Shims.OpenTracing - net6.0;netcoreapp3.1 + net6.0 diff --git a/test/OpenTelemetry.Tests.Stress.Metrics/OpenTelemetry.Tests.Stress.Metrics.csproj b/test/OpenTelemetry.Tests.Stress.Metrics/OpenTelemetry.Tests.Stress.Metrics.csproj index 97d1f4382..467e98c07 100644 --- a/test/OpenTelemetry.Tests.Stress.Metrics/OpenTelemetry.Tests.Stress.Metrics.csproj +++ b/test/OpenTelemetry.Tests.Stress.Metrics/OpenTelemetry.Tests.Stress.Metrics.csproj @@ -3,7 +3,7 @@ Exe - net6.0;netcoreapp3.1;net462 + net6.0;net462 false diff --git a/test/OpenTelemetry.Tests.Stress/OpenTelemetry.Tests.Stress.csproj b/test/OpenTelemetry.Tests.Stress/OpenTelemetry.Tests.Stress.csproj index 31166433f..93013144b 100644 --- a/test/OpenTelemetry.Tests.Stress/OpenTelemetry.Tests.Stress.csproj +++ b/test/OpenTelemetry.Tests.Stress/OpenTelemetry.Tests.Stress.csproj @@ -2,7 +2,7 @@ Exe - net6.0;netcoreapp3.1;net462 + net6.0;net462 false diff --git a/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj b/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj index 8d1c69f4f..199db4b6e 100644 --- a/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj +++ b/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj @@ -2,7 +2,7 @@ Unit test project for OpenTelemetry - net6.0;netcoreapp3.1 + net6.0 $(TargetFrameworks);net462 $(NoWarn),CS0618 diff --git a/test/TestApp.AspNetCore.3.1/AssemblyInfo.cs b/test/TestApp.AspNetCore.3.1/AssemblyInfo.cs deleted file mode 100644 index a7d6eb86a..000000000 --- a/test/TestApp.AspNetCore.3.1/AssemblyInfo.cs +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -using System.Diagnostics.CodeAnalysis; - -[assembly: SuppressMessage( - "StyleCop.CSharp.NamingRules", - "SA1300", - Justification = "Reviewed.", - Scope = "namespaceanddescendants", - Target = "TestApp.AspNetCore._3._1")] diff --git a/test/TestApp.AspNetCore.3.1/CallbackMiddleware.cs b/test/TestApp.AspNetCore.3.1/CallbackMiddleware.cs deleted file mode 100644 index 97023ac6c..000000000 --- a/test/TestApp.AspNetCore.3.1/CallbackMiddleware.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; - -namespace TestApp.AspNetCore._3._1 -{ - public class CallbackMiddleware - { - private readonly CallbackMiddlewareImpl impl; - private readonly RequestDelegate next; - - public CallbackMiddleware(RequestDelegate next, CallbackMiddlewareImpl impl) - { - this.next = next; - this.impl = impl; - } - - public async Task InvokeAsync(HttpContext context) - { - if (this.impl == null || await this.impl.ProcessAsync(context)) - { - await this.next(context); - } - } - - public class CallbackMiddlewareImpl - { - public virtual async Task ProcessAsync(HttpContext context) - { - return await Task.FromResult(true); - } - } - } -} diff --git a/test/TestApp.AspNetCore.3.1/Controllers/ChildActivityController.cs b/test/TestApp.AspNetCore.3.1/Controllers/ChildActivityController.cs deleted file mode 100644 index 911f9bae6..000000000 --- a/test/TestApp.AspNetCore.3.1/Controllers/ChildActivityController.cs +++ /dev/null @@ -1,46 +0,0 @@ -// -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -using System.Collections.Generic; -using System.Diagnostics; -using Microsoft.AspNetCore.Mvc; -using OpenTelemetry; - -namespace TestApp.AspNetCore._3._1.Controllers -{ - public class ChildActivityController : Controller - { - [Route("api/GetChildActivityTraceContext")] - public Dictionary GetChildActivityTraceContext() - { - var result = new Dictionary(); - var activity = new Activity("ActivityInsideHttpRequest"); - activity.Start(); - result["TraceId"] = activity.Context.TraceId.ToString(); - result["ParentSpanId"] = activity.ParentSpanId.ToString(); - result["TraceState"] = activity.Context.TraceState; - activity.Stop(); - return result; - } - - [Route("api/GetChildActivityBaggageContext")] - public IReadOnlyDictionary GetChildActivityBaggageContext() - { - var result = Baggage.Current.GetBaggage(); - return result; - } - } -} diff --git a/test/TestApp.AspNetCore.3.1/Controllers/ForwardController.cs b/test/TestApp.AspNetCore.3.1/Controllers/ForwardController.cs deleted file mode 100644 index 31b98f695..000000000 --- a/test/TestApp.AspNetCore.3.1/Controllers/ForwardController.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -using System.Net.Http; -using System.Text; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Newtonsoft.Json; - -namespace TestApp.AspNetCore._3._1.Controllers -{ - [Route("api/[controller]")] - public class ForwardController : Controller - { - private readonly HttpClient httpClient; - - public ForwardController(HttpClient httpClient) - { - this.httpClient = httpClient; - } - - // POST api/test - [HttpPost] - public async Task Post([FromBody] Data[] data) - { - var result = string.Empty; - - if (data != null) - { - foreach (var argument in data) - { - var request = new HttpRequestMessage(HttpMethod.Post, argument.Url) - { - Content = new StringContent( - JsonConvert.SerializeObject(argument.Arguments), - Encoding.UTF8, - "application/json"), - }; - await this.httpClient.SendAsync(request); - } - } - else - { - result = "done"; - } - - return result; - } - - public class Data - { - [JsonProperty("url")] - public string Url { get; set; } - - [JsonProperty("arguments")] - public Data[] Arguments { get; set; } - } - } -} diff --git a/test/TestApp.AspNetCore.3.1/Controllers/ValuesController.cs b/test/TestApp.AspNetCore.3.1/Controllers/ValuesController.cs deleted file mode 100644 index c7143faec..000000000 --- a/test/TestApp.AspNetCore.3.1/Controllers/ValuesController.cs +++ /dev/null @@ -1,56 +0,0 @@ -// -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -using System.Collections.Generic; -using Microsoft.AspNetCore.Mvc; - -namespace TestApp.AspNetCore._3._1.Controllers -{ - [Route("api/[controller]")] - public class ValuesController : Controller - { - // GET api/values - [HttpGet] - public IEnumerable Get() - { - return new string[] { "value1", "value2" }; - } - - // GET api/values/5 - [HttpGet("{id}")] - public string Get(int id) - { - return "value"; - } - - // POST api/values - [HttpPost] - public void Post([FromBody] string value) - { - } - - // PUT api/values/5 - [HttpPut("{id}")] - public void Put(int id, [FromBody] string value) - { - } - - // DELETE api/values/5 - [HttpDelete("{id}")] - public void Delete(int id) - { - } - } -} diff --git a/test/TestApp.AspNetCore.3.1/Program.cs b/test/TestApp.AspNetCore.3.1/Program.cs deleted file mode 100644 index 44e9398c0..000000000 --- a/test/TestApp.AspNetCore.3.1/Program.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Hosting; - -namespace TestApp.AspNetCore._3._1 -{ - public class Program - { - public static void Main(string[] args) - { - CreateWebHostBuilder(args).Build().Run(); - } - - public static IWebHostBuilder CreateWebHostBuilder(string[] args) => - WebHost.CreateDefaultBuilder(args) - .UseStartup(); - } -} diff --git a/test/TestApp.AspNetCore.3.1/README.md b/test/TestApp.AspNetCore.3.1/README.md deleted file mode 100644 index db05b30cc..000000000 --- a/test/TestApp.AspNetCore.3.1/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# ASP.NET Core Integration Test - -This test app is used for ASP.NET Core integration testing by unit tests. You -could also manually run W3C test suite. - -## Run W3C test suite - -The detailed instruction for the test tool available -[here](https://github.com/w3c/trace-context/tree/master/test). - -* Follow it to install prerequisites and get the test code -* Start this test app with Visual Studio (or `dotnet run`) -* Run test per instruction using `http://localhost:63741/api/forward` endpoint diff --git a/test/TestApp.AspNetCore.3.1/Startup.cs b/test/TestApp.AspNetCore.3.1/Startup.cs deleted file mode 100644 index eaf926c8a..000000000 --- a/test/TestApp.AspNetCore.3.1/Startup.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -using System.Net.Http; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; - -namespace TestApp.AspNetCore._3._1 -{ - public class Startup - { - public Startup(IConfiguration configuration) - { - this.Configuration = configuration; - } - - public IConfiguration Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - services.AddMvc(); - services.AddSingleton(); - services.AddSingleton( - new CallbackMiddleware.CallbackMiddlewareImpl()); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - - app.UseMiddleware(); - app.UseRouting(); - - app.UseAuthorization(); - - app.UseEndpoints(endpoints => - { - endpoints.MapControllers(); - }); - } - } -} diff --git a/test/TestApp.AspNetCore.3.1/TestApp.AspNetCore.3.1.csproj b/test/TestApp.AspNetCore.3.1/TestApp.AspNetCore.3.1.csproj deleted file mode 100644 index 6dae1f7c3..000000000 --- a/test/TestApp.AspNetCore.3.1/TestApp.AspNetCore.3.1.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - netcoreapp3.1 - - - - - - - - - - - - - - - - - - - - diff --git a/test/TestApp.AspNetCore.3.1/appsettings.Development.json b/test/TestApp.AspNetCore.3.1/appsettings.Development.json deleted file mode 100644 index fa8ce71a9..000000000 --- a/test/TestApp.AspNetCore.3.1/appsettings.Development.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "IncludeScopes": false, - "LogLevel": { - "Default": "Debug", - "System": "Information", - "Microsoft": "Information" - } - } -} diff --git a/test/TestApp.AspNetCore.3.1/appsettings.json b/test/TestApp.AspNetCore.3.1/appsettings.json deleted file mode 100644 index 26bb0ac7a..000000000 --- a/test/TestApp.AspNetCore.3.1/appsettings.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "Logging": { - "IncludeScopes": false, - "Debug": { - "LogLevel": { - "Default": "Warning" - } - }, - "Console": { - "LogLevel": { - "Default": "Warning" - } - } - } -}