Skip to content

Chore: Refactor HubExtensions and SentrySdk #2490

@jamescrosswell

Description

@jamescrosswell

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Waiting for: Product Owner

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions