Skip to content

Commit babde7f

Browse files
committed
refactor: log prometheus export address
1 parent 7631e7a commit babde7f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

internal/bot/bot.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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()

0 commit comments

Comments
 (0)