Conversation
Comprehensive Code Review - PR #689Overall AssessmentThis PR adds a Grafana metrics dashboard for Anchor. The changes are generally good but there are several important issues that need to be addressed. Critical Issues1. Internal/Test Data Exposed in DashboardThe dashboard JSON contains hardcoded internal hostnames that appear to be from a development/testing environment:
Location: anchor-dash.json lines 3194-3227 (templating section) Impact:
Recommendation: Replace with placeholder values or remove the hardcoded options entirely, making it a dynamic query-based variable instead. 2. Inconsistent Documentation ReferencesThe metrics/README.md still references Summary.json dashboard (line 24), but that file does not exist in the repository. The new dashboard is anchor-dash.json. Location: metrics/README.md:24 Recommendation: Update the reference to anchor-dash.json or clarify the situation. Major Issues3. Incomplete PR DescriptionThe PR description does not follow the template in .github/PULL_REQUEST_TEMPLATE.md. It is missing:
Recommendation: Update the PR description to follow the template format. 4. Dashboard Title Does Not Match ContextThe dashboard title is "SSV gossipsub" which is quite narrow, but the dashboard includes many other metrics beyond gossipsub (health metrics, peer counts, bandwidth, queue processing, etc.). Location: anchor-dash.json line 3238 Recommendation: Consider a more comprehensive title like "Anchor Overview" or "Anchor Metrics Dashboard". Minor Issues5. Inconsistent TerminologyMultiple panels use "Warns" when they should say "Warnings" for consistency and proper English. Locations: Lines 228, 249, 320 in anchor-dash.json 6. Test/Development Regex PatternsSeveral transformation sections contain regex patterns specifically for the spesi.io domain, which appears to be internal infrastructure. These won't work for external users. Recommendation: Either remove these transformations or make them more generic/optional. 7. Empty Description FieldsSome panels have empty description fields. While not critical, adding helpful descriptions improves usability. Positive Aspects
Recommendations SummaryMust Fix Before Merge:
Should Fix: Nice to Have: Security AssessmentNo critical security vulnerabilities found. The internal hostname exposure is a minor information disclosure issue but not a severe security risk. Performance AssessmentDashboard queries look reasonable. Using rate intervals and aggregations appropriately. Documentation AssessmentMostly good, but needs consistency fixes mentioned above. |
README.md
Outdated
| ## Metrics | ||
|
|
||
| Anchor has a suite of metrics that can be accessed via prometheus and grafana. See the | ||
| [metrics](https://github.com/sigp/anchor/tree/stable/metrics) page for more information and how to |
There was a problem hiding this comment.
📝 Minor: Link may break
This link points to stable/metrics which might not contain this new dashboard until this PR is merged to stable. Consider if you need to update this link or add a note about availability.
Comprehensive Code Review - PR #689Overall AssessmentThis PR adds a Grafana metrics dashboard for monitoring Anchor nodes. The changes are well-structured and appropriate for a documentation/tooling enhancement. The PR is limited in scope to metrics configuration and documentation updates. ✅ Strengths1. Clear Scope & Purpose
2. Documentation Updates
3. File Organization
4. Dashboard QualityThe Grafana dashboard appears comprehensive with:
📝 Minor Issues & Recommendations1. Documentation InconsistencyThe old README still references Summary.json dashboard which does not exist. This should have been updated to anchor-dash.json to match the other documentation updates. Impact: Users following the metrics/README.md will be confused when they cannot find Summary.json. 2. Missing PR Template AdherenceThe PR body is minimal. According to .github/PULL_REQUEST_TEMPLATE.md, it should include:
3. Typo in metrics/README.mdLine 5: "Here we provides" should be "Here we provide" 🔒 Security Review✅ No security concerns identified
⚡ Performance Review✅ No performance concerns
🧪 Testing ReviewNot Applicable - This PR contains only configuration and documentation. Recommendation: Consider adding validation in CI for:
📚 Documentation Review✅ Good Practices
|
README.md
Outdated
| ## Metrics | ||
|
|
||
| Anchor has a suite of metrics that can be accessed via prometheus and grafana. See the | ||
| [metrics](https://github.com/sigp/anchor/tree/stable/metrics) page for more information and how to |
There was a problem hiding this comment.
Consider: Branch-agnostic link
This link points to the stable branch, but developers working on unstable (as recommended above) might expect to see their branch's version of the metrics documentation.
Consider either:
- Using a branch-agnostic GitHub link (without
/tree/stable/) - Or using a relative link:
[metrics](./metrics)(though this only works when viewing from the repo root) - Or adding a note that the link always points to stable documentation
Not a blocker, but something to consider for user experience.
Co-authored-by: claude-code-actions-sigp[bot] <237671998+claude-code-actions-sigp[bot]@users.noreply.github.com>
Comprehensive Code Review - PR #689Thank you for adding a metrics dashboard! This is a valuable addition that will help users monitor their Anchor nodes. Below is my comprehensive review across all requested focus areas. 📊 SummaryPR Status: Overall Assessment: This PR adds useful monitoring infrastructure, but has a few critical documentation issues that must be fixed.
🔴 Critical Issues (Must Fix)1. Directory Path Typo in metrics.mdxFile: 2. Empty Placeholder FileFile: 3. Grammar ErrorFile:
|
Co-authored-by: claude-code-actions-sigp[bot] <237671998+claude-code-actions-sigp[bot]@users.noreply.github.com>
| # Anchor Metrics | ||
|
|
||
| [](https://postimg.cc/4YMRN4Xc) | ||
|  |
There was a problem hiding this comment.
Nice improvement! Moving from external image hosting (postimg.cc) to local repo storage (img/metrics.png) improves reliability and security.
README.md
Outdated
|
|
||
| ## Metrics | ||
|
|
||
| Anchor has a suite of metrics that can be accessed via prometheus and grafana. See the |
There was a problem hiding this comment.
Good addition! This properly directs users to the metrics documentation. Consider adding a brief one-line description of what metrics are available (e.g., "Anchor exposes Prometheus metrics for monitoring node health, consensus performance, and network statistics.") to give users context before they click through.
| 1. Import some dashboards from the `metrics/dashboards` directory in this repo: | ||
| - In the Grafana UI, go to `Dashboards` -> `Manage` -> `Import` -> `Upload .json file`. | ||
| - The `Summary.json` dashboard is a good place to start. | ||
| - The `anchor-dash.json` dashboard is a good place to start. |
There was a problem hiding this comment.
✅ Correct update - properly references the new anchor-dash.json dashboard. However, metrics/README.md:24 still references the old Summary.json and should be updated to match.
Comprehensive Code Review for PR #689SummaryThis PR adds a Grafana dashboard configuration for Anchor metrics monitoring. The changes are primarily documentation and configuration additions, with minimal code changes. Overall, this is a positive contribution that improves the observability story for Anchor users. Review Breakdown by Focus Area1. Code Quality
|
| Priority | Action | File/Location |
|---|---|---|
| HIGH | Update PR description to follow template | PR description |
| HIGH | Fix documentation inconsistency | metrics/README.md:24 |
| MEDIUM | Add testing notes to PR | PR description |
| MEDIUM | Document Grafana version requirements | metrics/README.md |
| LOW | Clarify purpose of dashboards_here file |
metrics/dashboards/ |
| LOW | Add dashboard variable configuration docs | metrics/README.md |
Final Verdict
✅ APPROVE with minor changes requested
This is a solid contribution that adds real value for Anchor operators. The issues identified are mostly documentation inconsistencies and process items (PR template), not technical problems. Once the documentation is aligned and PR description updated, this is ready to merge.
Key Strengths:
- Comprehensive monitoring coverage
- Well-structured dashboard
- Good documentation updates
- Follows Conventional Commits
Key Improvements Needed:
- Fix documentation inconsistency in metrics/README.md
- Follow PR template properly
Compliance Checks
- ✅ PR Title: Follows Conventional Commits format ("feat: Add metrics dash")
⚠️ PR Description: Needs more detail per template- ✅ File Changes: Appropriate for the feature being added
- ✅ Branch: Correctly based on metrics branch
Additional Issue FoundThere is an inconsistency that needs to be addressed: File: The file Current text in metrics/README.md:24: - The `Summary.json` dashboard is a good place to start.Should be changed to: - The `anchor-dash.json` dashboard is a good place to start.This ensures consistency across all documentation files. |
metrics/dashboards/anchor-dash.json
Outdated
| "options": [ | ||
| { | ||
| "selected": false, | ||
| "text": "ma-h-sv-claw.spesi.io:15100", | ||
| "value": "ma-h-sv-claw.spesi.io:15100" | ||
| }, | ||
| { | ||
| "selected": true, | ||
| "text": "ma-s-sv-tusk.spesi.io:15100", | ||
| "value": "ma-s-sv-tusk.spesi.io:15100" | ||
| }, | ||
| { | ||
| "selected": false, | ||
| "text": "ma-s-sv-fang.spesi.io:15100", | ||
| "value": "ma-s-sv-fang.spesi.io:15100" | ||
| }, | ||
| { | ||
| "selected": false, | ||
| "text": "ma-h-sv-beak.spesi.io:15100", | ||
| "value": "ma-h-sv-beak.spesi.io:15100" | ||
| } | ||
| ], | ||
| "query": "ma-h-sv-claw.spesi.io:15100, ma-s-sv-tusk.spesi.io:15100, ma-s-sv-fang.spesi.io:15100, ma-h-sv-beak.spesi.io:15100", |
There was a problem hiding this comment.
🔴 CRITICAL: Information Disclosure - Hardcoded Internal Infrastructure
This dashboard contains hardcoded hostnames from what appears to be Sigma Prime's internal infrastructure:
- ma-h-sv-claw.spesi.io:15100
- ma-s-sv-tusk.spesi.io:15100
- ma-s-sv-fang.spesi.io:15100
- ma-h-sv-beak.spesi.io:15100
Security/Privacy Issues:
- Exposes internal infrastructure naming conventions
- Reveals internal domain names (.spesi.io)
- May expose network topology information
- The selected instance (ma-s-sv-tusk) suggests this was exported directly from a live production environment
Recommendation:
Replace with generic placeholder that users can customize:
| "options": [ | |
| { | |
| "selected": false, | |
| "text": "ma-h-sv-claw.spesi.io:15100", | |
| "value": "ma-h-sv-claw.spesi.io:15100" | |
| }, | |
| { | |
| "selected": true, | |
| "text": "ma-s-sv-tusk.spesi.io:15100", | |
| "value": "ma-s-sv-tusk.spesi.io:15100" | |
| }, | |
| { | |
| "selected": false, | |
| "text": "ma-s-sv-fang.spesi.io:15100", | |
| "value": "ma-s-sv-fang.spesi.io:15100" | |
| }, | |
| { | |
| "selected": false, | |
| "text": "ma-h-sv-beak.spesi.io:15100", | |
| "value": "ma-h-sv-beak.spesi.io:15100" | |
| } | |
| ], | |
| "query": "ma-h-sv-claw.spesi.io:15100, ma-s-sv-tusk.spesi.io:15100, ma-s-sv-fang.spesi.io:15100, ma-h-sv-beak.spesi.io:15100", | |
| "options": [ | |
| { | |
| "selected": true, | |
| "text": "localhost:15100", | |
| "value": "localhost:15100" | |
| } | |
| ], | |
| "query": "localhost:15100", |
This prevents information disclosure while still providing a functional starting point for users.
|  | ||
|
|
||
| Here we provides a `docker-compose` environment which scrapes metrics from Anchor | ||
| Here we provide a `docker-compose` environment which scrapes metrics from Anchor |
There was a problem hiding this comment.
✅ Good fix! The grammar correction from "Here we provides" to "Here we provide" is correct.
| # Anchor Metrics | ||
|
|
||
| [](https://postimg.cc/4YMRN4Xc) | ||
|  |
There was a problem hiding this comment.
✅ Excellent improvement! Switching from an external image host (postimg.cc) to a local image file improves:
- Reliability (no dependency on external services)
- Privacy (no external requests when viewing README)
- Control (image can't be modified or removed by third parties)
- Performance (served directly from GitHub)
Comprehensive Code Review SummaryOverviewThis PR adds a Grafana metrics dashboard (anchor-dash.json) for Anchor operators, updates documentation, and switches from external image hosting to local files. Key Findings🔴 Critical Issue - MUST FIXInformation Disclosure in Dashboard (see inline comment on anchor-dash.json:3205-3227)
🟡 Documentation GapInconsistent Dashboard Reference
✅ Positive Aspects
Review ChecklistCode Quality: ✅ Good
Security:
|
Comprehensive Code Review - PR #689Overall AssessmentThis PR adds a Grafana dashboard configuration for monitoring Anchor metrics. The changes are primarily documentation and configuration additions, with no code changes to the core application. Overall, this is a positive contribution that improves observability for users. ✅ Strengths
📋 Review by Category1. Code Quality ✅ PASS
2. Security ✅ PASS
3. Performance ✅ PASS
4. Testing
|
This adds a metrics dashboard for users to start with.