refactor(observability): hard-cutover rename gittensory_ metric prefix to loopover_#5522
Conversation
…x to loopover_ Renames all 139 emitted Prometheus/OTEL metric names across src/selfhost/metrics.ts and ~98 call sites, plus every downstream consumer: prometheus/rules/alerts.yml, all 10 Grafana dashboard JSON files (panel queries, titles, uids), the sqlite/AMS datasource provisioning and dashboard-provider config, scripts/backup-metrics.sh, scripts/smoke-selfhost.sh, two smoke-observability .mjs scripts, docker-compose.yml's backup-exporter healthcheck, the selfhost.yml CI smoke step, and three self-hosting docs pages that document these exact metric/alert names. Also fixes a pre-existing, unrelated bug surfaced while cross-checking the rename: metrics.ts registered HELP/TYPE metadata for the PR-files-fetch counter under an abbreviated name that never matched what backfill.ts actually emitted. Deliberately unchanged (real, separate, unrenamed identifier surfaces): GITTENSORY_* env vars, MCP tool names, the gittensory-api Worker/domain and Cloudflare Queue bindings, the Qdrant default collection name (renaming would orphan existing self-hosters' indexed embeddings without a migration step), gittensory_session/ oauth_state cookie names, the gittensory-native DB discriminant, GraphQL operation names, and packages/gittensory-engine's own miner-prediction metric names (deferred to the still-unplanned npm package rename). Closes #5330.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 3c93c18 | Commit Preview URL Branch Preview URL |
Jul 13 2026, 01:00 AM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5522 +/- ##
=======================================
Coverage 94.79% 94.79%
=======================================
Files 566 566
Lines 45065 45065
Branches 14675 14675
=======================================
Hits 42718 42718
Misses 1613 1613
Partials 734 734
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-13 01:57:27 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 7 non-blocking
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 Visual previewClick any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 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.
|
Summary
Hard-cutover rename (per maintainer decision on issue #5330) of all 139 emitted Prometheus/OTEL metric names (the issue text undercounted at 106 — this was audited empirically) from
gittensory_*toloopover_*, acrosssrc/selfhost/metrics.ts, ~98 call sites in ~20 files,prometheus/rules/alerts.yml(42 references), all 10 Grafana dashboard JSON files (panel queries, titles, uids), the sqlite/AMS datasource provisioning + dashboard-provider config,scripts/backup-metrics.sh,scripts/smoke-selfhost.sh, twosmoke-observability-*.mjsscripts,docker-compose.yml's backup-exporter healthcheck, theselfhost.ymlCI smoke step, and three self-hosting docs pages that document these exact metric/alert names.Also fixes a real, pre-existing bug surfaced while cross-checking the rename:
metrics.tsregistered HELP/TYPE metadata for the PR-files-fetch counter under an abbreviated name that never matched whatbackfill.tsactually emitted — these two names have never agreed, independent of this rebrand.Deliberately unchanged
Each a real, separate, unrenamed identifier surface:
GITTENSORY_*env vars and MCP tool names (separate, already-scoped rebrand items).gittensory-apiWorker/domain and its Cloudflare Queue bindings (gittensory-jobs, etc.) — real deploy/DNS implications, needs its own deliberate handling.gittensory_session/gittensory_oauth_statecookie names, thegittensory-nativeDB discriminant, GraphQL operation names.packages/gittensory-engine's own miner-prediction metric names — deferred to the npm package rename (currently blocked on re-planning against a new@loopoverorg).Test plan
npx vitest run test/unit/ test/integration/— 789/790 files, 15354/15360 tests, 0 failures.npm run typecheck— clean.npm run selfhost:validate-observability— dashboards and alert rules valid.loopover_-prefixed name inmetrics.tsagainst every occurrence inalerts.ymland all 10 dashboard JSON files for verbatim agreement (catches independent-agent name drift).gittensory-db→loopover-db) is consistent between provisioning and every dashboard that references it.npm run test:cigate green (fixed one prettier/line-wrap issue from string-length changes after the initial pass).Closes #5330.