code: func NewDialContextFunc(optFuncs ...dialerOpt) func(context.Context, string, string) (net.Conn, error) {
  	opts := &dialerOpts{name: defaultName, monitoring: true, parentDialContextFunc: (&net.Dialer{}).DialContext}
  	for _, f := range optFuncs {
  		f(opts)
  	}
  	if opts.monitoring {
  		PreRegisterDialerMetrics(opts.name)
  	}
  	return func(ctx context.Context, network string, addr string) (net.Conn, error) {
  		name := opts.name
  		if ctxName := DialNameFromContext(ctx); ctxName != "" {
  			name = ctxName
  		}
  		return dialClientConnTracker(ctx, network, addr, name, opts)
  	}
  }
docs: // NewDialContextFunc returns a `DialContext` function that tracks outbound connections.
  // The signature is compatible with `http.Tranport.DialContext` and is meant to be used there.