mirror of https://github.com/status-im/consul.git
StartupTelemetry => InitTelemetry
This commit is contained in:
parent
38405bd4a9
commit
32f362bad9
|
@ -198,7 +198,7 @@ func (c *cmd) run(args []string) int {
|
|||
c.logOutput = logOutput
|
||||
c.logger = log.New(logOutput, "", log.LstdFlags)
|
||||
|
||||
memSink, err := lib.StartupTelemetry(config.TelemetryConfig(false))
|
||||
memSink, err := lib.InitTelemetry(config.TelemetryConfig(false))
|
||||
if err != nil {
|
||||
c.UI.Error(err.Error())
|
||||
return 1
|
||||
|
|
|
@ -48,7 +48,7 @@ func (p *Proxy) Serve() error {
|
|||
// Setup telemetry if configured
|
||||
if len(newCfg.Telemetry) > 0 {
|
||||
p.logger.Printf("[DEBUG] got Telemetry confg: %v", newCfg.Telemetry)
|
||||
_, err := lib.StartupTelemetry(newCfg.Telemetry)
|
||||
_, err := lib.InitTelemetry(newCfg.Telemetry)
|
||||
if err != nil {
|
||||
p.logger.Printf("[ERR] proxy telemetry config error: %s", err)
|
||||
}
|
||||
|
|
|
@ -123,9 +123,9 @@ func cfgStrSliceVal(i interface{}) []string {
|
|||
return nil
|
||||
}
|
||||
|
||||
// StartupTelemetry configures go-metrics based on map of telemetry config
|
||||
// InitTelemetry configures go-metrics based on map of telemetry config
|
||||
// values as returned by RuntimecfgStringVal(cfg["Config"])().
|
||||
func StartupTelemetry(cfg map[string]interface{}) (*metrics.InmemSink, error) {
|
||||
func InitTelemetry(cfg map[string]interface{}) (*metrics.InmemSink, error) {
|
||||
// Setup telemetry
|
||||
// Aggregate on 10 second intervals for 1 minute. Expose the
|
||||
// metrics over stderr when there is a SIGUSR1 received.
|
||||
|
|
Loading…
Reference in New Issue