diff --git a/src/OpenTelemetry.Exporter.Geneva/MsgPackExporter/MsgPackLogExporter.cs b/src/OpenTelemetry.Exporter.Geneva/MsgPackExporter/MsgPackLogExporter.cs index cb09ae3862..be37e18b1e 100644 --- a/src/OpenTelemetry.Exporter.Geneva/MsgPackExporter/MsgPackLogExporter.cs +++ b/src/OpenTelemetry.Exporter.Geneva/MsgPackExporter/MsgPackLogExporter.cs @@ -504,7 +504,7 @@ public void Dispose() } }; - private class SerializationDataForScopes + private sealed class SerializationDataForScopes { public bool HasEnvProperties; public ushort EnvPropertiesCount; diff --git a/src/OpenTelemetry.Exporter.Geneva/TLDExporter/TldLogExporter.cs b/src/OpenTelemetry.Exporter.Geneva/TLDExporter/TldLogExporter.cs index 2842458d55..19fda3648d 100644 --- a/src/OpenTelemetry.Exporter.Geneva/TLDExporter/TldLogExporter.cs +++ b/src/OpenTelemetry.Exporter.Geneva/TLDExporter/TldLogExporter.cs @@ -530,7 +530,7 @@ private static string GetSanitizedCategoryName(string categoryName) } }; - private class SerializationDataForScopes + private sealed class SerializationDataForScopes { public byte HasEnvProperties; public byte PartCFieldsCountFromState; diff --git a/src/OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule/ActivityHelper.cs b/src/OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule/ActivityHelper.cs index 5c510f7c44..7ef463ec8d 100644 --- a/src/OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule/ActivityHelper.cs +++ b/src/OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule/ActivityHelper.cs @@ -215,7 +215,7 @@ internal static void RestoreContextIfNeeded(HttpContext context) } } - internal class ContextHolder + internal sealed class ContextHolder { public Activity Activity; public object Baggage; diff --git a/src/OpenTelemetry.Instrumentation.AspNet/AspNetMetrics.cs b/src/OpenTelemetry.Instrumentation.AspNet/AspNetMetrics.cs index 53fa1720da..60d9f51a02 100644 --- a/src/OpenTelemetry.Instrumentation.AspNet/AspNetMetrics.cs +++ b/src/OpenTelemetry.Instrumentation.AspNet/AspNetMetrics.cs @@ -24,7 +24,7 @@ namespace OpenTelemetry.Instrumentation.AspNet; /// /// Asp.Net Requests instrumentation. /// -internal class AspNetMetrics : IDisposable +internal sealed class AspNetMetrics : IDisposable { internal static readonly AssemblyName AssemblyName = typeof(HttpInMetricsListener).Assembly.GetName(); internal static readonly string InstrumentationName = AssemblyName.Name; diff --git a/src/OpenTelemetry.Instrumentation.Process/ProcessInstrumentationOptions.cs b/src/OpenTelemetry.Instrumentation.Process/ProcessInstrumentationOptions.cs index f5d5fd1a7a..2f168f0e07 100644 --- a/src/OpenTelemetry.Instrumentation.Process/ProcessInstrumentationOptions.cs +++ b/src/OpenTelemetry.Instrumentation.Process/ProcessInstrumentationOptions.cs @@ -19,6 +19,6 @@ namespace OpenTelemetry.Instrumentation.Process; /// /// Options to define the process metrics. /// -internal class ProcessInstrumentationOptions +internal sealed class ProcessInstrumentationOptions { } diff --git a/src/OpenTelemetry.Instrumentation.Runtime/RuntimeMetrics.cs b/src/OpenTelemetry.Instrumentation.Runtime/RuntimeMetrics.cs index 68ac758b88..eb730de55b 100644 --- a/src/OpenTelemetry.Instrumentation.Runtime/RuntimeMetrics.cs +++ b/src/OpenTelemetry.Instrumentation.Runtime/RuntimeMetrics.cs @@ -28,7 +28,7 @@ namespace OpenTelemetry.Instrumentation.Runtime; /// /// .NET runtime instrumentation. /// -internal class RuntimeMetrics +internal sealed class RuntimeMetrics { internal static readonly AssemblyName AssemblyName = typeof(RuntimeMetrics).Assembly.GetName(); internal static readonly Meter MeterInstance = new(AssemblyName.Name!, AssemblyName.Version?.ToString()); diff --git a/src/OpenTelemetry.PersistentStorage.FileSystem/DirectorySizeTracker.cs b/src/OpenTelemetry.PersistentStorage.FileSystem/DirectorySizeTracker.cs index 7d942ec7e9..034b108bb1 100644 --- a/src/OpenTelemetry.PersistentStorage.FileSystem/DirectorySizeTracker.cs +++ b/src/OpenTelemetry.PersistentStorage.FileSystem/DirectorySizeTracker.cs @@ -23,7 +23,7 @@ namespace OpenTelemetry.PersistentStorage.FileSystem; /// /// Tracks the available storage in a specified directory. /// -internal class DirectorySizeTracker +internal sealed class DirectorySizeTracker { private readonly long maxSizeInBytes; private readonly string path;