in metrics/metrics_statsd.go [73:87]
func (c StatsdConfiger) UnmarshalConfig(data []byte, fname string, logger *zap.Logger) (Config, error) {
cfg := new(StatsdConfig)
if err := yaml.Unmarshal(data, cfg); err != nil {
return nil, errors.Wrapf(err, "error unmarshaling the statsd section in the "+
"configuration file %s", fname)
}
// Validate on the merged config at the end
if err := validator.Validate(cfg); err != nil {
return nil, errors.Wrapf(err, "invalid info in the statsd section in the "+
"configuration file %s", fname)
}
return Config(cfg), nil
}