class Sentry::Hub

def with_child_span(instrumenter: :sentry, **attributes, &block)

def with_child_span(instrumenter: :sentry, **attributes, &block)
  return yield(nil) unless instrumenter == configuration.instrumenter
  current_span = current_scope.get_span
  return yield(nil) unless current_span
  result = nil
  begin
    current_span.with_child_span(**attributes) do |child_span|
      current_scope.set_span(child_span)
      result = yield(child_span)
    end
  ensure
    current_scope.set_span(current_span)
  end
  result
end