getSpan method
Gets the current active transaction or span.
Implementation
ISentrySpan? getSpan() {
  ISentrySpan? span;
  if (!_isEnabled) {
    _options.logger(
      SentryLevel.warning,
      "Instance is disabled and this 'getSpan' call is a no-op.",
    );
  } else if (_options.isTracingEnabled()) {
    final item = _peek();
    span = item.scope.span;
  }
  return span;
}