feat(node): add morphnode_info metrics gauge - #1071
MarvelFisher wants to merge 1 commit into
Conversation
Expose morphnode's build/version metadata as a static Prometheus info
gauge, mirroring morph-reth's reth_info{} gauge: morphnode_info{...} is
permanently set to 1, and version/git_commit/build_time (populated via
the existing -ldflags injection) plus go_version/os/arch are carried as
labels rather than the value. Registered once at startup on the default
registry, so it's exposed regardless of which branch brings up /metrics.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe PR adds a version metrics package, tests its Prometheus and no-op implementations, moves a dependency to direct scope, and registers ChangesPrometheus metadata metric
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant L2NodeMain
participant PrometheusMetrics
participant DefaultPrometheusRegistry
L2NodeMain->>PrometheusMetrics: provide morphnode build metadata
PrometheusMetrics->>DefaultPrometheusRegistry: register morphnode_info
DefaultPrometheusRegistry-->>L2NodeMain: expose gauge value 1
Merge Risk: ⚪ Minimal · up to The change adds build metadata metrics with focused coverage and is ready to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Expose morphnode's build/version metadata as a static Prometheus info gauge, mirroring morph-reth's reth_info{} gauge: morphnode_info{...} is permanently set to 1, and version/git_commit/build_time (populated via the existing -ldflags injection) plus go_version/os/arch are carried as labels rather than the value. Registered once at startup on the default registry, so it's exposed regardless of which branch brings up /metrics.
Summary by CodeRabbit
/metricsendpoint.