Add prefix to datadog metrics
This commit is contained in:
parent
32340252b2
commit
85dd45cb81
11 changed files with 90 additions and 34 deletions
|
@ -23,7 +23,7 @@ func TestStatsD(t *testing.T) {
|
|||
|
||||
statsdRegistry := RegisterStatsd(context.Background(), &types.Statsd{Address: ":18125", PushInterval: ptypes.Duration(time.Second), AddEntryPointsLabels: true, AddRoutersLabels: true, AddServicesLabels: true})
|
||||
|
||||
testRegistry(t, "", statsdRegistry)
|
||||
testRegistry(t, defaultMetricsPrefix, statsdRegistry)
|
||||
}
|
||||
|
||||
func TestStatsDWithPrefix(t *testing.T) {
|
||||
|
@ -47,10 +47,6 @@ func testRegistry(t *testing.T, metricsPrefix string, registry Registry) {
|
|||
t.Errorf("Statsd registry should return true for IsEnabled(), IsRouterEnabled() and IsSvcEnabled()")
|
||||
}
|
||||
|
||||
if metricsPrefix == "" {
|
||||
metricsPrefix = "traefik"
|
||||
}
|
||||
|
||||
expected := []string{
|
||||
metricsPrefix + ".config.reload.total:1.000000|c\n",
|
||||
metricsPrefix + ".config.reload.total.failure:1.000000|c\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue