Skip to content

fix(observability): harden self-host trace pipeline - #1853

Merged
JSONbored merged 5 commits into
mainfrom
codex/fix-tempo-trace-pipeline
Jun 30, 2026
Merged

fix(observability): harden self-host trace pipeline#1853
JSONbored merged 5 commits into
mainfrom
codex/fix-tempo-trace-pipeline

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • Fixes fix(observability): repair Grafana Tempo trace pipeline #1845 by making Tempo readiness explicit before Grafana or the OTEL collector depend on it.
  • Adds a self-host smoke command that sends one synthetic OTLP trace through the collector and verifies Tempo can return it by trace id.
  • Documents how to split Grafana trace failures between collector ingestion, Tempo retrieval, and Grafana datasource wiring.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked an issue, or this is small enough that the summary explains why an issue is not needed.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ≥97% coverage of the lines AND branches you changed (aim for 98%+ on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • Skipped workflow, worker, MCP, and OpenAPI checks locally because this change is limited to Compose observability config, one self-host smoke script, and docs text. CI should still run the full aggregate gate.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

Docs text only; no layout, component state, or visual behavior changed. Validated with npm run ui:build.

Notes

  • Verified the pinned Tempo config and OTEL collector config against their container images.
  • Ran a local end-to-end smoke using the pinned Tempo and collector containers: OTEL collector accepted a synthetic trace and Tempo returned it by trace id.

@dosubot dosubot Bot added the size:L label Jun 30, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 30, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui 912db0e Commit Preview URL

Branch Preview URL
Jun 30 2026, 10:27 AM

@loopover-orb

loopover-orb Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-06-30 10:51:21 UTC

6 files · 1 AI reviewer · no blockers · readiness 77/100 · CI green · clean

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review

Review summary
This change makes the self-host observability path more explicit by adding a Tempo readiness check, gating the collector on that check, and adding an operator smoke script that pushes one OTLP trace through the collector and reads it back from Tempo. The Grafana password handling still fails closed at runtime while avoiding Compose interpolation failures when the observability profile is inactive. The docs and unit test cover the intended trace path and the profile-sensitive Compose behavior, so the visible diff is safe enough to proceed.

Nits — 6 non-blocking
  • nit: scripts/smoke-observability-traces.mjs:39 should put an AbortSignal or per-request timeout around both fetch calls so OBSERVABILITY_SMOKE_TIMEOUT_MS bounds hung HTTP requests, not just successful polling iterations.
  • nit: scripts/smoke-observability-traces.mjs:47 relies on JSON.stringify(json).includes(...) instead of inspecting the returned trace/span structure, which makes the smoke assertion less precise than it could be.
  • scripts/smoke-observability-traces.mjs:39 add an AbortController per fetch attempt and include the failing phase in the error so operators can distinguish collector hangs from Tempo hangs.
  • scripts/smoke-observability-traces.mjs:47 parse the Tempo response into spans and check for the expected span name/trace id directly instead of substring-matching the serialized payload.
  • PR author also opened the linked issue — Link an issue that was opened by a different contributor, or provide a rationale for why this self-authored issue represents genuine discovery work.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #1845
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (size label size:L; 1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 2 registered-repo PR(s), 2 merged, 270 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 2 PR(s), 270 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Review context
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Triage stale or unlinked PRs.
  • No action.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 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.

  • Re-run Gittensory review

@JSONbored JSONbored self-assigned this Jun 30, 2026
@loopover-orb loopover-orb Bot added gittensor gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jun 30, 2026
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.72%. Comparing base (6b4393f) to head (e66e574).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1853   +/-   ##
=======================================
  Coverage   95.72%   95.72%           
=======================================
  Files         215      215           
  Lines       23521    23521           
  Branches     8496     8496           
=======================================
  Hits        22516    22516           
  Misses        418      418           
  Partials      587      587           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread docker-compose.yml Outdated
@superagent-security superagent-security Bot added the pr:flagged PR flagged for review by security analysis. label Jun 30, 2026
@superagent-security superagent-security Bot removed the pr:flagged PR flagged for review by security analysis. label Jun 30, 2026
@JSONbored
JSONbored merged commit fad9bec into main Jun 30, 2026
14 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 30, 2026
@JSONbored
JSONbored deleted the codex/fix-tempo-trace-pipeline branch June 30, 2026 10:54
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

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

fix(observability): repair Grafana Tempo trace pipeline

1 participant