Skip to content

Commit 364711e

Browse files
committed
SD-11577: add debug logs
1 parent e423b75 commit 364711e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ func fetchMetrics(deniedMetricsSet MetricsSet) {
154154
}
155155

156156
func runExporter() {
157+
log.Info("Starting cloudflare_exporter with KV, subrequests, and queue metrics enabled")
157158
cfgMetricsPath := viper.GetString("metrics_path")
158159

159160
// Handle pprof configuration
@@ -195,7 +196,7 @@ func runExporter() {
195196
h := health.New(health.Health{})
196197
http.HandleFunc("/health", h.Handler)
197198

198-
log.Info("Beginning to serve metrics on ", viper.GetString("listen"), cfgMetricsPath)
199+
log.Info("(live change) Beginning to serve metrics on ", viper.GetString("listen"), cfgMetricsPath)
199200

200201
server := &http.Server{
201202
Addr: viper.GetString("listen"),

prometheus.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,7 @@ func fetchKVAnalytics(account cfaccounts.Account, wg *sync.WaitGroup) {
694694
return
695695
}
696696

697+
log.Info("fetched KV analytics")
697698
accountName := strings.ToLower(strings.ReplaceAll(account.Name, " ", "-"))
698699

699700
for _, a := range r.Viewer.Accounts {
@@ -717,6 +718,7 @@ func fetchWorkerSubrequestAnalytics(account cfaccounts.Account, wg *sync.WaitGro
717718
return
718719
}
719720

721+
log.Info("fetched worker subrequest analytics")
720722
accountName := strings.ToLower(strings.ReplaceAll(account.Name, " ", "-"))
721723

722724
for _, a := range r.Viewer.Accounts {
@@ -740,12 +742,15 @@ func fetchQueueAnalytics(account cfaccounts.Account, wg *sync.WaitGroup) {
740742
return
741743
}
742744

745+
log.Info("fetched queue names")
746+
743747
r, err := fetchQueueMetrics(account.ID)
744748
if err != nil {
745749
log.Error("failed to fetch queue metrics for account ", account.ID, ": ", err)
746750
return
747751
}
748752

753+
log.Info("fetched queue metrics")
749754
accountName := strings.ToLower(strings.ReplaceAll(account.Name, " ", "-"))
750755

751756
for _, a := range r.Viewer.Accounts {

0 commit comments

Comments
 (0)