-
-
Notifications
You must be signed in to change notification settings - Fork 233
Consider not initialising 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.TaskWaiting for: Product Owner
Milestone
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.TaskWaiting for: Product Owner
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Waiting for: Product Owner
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.