Skip to content

Commit

Permalink
Mark internal and private classes sealed (#1236)
Browse files Browse the repository at this point in the history
  • Loading branch information
utpilla authored Jun 14, 2023
1 parent 06b9a28 commit dbfeaea
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ public void Dispose()
}
};

private class SerializationDataForScopes
private sealed class SerializationDataForScopes
{
public bool HasEnvProperties;
public ushort EnvPropertiesCount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ private static string GetSanitizedCategoryName(string categoryName)
}
};

private class SerializationDataForScopes
private sealed class SerializationDataForScopes
{
public byte HasEnvProperties;
public byte PartCFieldsCountFromState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ internal static void RestoreContextIfNeeded(HttpContext context)
}
}

internal class ContextHolder
internal sealed class ContextHolder
{
public Activity Activity;
public object Baggage;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenTelemetry.Instrumentation.AspNet/AspNetMetrics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace OpenTelemetry.Instrumentation.AspNet;
/// <summary>
/// Asp.Net Requests instrumentation.
/// </summary>
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ namespace OpenTelemetry.Instrumentation.Process;
/// <summary>
/// Options to define the process metrics.
/// </summary>
internal class ProcessInstrumentationOptions
internal sealed class ProcessInstrumentationOptions
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace OpenTelemetry.Instrumentation.Runtime;
/// <summary>
/// .NET runtime instrumentation.
/// </summary>
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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace OpenTelemetry.PersistentStorage.FileSystem;
/// <summary>
/// Tracks the available storage in a specified directory.
/// </summary>
internal class DirectorySizeTracker
internal sealed class DirectorySizeTracker
{
private readonly long maxSizeInBytes;
private readonly string path;
Expand Down

0 comments on commit dbfeaea

Please sign in to comment.