Skip to content

Supporting concurrency: Hubs vs ScopesΒ #42

@jalaziz

Description

@jalaziz

While inspecting this package, I realized that it may not fully support the recommended way to handle concurrency with Sentry.

In particular, Sentry recommends cloning Hubs in goroutines. Also, Sentry leverages Hub cloning for most request-based integrations.

On the other hand, this package seems to leverage fetching and setting scopes and interacts directly with the client rather than the hub.

I'm still trying to wrap my head around all this, but would it be more appropriate to support setting and fetching hubs in addition to or instead of manipulating scopes as fields?

Looking at the sentry code, cloning a hub seems to simply clone the scope, so it's not functionally different, but it may be nice to have a hub-compatible API so that it aligns with the Sentry docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions