Sentry.Serilog throws if a DSN is not passed even though SentrySdk should already be initialized #2866
Closed
Description
opened on Nov 19, 2023
Package
Sentry
.NET Flavor
.NET
.NET Version
8.0.0
OS
Any (not platform specific)
SDK Version
4.0.0-beta.1
Self-Hosted Sentry Version
No response
Steps to Reproduce
- Add Sentry.Serilog and Sentry.AspNetCore to the app
- Init Sentry with `builder.ConfigureWebHostDefaults(webBuilder => webBuilder.UseSentry(...));```
- Try adding serilog with
builder.Services.CongureLogging()
- Use
.WriteTo.Sentry()
with no arguments
Expected Result
The Serilog .WriteTo.Sentry()
call shouldn't throw if SentrySdk is already initialized in the HostBuilder with .UseSentry()
Actual Result
Throws during startup with ArgumentNullException
Metadata
Assignees
Labels
Type
Projects
Status
No status
Status
Done
Activity