Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Sentry.Serilog throws with a disabled DSN #2883

Merged
merged 6 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Fixes

- Android native symbol upload ([#2876](https://github.com/getsentry/sentry-dotnet/pull/2876))
- Sentry.Serilog no longer throws if a disabled DSN is provided when initializing Sentry via the Serilog integration ([#2883](https://github.com/getsentry/sentry-dotnet/pull/2883))

## 4.0.0-beta.1

Expand Down
3 changes: 2 additions & 1 deletion src/Sentry.Serilog/SentrySinkExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// ReSharper disable once CheckNamespace - Discoverability

namespace Serilog;

/// <summary>
Expand Down Expand Up @@ -189,7 +190,7 @@ public static void ConfigureSentrySerilogOptions(
bool? initializeSdk = null,
Dictionary<string, string>? defaultTags = null)
{
if (!string.IsNullOrWhiteSpace(dsn))
if (dsn is not null)
{
sentrySerilogOptions.Dsn = dsn;
}
Expand Down