Skip to content

Commit

Permalink
Fix the blob metrics fetch in data api (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
jianoaix committed Nov 16, 2023
1 parent 1ef09d5 commit d6ca784
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion disperser/dataapi/metrics_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (s *server) calculateTotalStake(operators []*Operator, blockNumber uint32)
pool = workerpool.New(maxWorkersGetOperatorState)
)

s.logger.Debug("Number of operators to calculate stake:", len(operators))
s.logger.Debug("Number of operators to calculate stake:", "numOperators", len(operators), "blockNumber", blockNumber)
for _, o := range operators {
operatorId, err := ConvertHexadecimalToBytes(o.OperatorId)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion disperser/dataapi/prometheus_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func NewPrometheusClient(api prometheus.Api, cluster string) *prometheusClient {
}

func (pc *prometheusClient) QueryDisperserBlobSizeBytesPerSecond(ctx context.Context, start time.Time, end time.Time) (*PrometheusResult, error) {
query := fmt.Sprintf("eigenda_batcher_blobs_total{state=\"completed\",data=\"size\",cluster=\"%s\"}", pc.cluster)
query := fmt.Sprintf("eigenda_batcher_blobs_total{state=\"confirmed\",data=\"size\",cluster=\"%s\"}", pc.cluster)
numSecondsInTimeRange := end.Sub(start).Seconds()
step := uint64(numSecondsInTimeRange / maxNumOfDataPoints)
if step < 1 {
Expand Down

0 comments on commit d6ca784

Please sign in to comment.