Skip to content

feat(observability): cross-link the AMS miner-usage dashboard from the resource hub - #5647

Closed
JSONbored wants to merge 2 commits into
mainfrom
resource-hub-miner-crosslink
Closed

feat(observability): cross-link the AMS miner-usage dashboard from the resource hub#5647
JSONbored wants to merge 2 commits into
mainfrom
resource-hub-miner-crosslink

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Stacked on #5646 (needs grafana/dashboards/miner-usage.json to exist — this PR's base branch is #5646's branch, not main, so the diff shown here is scoped to just this change; it'll retarget main automatically once #5646 merges).

  • Adds a **[Miner usage (AMS)](/d/loopover-miner-usage)** bullet to resource-hub.json's existing "Observability & dashboards" markdown panel, immediately after the "AI usage" bullet — matching that panel's exact established - **[Title](/d/uid)** — note. style (same panel type, same markdown-list convention every other cross-linked dashboard in that panel already uses).
  • The note is short (per req 3): AMS (gittensory-miner) is a separate local CLI, worth checking if you're also running it alongside ORB.
  • Additive only — the "Integrated services" panel and every other panel/datasource/variable in the hub are untouched (verified by test).

Visual verification (real Grafana, not just JSON validation)

Spun up a real local grafana/grafana:13.1.0 container with grafana/dashboards + grafana/provisioning/dashboards mounted (no other services — this only needed dashboard auto-provisioning, not live data) and confirmed live in a browser:

  • The new "Miner usage (AMS)" bullet renders in the resource hub's "Observability & dashboards" panel, positioned and styled identically to its sibling bullets (same bold-link + em-dash-note format), immediately after "AI usage".
  • The Integrated services panel is visually unchanged.
  • Navigating to /d/loopover-miner-usage resolves to the real miner-usage dashboard (page title confirms "LoopOver — Miner usage (AMS)") — the link target is not a dead/typo'd path.

(Not attaching the actual screenshot files to this PR body — no straightforward CLI path to embed local images in a gh pr create body — but the verification above was performed against a real running instance, not asserted from the JSON alone.)

Test plan

  • npm run selfhost:validate-observability
  • New test/unit/selfhost-grafana-resource-hub-dashboard.test.ts (6 cases): structural validator pass, exactly one new bullet added (no new panel/panel-type), Integrated services panel byte-unchanged, the linked /d/<uid> resolves to miner-usage.json's real uid (catches a typo'd path), the AMS note is present and reasonably short, and the bullet sits immediately after "AI usage" (not appended out of place)
  • npm run typecheck
  • Real Grafana visual verification (see above)
  • git diff --check

Closes #5189

…ost, and attempt outcomes

Adds grafana/dashboards/miner-usage.json: a single dashboard (a
$provider template variable, not one dashboard per provider) showing
per-provider attempt success/fail counts, total cost, and total
tokens, reading only the redacted attempt_outcome_summary rows the
AMS reporting export exposes via the AMS Attempt Log SQLite
datasource -- no Prometheus scraping.

Cross-references ai-usage.json (ORB) in both directions via a
top-level `links` entry, matching the only existing dashboard-to-
dashboard link convention in this repo (resource-hub.json's own
links array). ai-usage.json's other panels/variables are untouched.
…e resource hub

Adds a "Miner usage (AMS)" bullet to resource-hub.json's existing
"Observability & dashboards" markdown panel, right after "AI usage" --
same bullet style, matching the hub's own established pattern for
cross-linking other integrated dashboards. Additive only: the
"Integrated services" panel and every other panel/datasource/variable
in the hub are untouched.
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

Base automatically changed from miner-usage-grafana-dashboard to main July 13, 2026 19:37
@JSONbored JSONbored self-assigned this Jul 13, 2026
@JSONbored

Copy link
Copy Markdown
Owner Author

Superseded: #5189 was independently implemented and merged via #5640 while this PR was open (a different, equally valid approach — a dedicated AMS panel linking to the observability guide, vs. this PR's bullet-in-existing-panel approach). Closing as duplicate; the conflicts are with #5640's already-merged panel addition, not worth resolving for redundant work.

@JSONbored JSONbored closed this Jul 13, 2026
@JSONbored
JSONbored deleted the resource-hub-miner-crosslink branch July 13, 2026 19:38
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 13, 2026
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.03%. Comparing base (941c300) to head (816ca7e).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5647   +/-   ##
=======================================
  Coverage   95.03%   95.03%           
=======================================
  Files         577      577           
  Lines       45920    45920           
  Branches    14695    14695           
=======================================
  Hits        43640    43640           
  Misses       1528     1528           
  Partials      752      752           
Flag Coverage Δ
shard-1 43.49% <ø> (-0.43%) ⬇️
shard-2 35.81% <ø> (+0.13%) ⬆️
shard-3 32.13% <ø> (-0.06%) ⬇️
shard-4 32.68% <ø> (+0.10%) ⬆️
shard-5 31.48% <ø> (-0.29%) ⬇️
shard-6 44.66% <ø> (+0.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an AMS cross-link panel to resource-hub.json

1 participant