From 82c3ddc6bec1217aebc2acaf36e3cbd1e926aa4a Mon Sep 17 00:00:00 2001 From: Miguel Angel Rojo Fernandez Date: Tue, 26 Nov 2024 16:04:57 +0000 Subject: [PATCH] reduced number of metric objects --- chain/chain.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chain/chain.go b/chain/chain.go index c9e09691c..107665cd8 100644 --- a/chain/chain.go +++ b/chain/chain.go @@ -241,7 +241,7 @@ func (c *Chain) GetTransaction(id thor.Bytes32) (*tx.Transaction, *TxMeta, error if err != nil { return nil, nil, err } - metricTransactionReadCounter().Add(1) + metricTransactionRepositoryCounter().AddWithLabel(1, map[string]string{"type": "read"}) return tx, txMeta, nil } @@ -257,7 +257,7 @@ func (c *Chain) GetTransactionReceipt(txID thor.Bytes32) (*tx.Receipt, error) { if err != nil { return nil, err } - metricReceiptReadCounter().Add(1) + metricReceiptRepositoryCounter().AddWithLabel(1, map[string]string{"type": "read"}) return receipt, nil }