Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark internal classes sealed #37724

Merged
merged 2 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Azure.Monitor.OpenTelemetry.Exporter
{
internal class AzureMonitorLogExporter : BaseExporter<LogRecord>
internal sealed class AzureMonitorLogExporter : BaseExporter<LogRecord>
{
private readonly ITransmitter _transmitter;
private readonly string _instrumentationKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Azure.Monitor.OpenTelemetry.Exporter
{
internal class AzureMonitorMetricExporter : BaseExporter<Metric>
internal sealed class AzureMonitorMetricExporter : BaseExporter<Metric>
{
private readonly ITransmitter _transmitter;
private readonly string _instrumentationKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Azure.Monitor.OpenTelemetry.Exporter
{
internal class AzureMonitorTraceExporter : BaseExporter<Activity>
internal sealed class AzureMonitorTraceExporter : BaseExporter<Activity>
{
private readonly ITransmitter _transmitter;
private readonly string _instrumentationKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Azure.Monitor.OpenTelemetry.Exporter.Internals;

internal class AksResourceProcessor
internal sealed class AksResourceProcessor
{
private static readonly Dictionary<string, Action<AksResourceProcessor, string>> s_propertySetters = new(7)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Azure.Monitor.OpenTelemetry.Exporter.Internals;
/// Sample configurable for OpenTelemetry exporters for compatibility
/// with Application Insight SDKs.
/// </summary>
internal class ApplicationInsightsSampler : Sampler
internal sealed class ApplicationInsightsSampler : Sampler
{
private static readonly SamplingResult RecordOnlySamplingResult = new(SamplingDecision.RecordOnly);
private readonly SamplingResult recordAndSampleSamplingResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Azure.Monitor.OpenTelemetry.Exporter.Internals
{
internal class AzureMonitorResource
internal sealed class AzureMonitorResource
{
internal string? RoleName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Azure.Monitor.OpenTelemetry.Exporter.Internals
{
internal class LogsHelper
internal static class LogsHelper
{
private const int Version = 2;
private static readonly ConcurrentDictionary<int, string> s_depthCache = new ConcurrentDictionary<int, string>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Azure.Monitor.OpenTelemetry.Exporter.Internals
{
internal class MetricHelper
internal static class MetricHelper
{
private const int Version = 2;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Azure.Monitor.OpenTelemetry.Exporter.Internals
{
internal class NDJsonWriter : IDisposable
internal sealed class NDJsonWriter : IDisposable
{
private static readonly byte[] s_separator = { (byte)'\n' };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Azure.Monitor.OpenTelemetry.Exporter.Internals
{
internal class ResponseStatusCodes
internal static class ResponseStatusCodes
{
public const int Success = 200;
public const int PartialSuccess = 206;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Azure.Monitor.OpenTelemetry.Exporter.Internals
{
internal class StandardMetricConstants
internal static class StandardMetricConstants
{
internal const string StandardMetricMeterName = "StandardMetricMeter";
internal const string RequestDurationInstrumentName = "RequestDurationStandardMetric";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Azure.Monitor.OpenTelemetry.Exporter.Internals
{
internal class StandardMetricsExtractionProcessor : BaseProcessor<Activity>
internal sealed class StandardMetricsExtractionProcessor : BaseProcessor<Activity>
{
private bool _disposed;
private AzureMonitorResource? _resource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Azure.Monitor.OpenTelemetry.Exporter.Internals
/// This factory should ensure that only one instance of the Transmitter is created for
/// any unique connection string.
/// </summary>
internal class TransmitterFactory
internal sealed class TransmitterFactory
{
public static readonly TransmitterFactory Instance = new();
public static readonly IPlatform platform = new DefaultPlatform();
Expand Down