Skip to content

Commit 2d06c96

Browse files
committed
chore; Explain the reason for the disabled warning
1 parent 706ce5b commit 2d06c96

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/OpenTelemetry/Metrics/Reader/PeriodicExportingMetricReader.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ protected override void Dispose(bool disposing)
103103
base.Dispose(disposing);
104104
}
105105

106+
// The pragma is required by the fact that this method is compiled on both .NET Framework and .NET Core, and the CA1859 warning is only relevant for .NET Framework.
107+
// The warning suggests changing the return type to PeriodicExportingMetricReaderThreadWorker for improved performance, but we want to keep the method signature consistent across platforms.
106108
#pragma warning disable CA1859 // Change return type of method 'CreateWorker' from 'PeriodicExportingMetricReaderWorker' to 'PeriodicExportingMetricReaderThreadWorker' for improved performance
109+
107110
private PeriodicExportingMetricReaderWorker CreateWorker()
108111
#pragma warning restore CA1859
109112
{

0 commit comments

Comments
 (0)