Context Implementation NodeJS - Help?

Is this correctly implemented?

const magicFunction = (data) => {
  Sentry.configureScope(async (scope: any) => {
    try {
      let name = await getName(data)
      scope.setExtra('name', name)
      let profile = await getProfile(data)
      scope.setExtra('profile', profile)
    } catch (err) {
      Sentry.setExtra('error', err)
      Sentry.captureException(err)
    }
  })
}

Looks like it. Why do you ask?

Btw. I’d group the async function calls together:

const magicFunction = (data) => {
  Sentry.configureScope(async (scope: any) => {
    try {
      const [name, profile] = await Promise.all([
        getName(data),
        getProfile(data),
      ]);

      scope.setExtra('name', name);
      scope.setExtra('profile', profile);
    } catch (err) {
      Sentry.setExtra('error', err);
      Sentry.captureException(err);
    }
  })
}