StartupTelemetry => InitTelemetry
This commit is contained in:
parent
fd3681f35b
commit
23be6ad1c8
|
@ -198,7 +198,7 @@ func (c *cmd) run(args []string) int {
|
||||||
c.logOutput = logOutput
|
c.logOutput = logOutput
|
||||||
c.logger = log.New(logOutput, "", log.LstdFlags)
|
c.logger = log.New(logOutput, "", log.LstdFlags)
|
||||||
|
|
||||||
memSink, err := lib.StartupTelemetry(config.TelemetryConfig(false))
|
memSink, err := lib.InitTelemetry(config.TelemetryConfig(false))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.UI.Error(err.Error())
|
c.UI.Error(err.Error())
|
||||||
return 1
|
return 1
|
||||||
|
|
|
@ -48,7 +48,7 @@ func (p *Proxy) Serve() error {
|
||||||
// Setup telemetry if configured
|
// Setup telemetry if configured
|
||||||
if len(newCfg.Telemetry) > 0 {
|
if len(newCfg.Telemetry) > 0 {
|
||||||
p.logger.Printf("[DEBUG] got Telemetry confg: %v", newCfg.Telemetry)
|
p.logger.Printf("[DEBUG] got Telemetry confg: %v", newCfg.Telemetry)
|
||||||
_, err := lib.StartupTelemetry(newCfg.Telemetry)
|
_, err := lib.InitTelemetry(newCfg.Telemetry)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
p.logger.Printf("[ERR] proxy telemetry config error: %s", err)
|
p.logger.Printf("[ERR] proxy telemetry config error: %s", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,9 +123,9 @@ func cfgStrSliceVal(i interface{}) []string {
|
||||||
return nil
|
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"])().
|
// 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
|
// Setup telemetry
|
||||||
// Aggregate on 10 second intervals for 1 minute. Expose the
|
// Aggregate on 10 second intervals for 1 minute. Expose the
|
||||||
// metrics over stderr when there is a SIGUSR1 received.
|
// metrics over stderr when there is a SIGUSR1 received.
|
||||||
|
|
Loading…
Reference in New Issue