From 5215abd06b1914b94cd394f2e9cb67a18d1ec152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= <88321181+rafal-ch@users.noreply.github.com> Date: Thu, 17 Oct 2024 13:25:06 +0200 Subject: [PATCH] Fix collection of gas price metric (#2366) ## Description This PR fixes the collection of `importer_gas_price_for_block` metric. ### Before requesting review - [X] I have reviewed the code myself --- CHANGELOG.md | 3 +++ crates/metrics/src/importer.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fb76386829..e4e728c2881 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Fixed +- [2366](https://github.com/FuelLabs/fuel-core/pull/2366): The `importer_gas_price_for_block` metric is properly collected. + ### Added - [2321](https://github.com/FuelLabs/fuel-core/pull/2321): New metrics for the txpool: "The size of transactions in the txpool" (`txpool_tx_size`), "The time spent by a transaction in the txpool in seconds" (`txpool_tx_time_in_txpool_seconds`), The number of transactions in the txpool (`txpool_number_of_transactions`), "The number of transactions pending verification before entering the txpool" (`txpool_number_of_transactions_pending_verification`), "The number of executable transactions in the txpool" (`txpool_number_of_executable_transactions`), "The time it took to select transactions for inclusion in a block in nanoseconds" (`txpool_select_transaction_time_nanoseconds`), The time it took to insert a transaction in the txpool in milliseconds (`txpool_insert_transaction_time_milliseconds`). diff --git a/crates/metrics/src/importer.rs b/crates/metrics/src/importer.rs index 0cf460edc3a..da2d64ffd79 100644 --- a/crates/metrics/src/importer.rs +++ b/crates/metrics/src/importer.rs @@ -74,7 +74,7 @@ impl Default for ImporterMetrics { registry.register( "importer_gas_price_for_block", "The gas prices used in a block", - transactions_per_block.clone(), + gas_price.clone(), ); Self {