From 2916b2de80522d4b1cafe353b3fda3fd629ddb00 Mon Sep 17 00:00:00 2001
From: Utkarsh Umesan Pillai <66651184+utpilla@users.noreply.github.com>
Date: Thu, 15 Jun 2023 13:51:59 -0700
Subject: [PATCH] Move shared utility files outside of Sdk project (#4592)
---
OpenTelemetry.sln | 15 +++++++++++++++
build/Common.props | 12 ++++++------
.../ActivityInstrumentationHelper.cs | 0
.../DiagnosticSourceListener.cs | 0
.../DiagnosticSourceSubscriber.cs | 0
.../InstrumentationEventSource.cs | 0
.../ListenerHandler.cs | 0
.../PropertyFetcher.cs | 0
test/Benchmarks/Benchmarks.csproj | 7 +++++++
.../AotCompatibilityTests.cs | 2 +-
.../OpenTelemetry.Tests.csproj | 7 +++++++
11 files changed, 36 insertions(+), 7 deletions(-)
rename src/{OpenTelemetry/Internal => Shared}/ActivityInstrumentationHelper.cs (100%)
rename src/{OpenTelemetry => Shared}/DiagnosticSourceInstrumentation/DiagnosticSourceListener.cs (100%)
rename src/{OpenTelemetry => Shared}/DiagnosticSourceInstrumentation/DiagnosticSourceSubscriber.cs (100%)
rename src/{OpenTelemetry => Shared}/DiagnosticSourceInstrumentation/InstrumentationEventSource.cs (100%)
rename src/{OpenTelemetry => Shared}/DiagnosticSourceInstrumentation/ListenerHandler.cs (100%)
rename src/{OpenTelemetry => Shared}/DiagnosticSourceInstrumentation/PropertyFetcher.cs (100%)
diff --git a/OpenTelemetry.sln b/OpenTelemetry.sln
index c82c90d8c..6685c16e4 100644
--- a/OpenTelemetry.sln
+++ b/OpenTelemetry.sln
@@ -268,6 +268,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.AotCompatibil
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "links-sampler", "docs\trace\links-based-sampler\links-sampler.csproj", "{62AF4BD3-DCAE-4D44-AA5B-991C1071166B}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{A49299FB-C5CD-4E0E-B7E1-B7867BBD67CC}"
+ ProjectSection(SolutionItems) = preProject
+ src\Shared\ActivityInstrumentationHelper.cs = src\Shared\ActivityInstrumentationHelper.cs
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DiagnosticSourceInstrumentation", "DiagnosticSourceInstrumentation", "{28F3EC79-660C-4659-8B73-F90DC1173316}"
+ ProjectSection(SolutionItems) = preProject
+ src\Shared\DiagnosticSourceInstrumentation\DiagnosticSourceListener.cs = src\Shared\DiagnosticSourceInstrumentation\DiagnosticSourceListener.cs
+ src\Shared\DiagnosticSourceInstrumentation\DiagnosticSourceSubscriber.cs = src\Shared\DiagnosticSourceInstrumentation\DiagnosticSourceSubscriber.cs
+ src\Shared\DiagnosticSourceInstrumentation\InstrumentationEventSource.cs = src\Shared\DiagnosticSourceInstrumentation\InstrumentationEventSource.cs
+ src\Shared\DiagnosticSourceInstrumentation\ListenerHandler.cs = src\Shared\DiagnosticSourceInstrumentation\ListenerHandler.cs
+ src\Shared\DiagnosticSourceInstrumentation\PropertyFetcher.cs = src\Shared\DiagnosticSourceInstrumentation\PropertyFetcher.cs
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -609,6 +623,7 @@ Global
{800DB925-6014-4136-AC01-3356CF7CADD3} = {5B7FB835-3FFF-4BC2-99C5-A5B5FAE3C818}
{9C99621C-343E-479C-A943-332DB6129B71} = {5B7FB835-3FFF-4BC2-99C5-A5B5FAE3C818}
{62AF4BD3-DCAE-4D44-AA5B-991C1071166B} = {5B7FB835-3FFF-4BC2-99C5-A5B5FAE3C818}
+ {28F3EC79-660C-4659-8B73-F90DC1173316} = {A49299FB-C5CD-4E0E-B7E1-B7867BBD67CC}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {55639B5C-0770-4A22-AB56-859604650521}
diff --git a/build/Common.props b/build/Common.props
index e6eb755ac..19c0843e9 100644
--- a/build/Common.props
+++ b/build/Common.props
@@ -45,12 +45,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/src/OpenTelemetry/Internal/ActivityInstrumentationHelper.cs b/src/Shared/ActivityInstrumentationHelper.cs
similarity index 100%
rename from src/OpenTelemetry/Internal/ActivityInstrumentationHelper.cs
rename to src/Shared/ActivityInstrumentationHelper.cs
diff --git a/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceListener.cs b/src/Shared/DiagnosticSourceInstrumentation/DiagnosticSourceListener.cs
similarity index 100%
rename from src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceListener.cs
rename to src/Shared/DiagnosticSourceInstrumentation/DiagnosticSourceListener.cs
diff --git a/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceSubscriber.cs b/src/Shared/DiagnosticSourceInstrumentation/DiagnosticSourceSubscriber.cs
similarity index 100%
rename from src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceSubscriber.cs
rename to src/Shared/DiagnosticSourceInstrumentation/DiagnosticSourceSubscriber.cs
diff --git a/src/OpenTelemetry/DiagnosticSourceInstrumentation/InstrumentationEventSource.cs b/src/Shared/DiagnosticSourceInstrumentation/InstrumentationEventSource.cs
similarity index 100%
rename from src/OpenTelemetry/DiagnosticSourceInstrumentation/InstrumentationEventSource.cs
rename to src/Shared/DiagnosticSourceInstrumentation/InstrumentationEventSource.cs
diff --git a/src/OpenTelemetry/DiagnosticSourceInstrumentation/ListenerHandler.cs b/src/Shared/DiagnosticSourceInstrumentation/ListenerHandler.cs
similarity index 100%
rename from src/OpenTelemetry/DiagnosticSourceInstrumentation/ListenerHandler.cs
rename to src/Shared/DiagnosticSourceInstrumentation/ListenerHandler.cs
diff --git a/src/OpenTelemetry/DiagnosticSourceInstrumentation/PropertyFetcher.cs b/src/Shared/DiagnosticSourceInstrumentation/PropertyFetcher.cs
similarity index 100%
rename from src/OpenTelemetry/DiagnosticSourceInstrumentation/PropertyFetcher.cs
rename to src/Shared/DiagnosticSourceInstrumentation/PropertyFetcher.cs
diff --git a/test/Benchmarks/Benchmarks.csproj b/test/Benchmarks/Benchmarks.csproj
index 1409b72a5..da72459fe 100644
--- a/test/Benchmarks/Benchmarks.csproj
+++ b/test/Benchmarks/Benchmarks.csproj
@@ -25,6 +25,13 @@
+
+
+
+
+
+
+
diff --git a/test/OpenTelemetry.AotCompatibility.Tests/AotCompatibilityTests.cs b/test/OpenTelemetry.AotCompatibility.Tests/AotCompatibilityTests.cs
index 4db5b9033..4c44b7384 100644
--- a/test/OpenTelemetry.AotCompatibility.Tests/AotCompatibilityTests.cs
+++ b/test/OpenTelemetry.AotCompatibility.Tests/AotCompatibilityTests.cs
@@ -85,7 +85,7 @@ namespace OpenTelemetry.AotCompatibility.Tests
Assert.True(process.ExitCode == 0, "Publishing the AotCompatibility app failed. See test output for more details.");
var warnings = expectedOutput.ToString().Split('\n', '\r').Where(line => line.Contains("warning IL"));
- Assert.Equal(40, warnings.Count());
+ Assert.Equal(37, warnings.Count());
}
}
}
diff --git a/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj b/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj
index 481ace83c..4c67f8f2f 100644
--- a/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj
+++ b/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj
@@ -19,6 +19,13 @@
+
+
+
+
+
+
+