mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-15 08:55:05 -05:00
fix(child-workflow-error-spans): pass trace-spans accurately in block logs (#3054)
* fix(child-workflow): must bypass hiddenFromDisplay config * fix passing of spans to be in block log * keep fallback for backwards compat * fix error message formatting * clean up
This commit is contained in:
committed by
GitHub
parent
5c02d46d55
commit
57f0837da7
@@ -152,6 +152,9 @@ export class BlockExecutor {
|
||||
blockLog.durationMs = duration
|
||||
blockLog.success = true
|
||||
blockLog.output = filterOutputForLog(block.metadata?.id || '', normalizedOutput, { block })
|
||||
if (normalizedOutput.childTraceSpans && Array.isArray(normalizedOutput.childTraceSpans)) {
|
||||
blockLog.childTraceSpans = normalizedOutput.childTraceSpans
|
||||
}
|
||||
}
|
||||
|
||||
this.state.setBlockOutput(node.id, normalizedOutput, duration)
|
||||
@@ -245,6 +248,10 @@ export class BlockExecutor {
|
||||
blockLog.error = errorMessage
|
||||
blockLog.input = this.sanitizeInputsForLog(input)
|
||||
blockLog.output = filterOutputForLog(block.metadata?.id || '', errorOutput, { block })
|
||||
|
||||
if (errorOutput.childTraceSpans && Array.isArray(errorOutput.childTraceSpans)) {
|
||||
blockLog.childTraceSpans = errorOutput.childTraceSpans
|
||||
}
|
||||
}
|
||||
|
||||
logger.error(
|
||||
|
||||
Reference in New Issue
Block a user