feat(observability): provision Grafana datasources for AMS local SQLite ledgers - #5397
Conversation
…te ledgers Add grafana/provisioning/datasources/ams-ledgers.yml wiring two scrape-free frser-sqlite-datasource entries at the miner's append-only attempt-log and prediction-ledger SQLite files (JSONbored#5184), so a follow-on AMS usage dashboard can query them read-only — mirroring the maintainer GittensoryDB entry in sqlite.yml. Purely additive: no existing datasource file is touched, fresh UIDs (ams-attempt-log / ams-prediction-ledger), no dashboards/queries authored (out of scope). The per-install path is a documented placeholder — operators mount their GITTENSORY_MINER_CONFIG_DIR into Grafana at /ams-ledgers:ro, so the read-only query plugin can never write the live ledgers. Closes JSONbored#5184
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5397 +/- ##
==========================================
- Coverage 94.44% 94.40% -0.04%
==========================================
Files 552 552
Lines 44291 44291
Branches 14657 14657
==========================================
- Hits 41832 41815 -17
- Misses 1784 1801 +17
Partials 675 675
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-12 16:27:13 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Adds
grafana/provisioning/datasources/ams-ledgers.ymlwiring two scrape-freefrser-sqlite-datasourceentries at the miner's append-only attempt-log and prediction-ledger SQLite files (#5184), so a follow-on AMS usage dashboard can query them — mirroring the maintainerGittensoryDBentry insqlite.yml.Scope (matches the issue exactly)
loki/prometheus/sqlite/tempo) is modified.editable: false,access: proxy; documented:romount so Grafana can never write the live ledgers.ams-attempt-log,ams-prediction-ledger) — no collision with existing datasources.path:is a placeholder with inline instructions to mountGITTENSORY_MINER_CONFIG_DIRat/ams-ledgers:ro.Validation
test/unit/ams-ledgers-datasource.test.ts(3 tests): the two datasources point at the attempt-log + prediction-ledger files and arefrser-sqlite-datasource; the read-only invariant holds (editable: false,access: proxy, no write-enabling knob); and the UIDs are fresh with every existing datasource left untouched (additive).tsctypecheck clean; prettier-clean; no secrets. Config only — nosrc/**logic, no runtime touched.Closes #5184