436
sanitizeOptions tally.SanitizeOptions,
437
clientConfig *ClientConfig,
439
>
reporter, err := config.NewReporter(
440
>
prometheus.ConfigurationOptions{
441
>
Registry: prom.NewRegistry(),
442
>
OnError: func(err error) {
443
logger.Warn("error in prometheus reporter", tag.Error(err))
444
},
445
},
446
)
448
logger.Fatal("error creating prometheus reporter", tag.Error(err))
449
}
450
>
scopeOpts := tally.ScopeOptions{
config.go
451
>
Tags: clientConfig.Tags,
452
>
CachedReporter: reporter,
453
>
Separator: prometheus.DefaultSeparator,
454
>
SanitizeOptions: &sanitizeOptions,
455
>
Prefix: clientConfig.Prefix,
456
>
}
457
>
scope, _ := tally.NewRootScope(scopeOpts, time.Second)
458
>
return scope
459
}
460