code: func handleResponses(responses chan libhoney.Response, stats *responseStats,
  	toBeResent chan event.Event, delaySending chan int,
  	options GlobalOptions) {
  	go logStats(stats, options.StatusInterval)
  
  	for rsp := range responses {
  		stats.update(rsp)
  		logfields := logrus.Fields{
  			"status_code": rsp.StatusCode,
  			"body":        strings.TrimSpace(string(rsp.Body)),
  			"duration":    rsp.Duration,
  			"error":       rsp.Err,
  			"timestamp":   rsp.Metadata.(event.Event).Timestamp,
  		}
  		// if this is an error we should retry sending, re-enqueue the event
  		if options.BackOff && (rsp.StatusCode == 429 || rsp.StatusCode == 500) {
  			logfields["retry_send"] = true
  			delaySending <- 1000 / int(options.NumSenders) // back off for a little bit
  			toBeResent <- rsp.Metadata.(event.Event)       // then retry sending the event
  		} else {
  			logfields["retry_send"] = false
  		}
  		logrus.WithFields(logfields).Debug("event send record received")
  	}
  }
docs: // handleResponses reads from the response queue, logging a summary and debug
  // re-enqueues any events that failed to send in a retryable way