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
2 changes: 1 addition & 1 deletion cmd/ethrex/initializers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub fn open_store(datadir: &Path) -> Store {
#[cfg(feature = "rocksdb")]
let engine_type = EngineType::RocksDB;
#[cfg(feature = "metrics")]
ethrex_metrics::metrics_process::set_datadir_path(datadir.to_path_buf());
ethrex_metrics::process::set_datadir_path(datadir.to_path_buf());
Store::new(datadir, engine_type).expect("Failed to create Store")
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/blockchain/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ use tokio_util::sync::CancellationToken;
use vm::StoreVmDatabase;

#[cfg(feature = "metrics")]
use ethrex_metrics::metrics_blocks::METRICS_BLOCKS;
use ethrex_metrics::blocks::METRICS_BLOCKS;

#[cfg(feature = "c-kzg")]
use ethrex_common::types::BlobsBundle;
Expand Down
2 changes: 1 addition & 1 deletion crates/blockchain/fork_choice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pub async fn apply_fork_choice(
.await?;

metrics!(
use ethrex_metrics::metrics_blocks::METRICS_BLOCKS;
use ethrex_metrics::blocks::METRICS_BLOCKS;

METRICS_BLOCKS.set_head_height(head.number);
);
Expand Down
3 changes: 1 addition & 2 deletions crates/blockchain/metrics/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ use axum::{Router, routing::get};
use crate::profiling::gather_profiling_metrics;

use crate::{
MetricsApiError, metrics_blocks::METRICS_BLOCKS, metrics_process::METRICS_PROCESS,
metrics_transactions::METRICS_TX,
MetricsApiError, blocks::METRICS_BLOCKS, process::METRICS_PROCESS, transactions::METRICS_TX,
};

pub async fn start_prometheus_metrics_api(
Expand Down
10 changes: 5 additions & 5 deletions crates/blockchain/metrics/mod.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#[cfg(feature = "api")]
pub mod api;
#[cfg(any(feature = "api", feature = "metrics"))]
pub mod blocks;
#[cfg(feature = "api")]
pub mod l2;
#[cfg(any(feature = "api", feature = "metrics"))]
pub mod metrics_blocks;
#[cfg(any(feature = "api", feature = "metrics"))]
pub mod metrics_process;
#[cfg(any(feature = "api", feature = "transactions"))]
pub mod metrics_transactions;
pub mod process;
#[cfg(feature = "api")]
pub mod profiling;
#[cfg(any(feature = "api", feature = "transactions"))]
pub mod transactions;

/// A macro to conditionally enable metrics-related code.
///
Expand Down
4 changes: 2 additions & 2 deletions crates/blockchain/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ use ethrex_storage::{Store, error::StoreError};
use ethrex_metrics::metrics;

#[cfg(feature = "metrics")]
use ethrex_metrics::metrics_blocks::METRICS_BLOCKS;
use ethrex_metrics::blocks::METRICS_BLOCKS;
#[cfg(feature = "metrics")]
use ethrex_metrics::metrics_transactions::{METRICS_TX, MetricsTxType};
use ethrex_metrics::transactions::{METRICS_TX, MetricsTxType};
use tokio_util::sync::CancellationToken;

use crate::{
Expand Down
2 changes: 1 addition & 1 deletion crates/l2/sequencer/block_producer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use super::errors::BlockProducerError;

use ethrex_metrics::metrics;
#[cfg(feature = "metrics")]
use ethrex_metrics::{metrics_blocks::METRICS_BLOCKS, metrics_transactions::METRICS_TX};
use ethrex_metrics::{blocks::METRICS_BLOCKS, transactions::METRICS_TX};

#[derive(Clone)]
pub enum CallMessage {
Expand Down
4 changes: 2 additions & 2 deletions crates/l2/sequencer/block_producer/payload_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use ethrex_levm::vm::VMType;
use ethrex_metrics::metrics;
#[cfg(feature = "metrics")]
use ethrex_metrics::{
metrics_blocks::METRICS_BLOCKS,
metrics_transactions::{METRICS_TX, MetricsTxType},
blocks::METRICS_BLOCKS,
transactions::{METRICS_TX, MetricsTxType},
};
use ethrex_rlp::encode::RLPEncode;
use ethrex_storage::Store;
Expand Down
2 changes: 1 addition & 1 deletion crates/l2/sequencer/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use ethrex_l2_sdk::{get_last_committed_batch, get_last_verified_batch};
#[cfg(feature = "metrics")]
use ethrex_metrics::{
l2::metrics::{METRICS, MetricsBlockType, MetricsOperationType},
metrics_transactions::METRICS_TX,
transactions::METRICS_TX,
};
use ethrex_rpc::clients::eth::EthClient;
use reqwest::Url;
Expand Down
Loading