sentry-dotnet
sentry-dotnet copied to clipboard
Obsolete unnecessary APIs
This issue will keep track of APIs that we want to remove in the next major release (4.0.0). Will keep this open and update as we find them. See https://github.com/getsentry/sentry-dotnet/blob/main/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt for list from the main Sentry project.
Does scope.Platform qualify? https://github.com/getsentry/sentry-dotnet/issues/1590
Does scope.Platform qualify? #1590
Yes, I think so.
Another - Contexts didn't need to inherit from ConcurrentDictionary<string, object>. It would be better to inherit from IDictionary<string, object> instead, and encapsulate it instead. See comments : https://github.com/getsentry/sentry-dotnet/issues/1332#issuecomment-1251080640
Other good candidates: WIthScope API. It was reverted from being marked obsolete due to what I believe was a misunderstanding, since it's broken on global mode. And a new one with async was introduced, Another one worth considering making obsolete is the original; ConfigureScopeAsync, but this is less obvious:
That's because the SDK avoid calling callbacks if disabled as an optimization. While people put their core business logic inside our callbacks. So the async call can be spared if the sole reason to run it is to fetch data to set to the scope. But WithScope has logic that happens inside and folks expect to always run regardless of Sentry being configured.
Local scope works in global mode and local mode and is advised instead.
We now have separate issues for each of the items mentioned here and we already have the feat/4.0.0 pull request as an umbrella to sit across these (plus all the others)... so closing this issue as redundant.