Repository navigation
feat(slack): Keep resumed Slack slices in the Turn trace - #2408
Merged
thomasjiangcy merged 1 commit intoOct 30, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
sentry-junior
Bot
force-pushed
the
feat/slack-resumed-turn-trace
branch
from
October 30, 2026 03:31
e808ea3 to
57f2a00
Compare
Part of #2269 Co-Authored-By: Thomas Jiang <20501235+thomasjiangcy@users.noreply.github.com>
sentry-junior
Bot
force-pushed
the
feat/slack-resumed-turn-trace
branch
from
October 30, 2026 03:34
57f2a00 to
9094070
Compare
thomasjiangcy
marked this pull request as ready for review
October 30, 2026 03:49
thomasjiangcy
approved these changes
Oct 30, 2026
9 tasks done
This branch was successfully deployed
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.
Part of #2269. Stacked on #2406.
A Turn that yields, hits the hard timeout, or waits for OAuth continues in a resumed slice. Before this change, a resumed slice did not open a turn span. Its attributes went onto the worker span, and the slice had no connection to the trace of the first slice.
Trace context on the Turn cursor
TurnRecord.traceIdbecomestraceContext({ sentryTrace, baggage }). Nothing readtraceId, andcheckpoint.tsoverwrote it on each save.storedTurnRecordSchemauses.strip(), so an older worker ignores the new field.Resumed slice span
getPausedTurnRequestreturns the stored trace context.runPausedTurnpasses it toresumeSlackTurn.resumeSlackTurnruns in achat.turnspan throughwithTurnSpanfrom feat(slack): Put Slack turns in the ingress trace #2406. It continues the stored trace and links to thequeue.processworker span.TELEMETRY.mdalready listed a "resumedchat.turn" under Auth And Resume. This change keeps that name and does not add a new span name or attribute. A resumedchat.turnis a child of the first slice, so you can tell it apart from the firstchat.turnby its parent.chat.turnthat is a child of the worker span.All resume paths (yield, timeout, OAuth, lost-worker recovery) go through
runNextPausedTurn, so this covers each of them.getActiveTraceContext()inlogging.tsnow gives both the mailbox writer and the checkpoint the active trace in this shape.Tests
The existing Sentry-client test in
conversation-work-telemetry.test.tsgets one resumed-slice case. It saves the first slice in one trace and a later pause in another trace, then runsrunNextPausedTurnunder a worker span. It checks that the resumedchat.turnis in the first trace, is a child of the first span, and links to the worker span.via @thomasjiangcy.
--
View Session [Sentry]