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

feat(core): Extend AsyncContextStrategy to allow reuse of existing context #7778

Merged
merged 4 commits into from
Apr 6, 2023

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Apr 6, 2023

This PR extends runWithAsyncContext on AsyncContextStrategy to allow reuse of existing context rather than creating a new sub-context.

I've also added more jsdocs since the functions are getting more complex.

@timfish
Copy link
Collaborator Author

timfish commented Apr 6, 2023

Should we maybe make the arguments after the callback into an object to allow for non-breaking changes later?

@AbhiPrasad
Copy link
Member

Should we maybe make the arguments after the callback into an object to allow for non-breaking changes later?

Good idea, let's do it!

@AbhiPrasad AbhiPrasad enabled auto-merge (squash) April 6, 2023 15:44
@timfish
Copy link
Collaborator Author

timfish commented Apr 6, 2023

Oops, this is currently incorrect.

If we want to reuse an existing domain/context, we can just call the callback

@AbhiPrasad AbhiPrasad merged commit 715876b into getsentry:develop Apr 6, 2023
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

Successfully merging this pull request may close these issues.

2 participants