-
-
Notifications
You must be signed in to change notification settings - Fork 251
Don't initialise the Sdk from logging integrations #5245
Copy link
Copy link
Open
Labels
.NETPull requests that update .net codePull requests that update .net codeBreaking ChangeBinary/Source/Behavioral Breaking Changes.Binary/Source/Behavioral Breaking Changes.LogsNext MajorChanges scheduled for the next Major release.Changes scheduled for the next Major release.Task
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
.NETPull requests that update .net codePull requests that update .net codeBreaking ChangeBinary/Source/Behavioral Breaking Changes.Binary/Source/Behavioral Breaking Changes.LogsNext MajorChanges scheduled for the next Major release.Changes scheduled for the next Major release.Task
Projects
- StatusShow more project fieldsNo status
Description
This and this and this are just three examples in the last two weeks of many many conversations we've had about this issue over the years. It's very confusing to SDK users and even trips us up as maintainers on occasion.
Currently you can initialise Sentry:
The trouble is that the logging integrations are frequently used in conjunction with one of the first two types and then you have to tell the logging integration: Yes do send logs to Sentry, but no do not initialise the Sentry SDK (it's already been initialised).
Initialisation via the logging integrations was added so that if someone is only using the logging integration (e.g. in a Console app) they don't need to call SentrySdk.Init... it saves them a method call at startup.
Given the amount of confusion this causes, I think we should consider changing this so the logging integrations only configure the sink or whatever and the SDK always has to be initialised separately via 1 or 2.
Issues
Lot's of change so we're gonna drip feed it in multiple PRs