StartupTelemetry => InitTelemetry

This commit is contained in:
Paul Banks 2018-06-13 16:59:22 +01:00 committed by Jack Pearkes
parent 38405bd4a9
commit 32f362bad9
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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)
}

View File

@ -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.