Skip to content

Commit ff51327

Browse files
authored
Merge pull request #140 from netlify/fix/datadogSinkMetricsHostname
fix(metriks): force empty Datadog sink hostname. Service name always in prefix.
2 parents 9c62d23 + 6571bb7 commit ff51327

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

metriks/config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@ type Config struct {
44
Host string `default:"localhost"`
55
Port int `default:"8125"`
66

7-
// Name is typically the local hostname or pod name
8-
Name string `default:"local"`
97
Tags map[string]string
108
}

metriks/metriks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func Init(serviceName string, conf Config) error {
2020

2121
// InitTags behaves like Init but allows appending extra tags
2222
func InitTags(serviceName string, conf Config, extraTags []string) error {
23-
sink, err := createDatadogSink(statsdAddr(conf), conf.Name, conf.Tags, extraTags)
23+
sink, err := createDatadogSink(statsdAddr(conf), "", conf.Tags, extraTags)
2424
if err != nil {
2525
return err
2626
}

metriks/metriks_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ func TestMetriksInit(t *testing.T) {
1919
config := Config{
2020
Host: "127.0.0.1",
2121
Port: 8125,
22-
Name: "dev-test",
2322
Tags: nil,
2423
}
2524
err = Init("foo", config)

0 commit comments

Comments
 (0)