code: func (tracer *tracerImpl) shouldFlushLocked(now time.Time) bool {
  	if now.Add(tracer.opts.MinReportingPeriod).Sub(tracer.lastReportAttempt) > tracer.opts.ReportingPeriod {
  		return true
  	} else if tracer.buffer.isHalfFull() {
  		return true
  	}
  	return false
  }
docs: // Every MinReportingPeriod the reporting loop wakes up and checks to see if
  // either (a) the Runtime's max reporting period is about to expire (see
  // maxReportingPeriod()), (b) the number of buffered log records is
  // approaching kMaxBufferedLogs, or if (c) the number of buffered span records
  // is approaching kMaxBufferedSpans. If any of those conditions are true,
  // pending data is flushed to the remote peer. If not, the reporting loop waits
  // until the next cycle. See Runtime.maybeFlush() for details.
  //
  // This could alternatively be implemented using flush channels and so forth,
  // but that would introduce opportunities for client code to block on the
  // runtime library, and we want to avoid that at all costs (even dropping data,
  // which can certainly happen with high data rates and/or unresponsive remote
  // peers).