code: func recordError(operation string, err error) {
  	if err != nil {
  		if _, ok := err.(operationTimeout); ok {
  			metrics.DockerOperationsTimeout.WithLabelValues(operation).Inc()
  			metrics.DeprecatedDockerOperationsTimeout.WithLabelValues(operation).Inc()
  		}
  		// Docker operation timeout error is also a docker error, so we don't add else here.
  		metrics.DockerOperationsErrors.WithLabelValues(operation).Inc()
  		metrics.DeprecatedDockerOperationsErrors.WithLabelValues(operation).Inc()
  	}
  }
docs: // recordError records error for metric if an error occurred.