Skip to content

Commit 0cacf3c

Browse files
committed
Apply suggestions from PR review
1 parent 1a47f5d commit 0cacf3c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

module/metrics/collection.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ func (cc *CollectionCollector) TransactionIngested(txID flow.Identifier) {
8484
// ClusterBlockFinalized updates the guaranteed collection size gauge and
8585
// finishes the tx->collection span for each constituent transaction.
8686
func (cc *CollectionCollector) ClusterBlockFinalized(block *cluster.Block) {
87-
chainID := block.ChainID
87+
chainID := block.ChainID.String()
8888

8989
cc.finalizedHeight.
90-
With(prometheus.Labels{LabelChain: chainID.String()}).
90+
With(prometheus.Labels{LabelChain: chainID}).
9191
Set(float64(block.Height))
9292
cc.guarantees.
9393
With(prometheus.Labels{
94-
LabelChain: chainID.String(),
94+
LabelChain: chainID,
9595
}).
9696
Observe(float64(block.Payload.Collection.Len()))
9797
}
@@ -106,13 +106,13 @@ func (cc *CollectionCollector) CollectionMaxSize(size uint) {
106106
// as each node will only report on cluster blocks where they are the proposer.
107107
// It reports several metrics, specifically how many transactions have been included and how many of them are priority txns.
108108
func (cc *CollectionCollector) ClusterBlockCreated(block *cluster.Block, priorityTxnsCount uint) {
109-
chainID := block.ChainID
109+
chainID := block.ChainID.String()
110110

111111
cc.collectionSize.
112-
With(prometheus.Labels{LabelChain: chainID.String()}).
112+
With(prometheus.Labels{LabelChain: chainID}).
113113
Observe(float64(block.Payload.Collection.Len()))
114114

115115
cc.priorityTxns.
116-
With(prometheus.Labels{LabelChain: chainID.String()}).
116+
With(prometheus.Labels{LabelChain: chainID}).
117117
Observe(float64(priorityTxnsCount))
118118
}

0 commit comments

Comments
 (0)