fix(telemetry): updated telemetry, added nested sanitization, added granular trace spans for logs and updated UI (#1627)

* feat(logs): updated telemetry, added nested sanitization, added granular trace spans for logs and updated UI

* refactor trace spans into separate components

* remove any's from tool defs

* updated UI and overlayed spans

* cleanup

* ack PR comments

* stricter type safety

* clean
This commit is contained in:
Waleed
2025-10-14 16:41:12 -07:00
committed by GitHub
parent f345c4d1d8
commit 9efc08a832
39 changed files with 2585 additions and 1531 deletions

View File

@@ -242,6 +242,7 @@ export class Executor {
): Promise<ExecutionResult | StreamingExecution> {
const { setIsExecuting, setIsDebugging, setPendingBlocks, reset } = useExecutionStore.getState()
const startTime = new Date()
const executorStartMs = startTime.getTime()
let finalOutput: NormalizedBlockOutput = {}
// Track workflow execution start
@@ -252,7 +253,9 @@ export class Executor {
startTime: startTime.toISOString(),
})
const beforeValidation = Date.now()
this.validateWorkflow(startBlockId)
const validationTime = Date.now() - beforeValidation
const context = this.createExecutionContext(workflowId, startTime, startBlockId)
@@ -268,10 +271,13 @@ export class Executor {
let hasMoreLayers = true
let iteration = 0
const firstBlockExecutionTime: number | null = null
const maxIterations = 500 // Safety limit for infinite loops
while (hasMoreLayers && iteration < maxIterations && !this.isCancelled) {
const iterationStart = Date.now()
const nextLayer = this.getNextExecutionLayer(context)
const getNextLayerTime = Date.now() - iterationStart
if (this.isDebugging) {
// In debug mode, update the pending blocks and wait for user interaction
@@ -405,6 +411,7 @@ export class Executor {
if (normalizedOutputs.length > 0) {
finalOutput = normalizedOutputs[normalizedOutputs.length - 1]
}
// Process loop iterations - this will activate external paths when loops complete
await this.loopManager.processLoopIterations(context)