Skip to content

Commit

Permalink
Add enable_hostname_label option to telementry stanza (#7902)
Browse files Browse the repository at this point in the history
  • Loading branch information
michelvocks authored and briankassouf committed Dec 18, 2019
1 parent 39d4fd0 commit aa9bee1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions command/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2270,6 +2270,7 @@ func (c *ServerCommand) setupTelemetry(config *server.Config) (*metricsutil.Metr

metricsConf := metrics.DefaultConfig("vault")
metricsConf.EnableHostname = !telConfig.DisableHostname
metricsConf.EnableHostnameLabel = telConfig.EnableHostnameLabel

// Configure the statsite sink
var fanout metrics.FanoutSink
Expand Down
3 changes: 2 additions & 1 deletion command/server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ type Telemetry struct {
StatsiteAddr string `hcl:"statsite_address"`
StatsdAddr string `hcl:"statsd_address"`

DisableHostname bool `hcl:"disable_hostname"`
DisableHostname bool `hcl:"disable_hostname"`
EnableHostnameLabel bool `hcl:"enable_hostname_label"`

// Circonus: see https://github.com/circonus-labs/circonus-gometrics
// for more details on the various configuration options.
Expand Down

0 comments on commit aa9bee1

Please sign in to comment.