Skip to content

docs(observability): design trace context on every outbound Go hop (RIG-5321) - #2271

Closed
rigel-mintaka wants to merge 6 commits into
mainfrom
compass-ux/5321-trace-hops-design
Closed

rigel-mintaka wants to merge 6 commits into
mainfrom
compass-ux/5321-trace-hops-design

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR adds the design record docs/designs/observability/compass-go-trace-hops/design.md. It answers Matt's ruling on RIG-5276: "need traceparents everywhere, make sure we're passing it through all services/RPCs".

The trace-logs record (#2219) puts a span on every inbound request. This record covers the outbound hops that still drop the trace:

  • H1: guest control client spans (runner → guestd), with options passed in from main.
  • H2: otelx.HTTPTransport on every server HTTP egress (forge, Linear, Trunk, linearagent, auth verifier, object store). url.full query values are redacted.
  • H3: a pgx tracer for Postgres spans.
  • H4: the fabric DLQ keeps the traceparent.
  • H5: the in-process bus takes ctx on every publish.
  • H6: bus tails and presence edges restore the trace.
  • H7: a gate, so a new uncarried egress fails CI.

No proto change. Tasks stack on the trace-logs stack (T9, #2270).

Do not merge yet. Open Question 1 (third-party egress: inject the header or record a span only) is load-bearing and waits on Matt's ruling in RIG-5398. Open Question 10 (a traceparent on runner frames, one internal proto field) is in the same issue.

Verification

Risks

  • No code changes in this PR.
  • The implementation adds client spans and Postgres spans. Under the RIG-5373 spend freeze it does not merge until hard spend caps land.

Compatibility

  • No public or internal wire change.

Documentation

The record is the spec.

Spec-impact: none

Ledger-impact: none — design text only; no decision-ledger row changes.

Refs RIG-5321, RIG-5186

@trunk-io

trunk-io Bot commented Oct 13, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@linear-code

linear-code Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

RIG-5186

RIG-5321

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-ux-5321-trace-hops-d.compass-eng-docs.pages.dev

Deployed from compass-ux/5321-trace-hops-design at cf476cb.

Changed pages:

rigel-mintaka and others added 4 commits October 14, 2026 22:44
…IG-5321)

Spec-impact: none
Refs RIG-5321
Refs RIG-5186

Co-authored-by: Matt Wilkinson <matt@rigel.build>
…s per call (RIG-5321)

Spec-impact: none
Refs RIG-5321
Refs RIG-5186

Co-authored-by: Matt Wilkinson <matt@rigel.build>
… an open question (RIG-5321)

Spec-impact: none
Refs RIG-5321
Refs RIG-5186

Co-authored-by: Matt Wilkinson <matt@rigel.build>
…outer (RIG-5321)

Spec-impact: none
Refs RIG-5321
Refs RIG-5186

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the compass-ux/5321-trace-hops-design branch from 628a759 to aace901 Compare October 15, 2026 03:05
rigel-mintaka and others added 2 commits October 15, 2026 00:12
…IG-5321)

OQ1 is (b): third-party egress gets a client span and no traceparent
header. OQ10 is (b): add H8, a per-frame traceparent on PublishEvents,
restored before deliverSession so runner-caused presence edges keep
the command's trace.

Spec-impact: none
Ledger-impact: none
Refs RIG-5398

Co-authored-by: Matt Wilkinson <matt@rigel.build>
…he gateway publisher (RIG-5321)

The shared publisher runs on the socket-lifetime ctx, so H8 now passes the
traceparent per frame through sendLocked and forwardState, and tests both the
shared and one-shot streams.

Spec-impact: none
Ledger-impact: none
Refs RIG-5321
Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka

rigel-mintaka commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Review result

  • reviewedSha: cf476cb70117ad90f408b3b8494fb94a0e4ed8b0
  • reviewedBase: 52c78ef0bc63bc62baa83eea991a4ed7d4290748
  • Result: all-clear (0 high, 0 medium open)

Notes: 0018da4 records Matt's RIG-5398 rulings (OQ1=(b), OQ10=(b)) and adds H8. Review found one medium: H8 had no path for the Reload trace on the shared publisher stream. cf476cb passes the traceparent per frame through sendLocked/forwardState and tests both shared and one-shot streams; re-review 0 findings. Field 5 is free in PublishEventsRequest.

Gates: rumdl and design-ledger-gate pass; pre-push hooks pass.

Promote to ready once CI is green; merging it freezes the amendment.

@rigel-mintaka
rigel-mintaka marked this pull request as ready for review October 15, 2026 05:31
@rigel-mintaka

Copy link
Copy Markdown
Contributor Author

Moved to RigelBuild/docs#18. Design records now live in the docs repo. The record is unchanged except that its two parent links are absolute URLs to compass main.

@rigel-mintaka
rigel-mintaka deleted the compass-ux/5321-trace-hops-design branch October 15, 2026 16:33
rigel-mintaka added a commit to RigelBuild/docs that referenced this pull request Oct 15, 2026
…IG-5321)

Moved unchanged from RigelBuild/compass#2271, which closes. The two parent
records stay in the compass repo until the corpus moves, so they link there
by absolute URL.

Ledger-impact: none
Spec-impact: none
Refs RIG-5321

Co-authored-by: Matt Wilkinson <matt@rigel.build>
mattwilkinsonn added a commit to RigelBuild/docs that referenced this pull request Oct 16, 2026
…IG-5321) (#18)

Moved unchanged from RigelBuild/compass#2271, which closes. The two parent
records stay in the compass repo until the corpus moves, so they link there
by absolute URL.

Ledger-impact: none
Spec-impact: none
Refs RIG-5321

Co-authored-by: Matt Wilkinson <matt@rigel.build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant