fix(traces): remove child trace spans from workflow block after being merged with parent output#2688
Merged
waleedlatif1 merged 1 commit intostagingfrom Jan 6, 2026
Merged
Conversation
… merged with parent output
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR fixes a memory optimization issue in trace span processing for workflow blocks. When child workflows execute, their trace spans are integrated as children of the parent workflow span, but the Changes made:
Impact:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant ER as ExecutionResult
participant BTS as buildTraceSpans
participant Log as Workflow Log
participant Span as TraceSpan
ER->>BTS: logs with workflow blocks
BTS->>Log: iterate over logs
Log->>BTS: log with blockType='workflow'
BTS->>Span: create TraceSpan with output
alt log.output.childTraceSpans exists
BTS->>BTS: flattenWorkflowChildren(childTraceSpans)
BTS->>BTS: mergeTraceSpanChildren()
BTS->>Span: assign merged children
Note over BTS,Span: NEW: Clean up output
BTS->>Span: remove childTraceSpans from output
Span-->>BTS: cleanOutput (without childTraceSpans)
end
BTS->>ER: return { traceSpans, totalDuration }
|
waleedlatif1
added a commit
that referenced
this pull request
Jan 8, 2026
… merged with parent output (#2688)
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.
Summary
Type of Change
Testing
Tested manually
Checklist