Skip to content

Commit

Permalink
Initialize config.Telemetry if nil
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Conraux committed Sep 18, 2018
1 parent 00afd92 commit fa05cfc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions command/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1577,10 +1577,9 @@ func (c *ServerCommand) setupTelemetry(config *server.Config) (*metrics.InmemSin

var telConfig *server.Telemetry
if config.Telemetry == nil {
telConfig = &server.Telemetry{}
} else {
telConfig = config.Telemetry
config.Telemetry = &server.Telemetry{}
}
telConfig = config.Telemetry

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

0 comments on commit fa05cfc

Please sign in to comment.