diff --git a/agent/config/builder.go b/agent/config/builder.go index ecbb379755..4456ff252e 100644 --- a/agent/config/builder.go +++ b/agent/config/builder.go @@ -940,6 +940,7 @@ func (b *builder) build() (rt RuntimeConfig, err error) { StatsiteAddr: stringVal(c.Telemetry.StatsiteAddr), PrometheusOpts: prometheus.PrometheusOpts{ Expiration: b.durationVal("prometheus_retention_time", c.Telemetry.PrometheusRetentionTime), + Name: stringVal(c.Telemetry.MetricsPrefix), }, }, diff --git a/agent/config/runtime_test.go b/agent/config/runtime_test.go index cf3ad45512..d9ef24f97f 100644 --- a/agent/config/runtime_test.go +++ b/agent/config/runtime_test.go @@ -5855,6 +5855,7 @@ func TestLoad_FullConfig(t *testing.T) { StatsiteAddr: "HpFwKB8R", PrometheusOpts: prometheus.PrometheusOpts{ Expiration: 15 * time.Second, + Name: "ftO6DySn", // notice this is the same as the metrics prefix }, }, TLSCipherSuites: []uint16{tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256}, diff --git a/agent/config/testdata/TestRuntimeConfig_Sanitize.golden b/agent/config/testdata/TestRuntimeConfig_Sanitize.golden index d69bf7f3d5..38dc675dc3 100644 --- a/agent/config/testdata/TestRuntimeConfig_Sanitize.golden +++ b/agent/config/testdata/TestRuntimeConfig_Sanitize.golden @@ -379,6 +379,7 @@ "CounterDefinitions": [], "Expiration": "0s", "GaugeDefinitions": [], + "Name": "", "Registerer": null, "SummaryDefinitions": [] }, diff --git a/go.mod b/go.mod index 10407d05dd..aea4264ed1 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/Microsoft/go-winio v0.4.3 // indirect github.com/NYTimes/gziphandler v1.0.1 github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e - github.com/armon/go-metrics v0.3.9 + github.com/armon/go-metrics v0.3.10 github.com/armon/go-radix v1.0.0 github.com/aws/aws-sdk-go v1.25.41 github.com/coredns/coredns v1.1.2 diff --git a/go.sum b/go.sum index a285297f4f..abf4f8ecb0 100644 --- a/go.sum +++ b/go.sum @@ -59,8 +59,8 @@ github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5 github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg= github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD+gJD3GYs= -github.com/armon/go-metrics v0.3.9 h1:O2sNqxBdvq8Eq5xmzljcYzAORli6RWCvEym4cJf9m18= -github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8Uo= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=