Fix for statsd incorrect types

This commit is contained in:
9seconds
2019-11-12 12:13:00 +03:00
parent 27c5646680
commit dfa53af567
8 changed files with 162 additions and 116 deletions
+2 -13
View File
@@ -14,20 +14,9 @@ var Stats Interface
func Init(ctx context.Context) error {
mux := http.NewServeMux()
instancePrometheus, err := newStatsPrometheus(mux)
if err != nil {
return fmt.Errorf("cannot initialize prometheus: %w", err)
}
stats := []Interface{instancePrometheus}
stats := []Interface{newStatsPrometheus(mux)}
if config.C.StatsdAddr != nil {
instanceStatsd, err := newStatsStatsd()
if err != nil {
return fmt.Errorf("cannot inialize statsd: %w", err)
}
stats = append(stats, instanceStatsd)
stats = append(stats, newStatsStatsd())
}
listener, err := net.Listen("tcp", config.C.StatsBind.String())