Skip to content

Commit

Permalink
chore(exporter): report status of rocketpoolExporter (#908)
Browse files Browse the repository at this point in the history
* report status of rocketpoolExporter
* add metric for exporter_rocketpoolExporter task-duration

BEDS-90
  • Loading branch information
guybrush authored Oct 2, 2024
1 parent 42a8588 commit d83133d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backend/pkg/exporter/modules/rocketpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import (

"github.com/gobitfly/beaconchain/pkg/commons/db"
"github.com/gobitfly/beaconchain/pkg/commons/log"
"github.com/gobitfly/beaconchain/pkg/commons/metrics"
"github.com/gobitfly/beaconchain/pkg/commons/services"
"github.com/gobitfly/beaconchain/pkg/commons/utils"
"github.com/pkg/errors"

Expand Down Expand Up @@ -195,6 +197,10 @@ func (rp *RocketpoolExporter) Run() error {
continue
}

services.ReportStatus("rocketpoolExporter", "Running", nil)

metrics.TaskDuration.WithLabelValues("exporter_rocketpoolExporter").Observe(time.Since(t0).Seconds())

log.InfoWithFields(log.Fields{"duration": time.Since(t0)}, "exported rocketpool-data")
count++
<-t.C
Expand Down

0 comments on commit d83133d

Please sign in to comment.