fix: return early from AddSentryOtlpExporter when DSN is the disable-SDK sentinel#5247
Merged
Merged
@sentry/warden / warden
completed
May 20, 2026 in 1m 56s
1 issue
Low
`DidNotReceive().AddInstrumentation(Arg.Any>())` is vacuously true and never verifies the exporter is skipped - `test/Sentry.OpenTelemetry.Exporter.Tests/SentryTracerProviderBuilderExtensionsTests.cs:35`
TracerProviderBuilder.AddInstrumentation is a generic method; NSubstitute only matches AddInstrumentation<object>, never the actual instantiation (AddInstrumentation<BaseProcessor<Activity>>) that AddOtlpExporter produces, so this assertion always passes regardless of whether the exporter was configured. Use DidNotReceiveWithAnyArgs().AddInstrumentation<object>(default!) or assert on AddProcessor to make the check meaningful.
4 skills analyzed
| Skill | Findings | Duration | Cost |
|---|---|---|---|
| security-review | 0 | 1.9s | $0.04 |
| code-review | 0 | 9.8s | $0.05 |
| find-bugs | 1 | 1m 39s | $0.27 |
| gha-security-review | 0 | 3.0s | $0.02 |
⏱ 1m 54s · 146.7k in / 7.0k out · $0.39
Loading