Files
dify/api/core
GareArc 6405a30278 feat(enterprise): Add node execution trace integration and complete parent context wiring
Integrate enterprise per-node telemetry into workflow execution pipeline and
complete parent trace context propagation through the trace system.

Enterprise node execution tracing (GATED):
- Add WorkflowNodeTraceInfo entity with full node execution metadata
- Emit node trace on every node completion (succeeded/failed/exception/paused)
- Include LLM tokens, tool info, iteration/loop context, and timing data
- Hook into workflow persistence layer via _enqueue_node_trace_task()

Parent trace context wiring (COMMUNITY):
- Pass parent_trace_context through TraceTask to WorkflowTraceInfo.metadata
- Enables child workflows to include parent attributes for all trace providers
- Completes the distributed tracing feature started in first commit

Dual processing architecture:
- TraceQueueManager processes traces when enterprise OR per-app tracing enabled
- Celery task calls both EnterpriseDataTrace AND per-app trace providers
- Single queue, dual dispatch pattern

Files changed:
- core/ops/entities/trace_entity.py: Add WorkflowNodeTraceInfo + NODE_EXECUTION_TRACE
- core/app/workflow/layers/persistence.py: Emit node traces + parent context
- core/ops/ops_trace_manager.py: node_execution_trace() + dual dispatch
- tasks/ops_trace_task.py: Call enterprise trace handler
2026-01-29 17:07:58 -08:00
..
2025-09-18 12:49:10 +08:00
2025-10-10 23:41:16 +08:00
2025-10-21 11:26:58 +08:00
2026-01-08 13:17:30 +08:00