Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

feat(derive): Initial Metrics#2007

Merged
clabby merged 4 commits intomainfrom
rf/derive-metrics
Jun 4, 2025
Merged

feat(derive): Initial Metrics#2007
clabby merged 4 commits intomainfrom
rf/derive-metrics

Conversation

@refcell
Copy link
Contributor

@refcell refcell commented Jun 4, 2025

Description

Sets up the first set of metrics for kona-derive.

Closes #1981
Closes #1982

@refcell refcell added the A-derivation Area: derivation label Jun 4, 2025
Copilot AI review requested due to automatic review settings June 4, 2025 18:30
@refcell refcell self-assigned this Jun 4, 2025
@refcell
Copy link
Contributor Author

refcell commented Jun 4, 2025

📚 $\text{Stack Overview}$

Pulls submitted in this stack:

This comment was automatically generated by st.

@codecov
Copy link

codecov bot commented Jun 4, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 19 lines in your changes missing coverage. Please review.

Project coverage is 83.5%. Comparing base (19a313d) to head (b8ba2a8).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/protocol/derive/src/metrics/mod.rs 0.0% 19 Missing ⚠️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Sets up initial metrics support for the kona-derive pipeline.

  • Marks the macros crate as no_std
  • Defines metric identifiers and an init/describe/zero API
  • Instruments the L1 traversal stage and adds a metrics feature with optional dependency

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
crates/utilities/macros/src/lib.rs Added #![no_std]
crates/protocol/derive/src/stages/l1_traversal.rs Added update_origin, inc! and timing instrumentation
crates/protocol/derive/src/metrics/mod.rs New Metrics struct with constants and init/describe/zero API
crates/protocol/derive/src/lib.rs Conditional no_std and exposed metrics module
crates/protocol/derive/Cargo.toml Added optional metrics dependency and feature
Comments suppressed due to low confidence (3)

crates/protocol/derive/src/metrics/mod.rs:19

  • The doc comment refers to the P2P stack but this is for the derivation pipeline. Update the comment to accurately describe its scope.
/// Initializes metrics for the P2P stack.

crates/protocol/derive/src/stages/l1_traversal.rs:79

  • New metric recording logic is not covered by existing tests; consider adding tests to verify that metrics are initialized and recorded correctly under the metrics feature.
#[cfg(feature = "metrics")]

crates/utilities/macros/src/lib.rs:9

  • [nitpick] Applying #![no_std] unconditionally may prevent macros that rely on std from compiling. Consider conditionally enabling no_std based on a feature.
#![no_std]

@refcell refcell changed the title feat(derive): Metrics feat(derive): Initial Metrics Jun 4, 2025
Copy link
Contributor

@clabby clabby left a comment

Choose a reason for hiding this comment

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

Neat :D

@clabby clabby enabled auto-merge June 4, 2025 20:31
@clabby clabby added this pull request to the merge queue Jun 4, 2025
Merged via the queue into main with commit 52b8e0e Jun 4, 2025
22 of 23 checks passed
@clabby clabby deleted the rf/derive-metrics branch June 4, 2025 20:46
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Dec 10, 2025
### Description

Sets up the first set of metrics for `kona-derive`.

Closes op-rs/kona#1981
Closes op-rs/kona#1982
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 14, 2026
### Description

Sets up the first set of metrics for `kona-derive`.

Closes #1981
Closes #1982
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A-derivation Area: derivation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(derive/traversal): Advance Origin Delay feat(derive/traversal): Pipeline Origin Gauge

3 participants