Skip to content

Commit a55d861

Browse files
committed
Fixing nits from the code review
1 parent 1d018e4 commit a55d861

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Serilog.Sinks.OpenTelemetry/OpenTelemetryLoggerConfigurationExtensions.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ public static LoggerConfiguration OpenTelemetry(
5454
Action<BatchedOpenTelemetrySinkOptions> configure,
5555
bool ignoreEnvironment = false)
5656
{
57-
if (loggerSinkConfiguration == null) throw new ArgumentNullException(nameof(loggerSinkConfiguration));
58-
5957
return loggerSinkConfiguration.OpenTelemetry(
6058
configure,
6159
ignoreEnvironment ? null : Environment.GetEnvironmentVariable
@@ -70,12 +68,13 @@ public static LoggerConfiguration OpenTelemetry(
7068
/// </param>
7169
/// <param name="configure">The configuration callback.</param>
7270
/// <param name="getConfigurationVariable">Provides <see href="https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/">OTLP Exporter
73-
/// Configuration options</see> that will override values in configuration</param>
71+
/// Configuration variables</see> that will override other options when present.</param>
7472
public static LoggerConfiguration OpenTelemetry(
7573
this LoggerSinkConfiguration loggerSinkConfiguration,
7674
Action<BatchedOpenTelemetrySinkOptions> configure,
7775
Func<string, string?>? getConfigurationVariable)
7876
{
77+
if (loggerSinkConfiguration == null) throw new ArgumentNullException(nameof(loggerSinkConfiguration));
7978
if (configure == null) throw new ArgumentNullException(nameof(configure));
8079

8180
var options = new BatchedOpenTelemetrySinkOptions();

0 commit comments

Comments
 (0)