Skip to content

Commit

Permalink
rename CommonTagsInternal to InternalTags (#233)
Browse files Browse the repository at this point in the history
* rename CommonTagsInternal to InternalTags
  • Loading branch information
shaan420 committed Oct 7, 2023
1 parent 3853e46 commit 15cb1ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions m3/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
})
}
2 changes: 1 addition & 1 deletion m3/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,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) {
Expand Down

0 comments on commit 15cb1ff

Please sign in to comment.