sentry-dotnet icon indicating copy to clipboard operation
sentry-dotnet copied to clipboard

Make it easier to configure Logging with other integrations

Open jamescrosswell opened this issue 3 months ago • 2 comments

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.

jamescrosswell avatar Oct 06 '25 02:10 jamescrosswell

NET-480

linear[bot] avatar Oct 06 '25 02:10 linear[bot]

Also update the sample Sentry.Samples.AspNetCore.Serilog.

Flash0ver avatar Nov 28 '25 14:11 Flash0ver