code: func (circuit *CircuitBreaker) ReportEvent(eventTypes []string, start time.Time, runDuration time.Duration) error {
  	if len(eventTypes) == 0 {
  		return fmt.Errorf("no event types sent for metrics")
  	}
  
  	circuit.mutex.RLock()
  	o := circuit.open
  	circuit.mutex.RUnlock()
  	if eventTypes[0] == "success" && o {
  		circuit.setClose()
  	}
  
  	var concurrencyInUse float64
  	if circuit.executorPool.Max > 0 {
  		concurrencyInUse = float64(circuit.executorPool.ActiveCount()) / float64(circuit.executorPool.Max)
  	}
  
  	select {
  	case circuit.metrics.Updates <- &commandExecution{
  		Types:            eventTypes,
  		Start:            start,
  		RunDuration:      runDuration,
  		ConcurrencyInUse: concurrencyInUse,
  	}:
  	default:
  		return CircuitError{Message: fmt.Sprintf("metrics channel (%v) is at capacity", circuit.Name)}
  	}
  
  	return nil
  }
docs: // ReportEvent records command metrics for tracking recent error rates and exposing data to the dashboard.