diff --git a/block/submit.go b/block/submit.go index 8c5dd5d18..890befe27 100644 --- a/block/submit.go +++ b/block/submit.go @@ -153,7 +153,8 @@ func (m *Manager) CreateAndSubmitBatch(maxSizeBytes uint64) (*types.Batch, error return nil, fmt.Errorf("create batch: %w", err) } - m.logger.Info("Created batch.", "start height", startHeight, "end height", endHeightInclusive) + m.logger.Info("Created batch.", "start height", startHeight, "end height", endHeightInclusive, "size", b.SizeBytes()) + types.LastBatchSubmittedBytes.Set(float64(b.SizeBytes())) if err := m.SubmitBatch(b); err != nil { return nil, fmt.Errorf("submit batch: %w", err) diff --git a/types/metrics.go b/types/metrics.go index f8f27d7cf..bb869e7a5 100644 --- a/types/metrics.go +++ b/types/metrics.go @@ -35,6 +35,11 @@ var RollappPendingSubmissionsSkewNumBytes = promauto.NewGauge(prometheus.GaugeOp Help: "The number of bytes (of blocks and commits) which have been accumulated but not yet submitted.", }) +var LastBatchSubmittedBytes = promauto.NewGauge(prometheus.GaugeOpts{ + Name: "last_batch_submitted_bytes", + Help: "The size in bytes of the last batch submitted to DA.", +}) + var LastReceivedP2PHeightGauge = promauto.NewGauge(prometheus.GaugeOpts{ Name: "last_received_p2p_height", Help: "The height of the last block received from P2P.",