code: func NewStatsdReporter(
  	config *config.Config,
  	serverType string,
  	tagsMap map[string]string,
  	clientOrNil ...Client,
  ) (*StatsdReporter, error) {
  	host := config.GetString("pitaya.metrics.statsd.host")
  	prefix := config.GetString("pitaya.metrics.statsd.prefix")
  	rate, err := strconv.ParseFloat(config.GetString("pitaya.metrics.statsd.rate"), 64)
  	if err != nil {
  		return nil, err
  	}
  	sr := &StatsdReporter{
  		rate:       rate,
  		serverType: serverType,
  	}
  
  	sr.buildDefaultTags(tagsMap)
  
  	if len(clientOrNil) > 0 {
  		sr.client = clientOrNil[0]
  	} else {
  		c, err := statsd.New(host)
  		if err != nil {
  			return nil, err
  		}
  		c.Namespace = prefix
  		sr.client = c
  	}
  	return sr, nil
  }
docs: // NewStatsdReporter returns an instance of statsd reportar and an error if something fails