Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions op-node/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ type Metrics struct {
DerivationErrorsTotal prometheus.Counter
Heads *prometheus.GaugeVec

TransactionsSequencedTotal prometheus.Counter

registry *prometheus.Registry
}

Expand Down Expand Up @@ -147,6 +149,12 @@ func NewMetrics(procName string) *Metrics {
"type",
}),

TransactionsSequencedTotal: promauto.With(registry).NewGauge(prometheus.GaugeOpts{
Namespace: ns,
Name: "transactions_sequenced_total",
Help: "Count of total transactions sequenced",
}),

registry: registry,
}
}
Expand Down
1 change: 1 addition & 0 deletions op-node/rollup/driver/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ func (s *state) createNewL2Block(ctx context.Context) error {
s.l2Head = newUnsafeL2Head

s.log.Info("Sequenced new l2 block", "l2Head", s.l2Head, "l1Origin", s.l2Head.L1Origin, "txs", len(payload.Transactions), "time", s.l2Head.Time)
s.metrics.TransactionsSequencedTotal.Add(float64(len(payload.Transactions)))

if s.network != nil {
if err := s.network.PublishL2Payload(ctx, payload); err != nil {
Expand Down