It seems like that the root span is not being waited for to be flushed when calling Sentry.close after starting spans