Repository navigation
feat(o11y): join the board feed to the app's traces - #59
Merged
Merged
Conversation
The app sends the traceparent of its feed.board span with Subscribe (an optional field, so older builds keep working). The session runs its first poll under it, and later alarm polls link back to it. DepartureGateway.getBoards links to the call whose Golemio fetch it reused, whether it awaited that fetch or hit the cache it filled, and records how each board was served. Session polls record their trigger and outcome. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SDM2pVeSUgwNr2EUZAajLo
|
🚀 Preview deployed: https://preview-59.tablo.run |
i11v
marked this pull request as ready for review
October 17, 2026 23:20
i11v
added a commit
that referenced
this pull request
Oct 17, 2026
<!-- claude-projects-attribution: {"github_login":"i11v"} -->
_Requested by **Ilnur** · [project
thread](https://claude.ai/code/project/chan_015jUPvh4v8p3jXuvn8TmyCX?thread=cmsg_015jUPvh4v8p3jXuvn8TmyCXMd3FYuzHiurWCowHHeniLq)_
Stacked on #59 (it uses that PR's trace helpers); the base switches to
`main` once #59 merges.
Before: a `TransitGateway.getTripVehicle` or `getVehicles` span looks
the same whether it fetched from Golemio, waited on another request's
fetch, hit the cache, or served stale data after upstream failed.
After: those spans say which (`tablo.cache` = `hit` / `inflight` /
`fetched`), with `tablo.outcome`, and `tablo.cache.stale` +
`tablo.reason` when a stale answer stood in for a failed fetch. Hits and
shared fetches link to the span that did the fetch, the same way #59
does for boards.
How: `makeOutcomeCache` keeps the fetching span's ids with each
in-flight claim and cache entry, and annotates and links the caller's
span. Two new tests in `transit.test.ts` check the attributes and links
with a recording tracer (moved into `test/fakes.ts` so both gateway
suites share it).
---
_Generated by [Claude
Code](https://claude.ai/code/session_01SDM2pVeSUgwNr2EUZAajLo)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Ilnur · project thread
Before: the app's
feed.boardspan (waiting for a stop's board) and the worker's poll that answers it are separate traces, since the socket carries no trace context. When one Golemio fetch serves several sessions, or a board comes from cache, nothing ties the reusing call to the fetch.After: the app's first board for a stop shows up as one trace from
feed.boardthroughClientSession.pollandDepartureGateway.getBoardsto the Golemio request. Calls that reuse another call's fetch link to it, and spans say how each board was served.How:
Subscribegets an optionaltraceparent. Backward compatible (contract:checkpasses); new fixturews-subscribe-traced.DeparturesFeedasks the stop model for the openfeed.boardspan's traceparent when it sends a subscription. On a stop switch the board wait now starts before the subscribe, so it carries the trace.ClientSession: the poll onSubscriberuns under the client's span; alarm polls link back to it (tablo.link=subscription, in memory only). Polls recordtablo.poll.trigger,tablo.poll.outcome(sent / superseded / idle / failed),tablo.selectors,tablo.sockets, plustablo.erroron failure.DepartureGateway.getBoards: in-flight claims and cache entries remember the span that fetched them. A call that awaits another's fetch links to it (tablo.link=inflight); a cache hit links to the call that filled it (tablo.link=cached). Attributes:tablo.boards.{requested,cached,fetched,awaited,stale,missing},tablo.degraded,tablo.reason.Generated by Claude Code