code: func (s *Server) Attach(ctx context.Context, req *pb.AttachRequest) (resp *pb.AttachResponse, err error) {
  	const operation = "attach"
  	defer func() {
  		recordOperation(operation, time.Now())
  		recordError(operation, err)
  	}()
  	logrus.Debugf("AttachRequest %+v", req)
  
  	resp, err = s.getAttach(req)
  	if err != nil {
  		return nil, fmt.Errorf("unable to prepare attach endpoint")
  	}
  
  	return resp, nil
  }
docs: // Attach prepares a streaming endpoint to attach to a running container.