code: func (mc *MetricsConfiguration) NewRootScope() (tally.Scope, io.Closer, error) {
  	var reporters []tally.CachedStatsReporter
  	if mc.M3Reporter != nil {
  		r, err := mc.M3Reporter.NewReporter()
  		if err != nil {
  			return nil, nil, err
  		}
  		reporters = append(reporters, r)
  	}
  	if mc.PrometheusReporter != nil {
  		var opts prometheus.ConfigurationOptions
  		r, err := mc.PrometheusReporter.NewReporter(opts)
  		if err != nil {
  			return nil, nil, err
  		}
  		reporters = append(reporters, r)
  	}
  	if len(reporters) == 0 {
  		return nil, nil, errNoReporterConfigured
  	}
  
  	var r tally.CachedStatsReporter
  	if len(reporters) == 1 {
  		r = reporters[0]
  	} else {
  		r = multi.NewMultiCachedReporter(reporters...)
  	}
  
  	scope, closer := mc.NewRootScopeReporter(r)
  	return scope, closer, nil
  }
docs: // NewRootScope creates a new tally.Scope based on a tally.CachedStatsReporter
  // based on the the the config.