code: func (r *wrapDoer) Do(ctx context.Context, req *http.Request) (*http.Response, error) {
  	s := ContextSegment(ctx)
  	if s == nil {
  		// this request isn't traced
  		return r.wrapped.Do(ctx, req)
  	}
  
  	sub := s.NewSubsegment(req.URL.Host)
  	defer sub.Close()
  
  	// update the context with the latest segment
  	ctx = middleware.WithTrace(ctx, sub.TraceID, sub.ID, sub.ParentID)
  	ctx = WithSegment(ctx, sub)
  
  	sub.RecordRequest(req, "remote")
  
  	resp, err := r.wrapped.Do(ctx, req)
  
  	if err != nil {
  		sub.RecordError(err)
  	} else {
  		sub.RecordResponse(resp)
  	}
  
  	return resp, err
  }
docs: // Do calls through to the wrapped Doer, creating subsegments as appropriate.