From e7a2de2cb41e8dcfd2f829dfad3faf2c32a07069 Mon Sep 17 00:00:00 2001 From: shaan420 Date: Fri, 6 Oct 2023 19:43:47 -0700 Subject: [PATCH] rename CommonTagsInternal to InternalTags (#233) * rename CommonTagsInternal to InternalTags --- m3/config.go | 6 +++--- m3/config_test.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/m3/config.go b/m3/config.go index ccfb51ce..0e9ad577 100644 --- a/m3/config.go +++ b/m3/config.go @@ -50,9 +50,9 @@ type Configuration struct { // with the histogram bucket bound values. HistogramBucketTagPrecision uint `yaml:"histogramBucketTagPrecision"` - // CommonTagsInternal are tags that should be added to all internal metrics + // InternalTags are tags that should be added to all internal metrics // emitted by the reporter. - CommonTagsInternal map[string]string `yaml:"commonTagsInternal"` + InternalTags map[string]string `yaml:"internalTags"` } // NewReporter creates a new M3 reporter from this configuration. @@ -70,6 +70,6 @@ func (c Configuration) NewReporter() (Reporter, error) { MaxPacketSizeBytes: c.PacketSize, IncludeHost: c.IncludeHost, HistogramBucketTagPrecision: c.HistogramBucketTagPrecision, - InternalTags: c.CommonTagsInternal, + InternalTags: c.InternalTags, }) } diff --git a/m3/config_test.go b/m3/config_test.go index 20afd121..e727a2a3 100644 --- a/m3/config_test.go +++ b/m3/config_test.go @@ -42,7 +42,7 @@ func TestConfigSimple(t *testing.T) { assert.True(t, ok) assert.True(t, tagEquals(reporter.commonTags, "service", "my-service")) assert.True(t, tagEquals(reporter.commonTags, "env", "test")) - assert.Equal(t, 0, len(c.CommonTagsInternal)) + assert.Equal(t, 0, len(c.InternalTags)) } func TestConfigMulti(t *testing.T) {