-
Notifications
You must be signed in to change notification settings - Fork 304
Report RSFS/replay latency telemetry on step terminal events #2929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d3e2687
[core/world/world-vercel] Report RSFS/replay latency telemetry on ste…
VaguelySerious 2d5af95
refactor(core,world,world-vercel): rename replay latency field to fir…
VaguelySerious 187510b
Narrow firstReplay to finalSchedulingReplay per review feedback
VaguelySerious 90ffbdc
Fix: RSFS telemetry is systematically dropped on the turbo optimistic…
vercel[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@workflow/core': minor | ||
| '@workflow/world': minor | ||
| '@workflow/world-vercel': minor | ||
| --- | ||
|
|
||
| Report run-started-to-first-step (rsfs) and final-scheduling-replay (finalSchedulingReplay) latency telemetry on step completion events. |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we either aggregate replay time across every pre-first-step replay pass, or narrow this metric definition/name? This captures only the current suspension
runWorkflow()duration. Valid RSFS/TTFS paths such as workflow-bodysetAttributes()can replay more than once before the first step, so RSFS covers the whole detour whilereplayreports only the final pass; a redelivery can omit earlier work too. That makes it misleading to interpretreplayas the portion of RSFS spent in replay compute. Accumulating until the first step (or renaming this to something likefinal_scheduling_replay_ms) would make the semantics explicit. Also, the individual-pass duration is already represented by the existingworkflow.run …span; if this metric is intentionally duplicated to provide unsampled/full-population distributions, can we document that rationale?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing
Documenting better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 187510b: renamed to
finalSchedulingReplay(lifecycle.step.final_scheduling_replay_ms) and sharpened the comments at both measurement sites — they now state explicitly that this is the finalrunWorkflow()pass only (not accumulated across pre-first-step passes, so not "the replay portion of RSFS"), and that the duplication with theworkflow.runspan is deliberate: the server emits it as an unsampled full-population distribution, which the ~7%-sampled span population can't provide.Server-side counterpart: #626 merged mid-rename with the old name, so the matching server rename is in vercel/workflow-server#628 (deploys before this ships, or the field would be dropped by the allowlist).