code: func NewHandlerWrapper(opts ...Option) server.HandlerWrapper {
  	options := Options{
  		Daemon: "localhost:2000",
  	}
  
  	for _, o := range opts {
  		o(&options)
  	}
  
  	x := newXRay(options)
  
  	return func(h server.HandlerFunc) server.HandlerFunc {
  		return func(ctx context.Context, req server.Request, rsp interface{}) error {
  			name := options.Name
  			if len(name) == 0 {
  				// default name
  				name = req.Service() + "." + req.Endpoint()
  			}
  
  			var err error
  			s := getSegment(name, ctx)
  
  			defer func() {
  				setCallStatus(s, req.Service(), req.Endpoint(), err)
  				go record(x, s)
  			}()
  
  			ctx = newContext(ctx, s)
  			err = h(ctx, req, rsp)
  			return err
  		}
  	}
  }
docs: // NewHandlerWrapper accepts Options and returns a Trace Handler Wrapper