Commit 42f6ca6
fix: return early from AddSentryOtlpExporter when DSN is the disable-SDK sentinel (#5247)
When the caller passes `SentryConstants.DisableSdkDsnValue` (empty string) to
`AddSentryOtlpExporter`, we now short-circuit before attempting to parse it as
a real DSN. This prevents a spurious `ArgumentException` when the SDK is
intentionally disabled.
Fixes #5246
Signed-off-by: James Crosswell <james.crosswell@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent b682a76 commit 42f6ca6
2 files changed
Lines changed: 19 additions & 1 deletion
File tree
- src/Sentry.OpenTelemetry.Exporter
- test/Sentry.OpenTelemetry.Exporter.Tests
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
25 | 38 | | |
26 | 39 | | |
27 | 40 | | |
| |||
0 commit comments