File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010// Config represents the Registry's configuration.
1111type Config struct {
12- location string
13- commonTags map [string ]string
14- log logger.Logger
12+ location string
13+ extraCommonTags map [string ]string
14+ log logger.Logger
1515}
1616
1717// NewConfig creates a new configuration with the provided location, extra common tags, and logger. All fields are
@@ -47,9 +47,9 @@ func NewConfig(
4747 lg := calculateLogger (log )
4848
4949 return & Config {
50- location : location ,
51- commonTags : mergedTags ,
52- log : lg ,
50+ location : location ,
51+ extraCommonTags : mergedTags ,
52+ log : lg ,
5353 }, nil
5454}
5555
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ func NewRegistry(config *Config) (Registry, error) {
7474 return nil , err
7575 }
7676
77- config .log .Infof ("Create Registry with extra commonTags =%v" , config .commonTags )
77+ config .log .Infof ("Create Registry with extraCommonTags =%v" , config .extraCommonTags )
7878
7979 r := & spectatordRegistry {
8080 config : config ,
@@ -90,12 +90,12 @@ func (r *spectatordRegistry) GetLogger() logger.Logger {
9090 return r .logger
9191}
9292
93- // NewId calls meters.NewId() and adds the commonTags registered in the config.
93+ // NewId calls meters.NewId() and adds the extraCommonTags registered in the config.
9494func (r * spectatordRegistry ) NewId (name string , tags map [string ]string ) * meter.Id {
9595 newId := meter .NewId (name , tags )
9696
97- if r .config .commonTags != nil && len (r .config .commonTags ) > 0 {
98- newId = newId .WithTags (r .config .commonTags )
97+ if r .config .extraCommonTags != nil && len (r .config .extraCommonTags ) > 0 {
98+ newId = newId .WithTags (r .config .extraCommonTags )
9999 }
100100
101101 return newId
You can’t perform that action at this time.
0 commit comments