code: func InitializeStatsdCollector(config *StatsdCollectorConfig) (*StatsdCollectorClient, error) {
  	flushBytes := config.FlushBytes
  	if flushBytes == 0 {
  		flushBytes = LANStatsdFlushBytes
  	}
  
  	sampleRate := config.SampleRate
  	if sampleRate == 0 {
  		sampleRate = 1
  	}
  
  	c, err := statsd.NewBufferedClient(config.StatsdAddr, config.Prefix, 1*time.Second, flushBytes)
  	if err != nil {
  		log.Printf("Could not initiale buffered client: %s. Falling back to a Noop Statsd client", err)
  		c, _ = statsd.NewNoopClient()
  	}
  	return &StatsdCollectorClient{
  		client:     c,
  		sampleRate: sampleRate,
  	}, err
  }
docs: // InitializeStatsdCollector creates the connection to the Statsd server
  // and should be called before any metrics are recorded.
  //
  // Users should ensure to call Close() on the client.