sentry-dotnet
sentry-dotnet copied to clipboard
Make it easier to configure Logging with other integrations
It's not obvious to SDK users how they should be configuring Sentry.SeriLog and other logging integrations in conjunction with Sentry.AspNetCore, Sentry.Maui etc. In particular, it's easy for people to make the mistake of using one of the overloads to initialise logging that accepts a DSN (effectively initialising the Sentry SDK twice, with potentially conflicting/contradictory settings).
For example, see:
- https://github.com/getsentry/sentry-dotnet/issues/4589#issuecomment-3364189440
We should find a way to prevent this. One potential solution might be an analyzer.
Also update the sample Sentry.Samples.AspNetCore.Serilog.