Skip to content

Commit

Permalink
Re-add counter metric
Browse files Browse the repository at this point in the history
  • Loading branch information
adaszko committed Oct 23, 2023
1 parent 61b4e39 commit 0ddaf28
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,14 @@ func MonitorAttestationsAndProposals(ctx context.Context, s *prysmgrpc.Service,
})
prometheus.MustRegister(totalMissedAttestationsCounter)

totalProposedEmptyBlocksCounter := prometheus.NewCounter(
prometheus.CounterOpts{
Namespace: "ETH2",
Name: "totalProposedEmptyBlocks",
Help: "Proposed blocks containing no transactions",
})
prometheus.MustRegister(totalProposedEmptyBlocksCounter)

totalCanonicalAttestationsCounter := prometheus.NewCounter(
prometheus.CounterOpts{
Namespace: "ETH2",
Expand Down Expand Up @@ -811,6 +819,7 @@ func MonitorAttestationsAndProposals(ctx context.Context, s *prysmgrpc.Service,
validatorPublicKey := reversedIndexes[validatorIndex]
Report("⚠️ 🧱 Validator %v (%v) proposed a block containing no transactions at epoch %v and slot %v", validatorPublicKey, validatorIndex, justifiedEpoch, slot)
lastProposedEmptyBlockSlotGauge.Set(float64(slot))
totalProposedEmptyBlocksCounter.Inc()
}
}

Expand Down

0 comments on commit 0ddaf28

Please sign in to comment.