File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -485,9 +485,6 @@ func Start(botConfig config.Config) {
485485 log .Printf ("Bot has been started as @%s...\n " , bot .User .Username )
486486
487487 if botConfig .Prometheus .Enabled {
488- exportAddr := fmt .Sprintf ("%s:%d" , botConfig .Prometheus .ExportIP , botConfig .Prometheus .ExportPort )
489- prometheus .StartPrometheusExporter (exportAddr )
490-
491488 // Periodically update the metrics from the database
492489 go func () {
493490 for {
@@ -498,6 +495,10 @@ func Start(botConfig config.Config) {
498495 time .Sleep (time .Second * 60 )
499496 }
500497 }()
498+
499+ exportAddr := fmt .Sprintf ("%s:%d" , botConfig .Prometheus .ExportIP , botConfig .Prometheus .ExportPort )
500+ log .Printf ("Starting prometheus exporter on %s...\n " , exportAddr )
501+ prometheus .StartPrometheusExporter (exportAddr )
501502 }
502503
503504 updater .Idle ()
You can’t perform that action at this time.
0 commit comments