Skip to content

Conversation

@rodrigo-o
Copy link
Collaborator

Motivation

This was needed before when we didn't had a /metrics folder, now the prefix is unnecessary

Description

remove unnecessary metrics_ prefix from metric modules

Closes #5378

@github-actions github-actions bot added the L1 Ethereum client label Nov 18, 2025
@rodrigo-o rodrigo-o marked this pull request as ready for review November 18, 2025 19:01
@rodrigo-o rodrigo-o requested a review from a team as a code owner November 18, 2025 19:01
Copilot AI review requested due to automatic review settings November 18, 2025 19:01
@ethrex-project-sync ethrex-project-sync bot moved this to In Review in ethrex_l1 Nov 18, 2025
@github-actions
Copy link

github-actions bot commented Nov 18, 2025

Lines of code report

Total lines added: 399
Total lines removed: 1
Total lines changed: 400

Detailed view
+--------------------------------------------------+-------+------+
| File                                             | Lines | Diff |
+--------------------------------------------------+-------+------+
| ethrex/crates/blockchain/metrics/api.rs          | 48    | -1   |
+--------------------------------------------------+-------+------+
| ethrex/crates/blockchain/metrics/blocks.rs       | 164   | +164 |
+--------------------------------------------------+-------+------+
| ethrex/crates/blockchain/metrics/process.rs      | 84    | +84  |
+--------------------------------------------------+-------+------+
| ethrex/crates/blockchain/metrics/transactions.rs | 151   | +151 |
+--------------------------------------------------+-------+------+

Copilot finished reviewing on behalf of rodrigo-o November 18, 2025 19:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the unnecessary metrics_ prefix from metric module file names now that they reside in a dedicated /metrics folder, improving code organization and clarity.

Key changes:

  • Renamed three core metric modules: metrics_blocksblocks, metrics_transactionstransactions, metrics_processprocess
  • Updated all import statements across the codebase to reference the new module names

Reviewed Changes

Copilot reviewed 9 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/blockchain/metrics/mod.rs Updated module declarations to remove metrics_ prefix
crates/blockchain/metrics/api.rs Updated imports to use new module names
crates/blockchain/metrics/blocks.rs Renamed file (content appears to be moved from metrics_blocks.rs)
crates/blockchain/metrics/transactions.rs Renamed file (content appears to be moved from metrics_transactions.rs)
crates/blockchain/metrics/process.rs Renamed file (content appears to be moved from metrics_process.rs)
crates/blockchain/payload.rs Updated imports to use new module names
crates/blockchain/blockchain.rs Updated imports to use new module names
crates/blockchain/fork_choice.rs Updated imports to use new module names
crates/l2/sequencer/metrics.rs Updated imports to use new module names
crates/l2/sequencer/block_producer.rs Updated imports to use new module names
crates/l2/sequencer/block_producer/payload_builder.rs Updated imports to use new module names
cmd/ethrex/initializers.rs Updated imports to use new module names
Comments suppressed due to low confidence (1)

crates/blockchain/metrics/mod.rs:42

  • The documentation comment contains an outdated example that still references metrics_transactions. This should be updated to transactions to reflect the module rename.
// use ethrex_metrics::metrics_transactions::{METRICS_TX};

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rodrigo-o rodrigo-o enabled auto-merge November 19, 2025 13:55
@rodrigo-o rodrigo-o changed the title chore(l1): renaming to remove metrics_ suffix to file names chore(l1): renaming to remove metrics_ prefix to file names Nov 19, 2025
@rodrigo-o rodrigo-o changed the title chore(l1): renaming to remove metrics_ prefix to file names chore(l1): renaming to remove metrics_ prefix from file names Nov 19, 2025
@rodrigo-o rodrigo-o added this pull request to the merge queue Nov 19, 2025
Merged via the queue into main with commit 7559ed1 Nov 19, 2025
52 checks passed
@rodrigo-o rodrigo-o deleted the renaming-metrics-files branch November 19, 2025 14:58
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Metrics modules renaming

4 participants