-
Notifications
You must be signed in to change notification settings - Fork 2
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
Tagging API Calls #40
Conversation
What happens if we enter a Supergood context multiple times? Supergood.init({ tags: { workload: 'backend' } });
Supergood.withContext({ trip: 'in-n-out' }, async () => {
await Supergood.withContext({ task: 'drive-there' }, async () => {
await driveThereHttp();
});
await Supergood.withContext({ task: 'order' }, async () => {
await orderHttp();
});
}) I think you'd want to merge, but you may have to manage that behavior specifically. |
Good call. I just fixed this and added some tests. |
One other nit; |
Yeah it's a fair nit, fixing now! |
Description: Tags are able to be passed into the initialization function, or within a context, and then applied to a set of API calls.
There are currently two ways to tag API calls: