code: def report_spans(self):
          
          logger.debug("Span reporting thread is now alive")
  
          def span_work():
              queue_size = self.queue.qsize()
              if queue_size > 0 and instana.singletons.agent.can_send():
                  response = instana.singletons.agent.report_traces(self.queued_spans())
                  if response:
                      logger.debug("reported %d spans" % queue_size)
              return True
  
          every(2, span_work, "Span Reporting")
docs: Periodically report the queued spans