code: func InitTelemetry(cfg TelemetryConfig) (*metrics.InmemSink, error) {
  	// Setup telemetry
  	// Aggregate on 10 second intervals for 1 minute. Expose the
  	// metrics over stderr when there is a SIGUSR1 received.
  	memSink := metrics.NewInmemSink(10*time.Second, time.Minute)
  	metrics.DefaultInmemSignal(memSink)
  	metricsConf := metrics.DefaultConfig(cfg.MetricsPrefix)
  	metricsConf.EnableHostname = !cfg.DisableHostname
  	metricsConf.FilterDefault = cfg.FilterDefault
  	metricsConf.AllowedPrefixes = cfg.AllowedPrefixes
  	metricsConf.BlockedPrefixes = cfg.BlockedPrefixes
  
  	var sinks metrics.FanoutSink
  	addSink := func(name string, fn func(TelemetryConfig, string) (metrics.MetricSink, error)) error {
  		s, err := fn(cfg, metricsConf.HostName)
  		if err != nil {
  			return err
  		}
  		if s != nil {
  			sinks = append(sinks, s)
  		}
  		return nil
  	}
  
  	if err := addSink("statsite", statsiteSink); err != nil {
  		return nil, err
  	}
  	if err := addSink("statsd", statsdSink); err != nil {
  		return nil, err
  	}
  	if err := addSink("dogstatd", dogstatdSink); err != nil {
  		return nil, err
  	}
  	if err := addSink("circonus", circonusSink); err != nil {
  		return nil, err
  	}
  	if err := addSink("prometheus", prometheusSink); err != nil {
  		return nil, err
  	}
  
  	if len(sinks) > 0 {
  		sinks = append(sinks, memSink)
  		metrics.NewGlobal(metricsConf, sinks)
  	} else {
  		metricsConf.EnableHostname = false
  		metrics.NewGlobal(metricsConf, memSink)
  	}
  	return memSink, nil
  }
docs: // InitTelemetry configures go-metrics based on map of telemetry config
  // values as returned by Runtimecfg.Config().