Skip to content

Commit

Permalink
remove redundant ?? string.Empty in GetSampler
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Jan 20, 2025
1 parent dcdaaae commit 791bb66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/OpenTelemetry/Trace/TracerProviderSdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ private static Sampler GetSampler(IConfiguration configuration, Sampler? stateSa
}

default:
OpenTelemetrySdkEventSource.Log.TracesSamplerConfigInvalid(configValue ?? string.Empty);
OpenTelemetrySdkEventSource.Log.TracesSamplerConfigInvalid(configValue);

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (ubuntu-22.04, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (ubuntu-22.04, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (ubuntu-22.04, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (ubuntu-22.04, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (ubuntu-22.04, net8.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (ubuntu-22.04, net8.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (ubuntu-22.04, net8.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (ubuntu-22.04, net8.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (ubuntu-22.04, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (ubuntu-22.04, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (ubuntu-22.04, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (ubuntu-22.04, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (ubuntu-22.04, net8.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (ubuntu-22.04, net8.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (ubuntu-22.04, net8.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (ubuntu-22.04, net8.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (otel-linux-arm64, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (otel-linux-arm64, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (otel-linux-arm64, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (otel-linux-arm64, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / validate-packages / run-package-validation-experimental

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / validate-packages / run-package-validation-experimental

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (otel-linux-arm64, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (otel-linux-arm64, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (otel-linux-arm64, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (otel-linux-arm64, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / concurrency-tests / run-concurrency-tests (windows-latest, net8.0, OpenTelemetry.Tests)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / concurrency-tests / run-concurrency-tests (windows-latest, net8.0, OpenTelemetry.Tests)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / validate-packages / run-package-validation-stable

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / validate-packages / run-package-validation-stable

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / concurrency-tests / run-concurrency-tests (windows-latest, net8.0, OpenTelemetry.Api.Tests)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / concurrency-tests / run-concurrency-tests (windows-latest, net8.0, OpenTelemetry.Api.Tests)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (windows-latest, net462)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (windows-latest, net462)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (windows-latest, net462)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (windows-latest, net462)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (windows-latest, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (windows-latest, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (windows-latest, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (windows-latest, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (windows-latest, net8.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (windows-latest, net8.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (windows-latest, net8.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (windows-latest, net8.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (windows-latest, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (windows-latest, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (windows-latest, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (windows-latest, net9.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (windows-latest, net462)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (windows-latest, net462)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (windows-latest, net462)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-experimental / build-test (windows-latest, net462)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (windows-latest, net8.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (windows-latest, net8.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (windows-latest, net8.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.

Check failure on line 450 in src/OpenTelemetry/Trace/TracerProviderSdk.cs

View workflow job for this annotation

GitHub Actions / build-test-project-stable / build-test (windows-latest, net8.0)

Possible null reference argument for parameter 'configValue' in 'void OpenTelemetrySdkEventSource.TracesSamplerConfigInvalid(string configValue)'.
break;
}

Expand Down

0 comments on commit 791bb66

Please sign in to comment.