Nested withScope with async functions


#1

I believe nested withScopes work like closures and a new cloned scope is added to the stack with every call. Would this still work when calling it with async functions? Eg:

Sentry.withScope(async (scope) => {
  scope.setExtra('key', 'value');
  await someNetworkRequest();
  Sentry.withScope(async (scope2) => {
    ... scope2 here would still have previous key/value;
  });
});

#2

Right now that’s not supported, callbacks must be sync right now.


#3

Thanks!