Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Refactor HubExtensions and SentrySdk #2490

Closed
jamescrosswell opened this issue Jul 17, 2023 · 1 comment
Closed

Chore: Refactor HubExtensions and SentrySdk #2490

jamescrosswell opened this issue Jul 17, 2023 · 1 comment

Comments

@jamescrosswell
Copy link
Collaborator

Summary

See conversation thread here.

The HubAdapter passes it's work to SentrySdk.CurrentHub (a static instance of Hub). HubExtensions and SentrySDK both employ switch expression in multiple locations to determine whether to call a real internal implementation of IHubEx or the nearest equivalent public implementation of something from IHub (implicitly on DisabledHub, since it's the only hub that implements IHub but not IHubEx). That could probably be achieved more simply by having DisabledHub implemented IHubEx and then do the same (return default or whatever else the extension methods are doing).

@bitsandfoxes
Copy link
Contributor

With getsentry/rfcs#122 on the horizon we can close this as it won't likely happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Archived in project
Development

No branches or pull requests

3 participants