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

Supporting concurrency: Hubs vs Scopes #42

Open
jalaziz opened this issue Oct 7, 2023 · 0 comments
Open

Supporting concurrency: Hubs vs Scopes #42

jalaziz opened this issue Oct 7, 2023 · 0 comments

Comments

@jalaziz
Copy link

jalaziz commented Oct 7, 2023

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.

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

No branches or pull requests

1 participant