code: func New(addr string, options ...Option) (*Client, error) {
  	o, err := resolveOptions(options)
  	if err != nil {
  		return nil, err
  	}
  
  	var w statsdWriter
  
  	if !strings.HasPrefix(addr, UnixAddressPrefix) {
  		w, err = newUDPWriter(addr)
  	} else if o.AsyncUDS {
  		w, err = newAsyncUdsWriter(addr[len(UnixAddressPrefix)-1:])
  	} else {
  		w, err = newBlockingUdsWriter(addr[len(UnixAddressPrefix)-1:])
  	}
  	if err != nil {
  		return nil, err
  	}
  	w.SetWriteTimeout(o.WriteTimeoutUDS)
  
  	c := Client{
  		Namespace: o.Namespace,
  		Tags:      o.Tags,
  		writer:    w,
  	}
  
  	// Inject DD_ENTITY_ID as a constant tag if found
  	entityID := os.Getenv(entityIDEnvName)
  	if entityID != "" {
  		entityTag := fmt.Sprintf("%s:%s", entityIDTagName, entityID)
  		c.Tags = append(c.Tags, entityTag)
  	}
  
  	if o.Buffered {
  		c.bufferLength = o.MaxMessagesPerPayload
  		c.commands = make([][]byte, 0, o.MaxMessagesPerPayload)
  		c.flushTime = time.Millisecond * 100
  		c.stop = make(chan struct{}, 1)
  		go c.watch()
  	}
  
  	return &c, nil
  }
docs: // New returns a pointer to a new Client given an addr in the format "hostname:port" or
  // "unix:///path/to/socket".