dify/api/core/workflow/graph_engine
GareArc d858cbdc0c
feat(telemetry): add input/output token split to enterprise OTEL traces
- Add PROMPT_TOKENS and COMPLETION_TOKENS to WorkflowNodeExecutionMetadataKey
- Store prompt/completion tokens in node execution metadata JSON (no schema change)
- Calculate workflow-level token split by summing node executions on-the-fly
- Export gen_ai.usage.input_tokens and output_tokens to enterprise telemetry
- Add semantic convention constants for token attributes
- Maintain backward compatibility (historical data shows null)

BREAKING: None
MIGRATION: None (uses JSON metadata, no schema changes)
2026-02-03 19:27:11 -08:00
..
command_channels feat(graph-engine): add command to update variables at runtime (#30563) 2026-01-05 16:47:34 +08:00
command_processing feat(graph-engine): add command to update variables at runtime (#30563) 2026-01-05 16:47:34 +08:00
domain Enhanced GraphEngine Pause Handling (#28196) 2025-11-26 19:59:34 +08:00
entities feat(graph-engine): add command to update variables at runtime (#30563) 2026-01-05 16:47:34 +08:00
event_management feat(api): Implement EventManager error logging and add coverage (#29204) 2025-12-08 09:40:40 +08:00
graph_traversal fix: workflow incorrectly marked as completed while nodes are still executing (#30251) 2025-12-31 10:45:43 +08:00
layers feat(telemetry): add input/output token split to enterprise OTEL traces 2026-02-03 19:27:11 -08:00
orchestration feat: unified management stop event (#30479) 2026-01-06 10:12:05 +08:00
protocols feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
ready_queue chore: use from __future__ import annotations (#30254) 2026-01-06 23:57:20 +09:00
response_coordinator chore: use from __future__ import annotations (#30254) 2026-01-06 23:57:20 +09:00
worker_management feat: unified management stop event (#30479) 2026-01-06 10:12:05 +08:00
__init__.py feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
error_handler.py feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
graph_engine.py chore: use from __future__ import annotations (#30254) 2026-01-06 23:57:20 +09:00
graph_state_manager.py feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
manager.py feat(graph-engine): add command to update variables at runtime (#30563) 2026-01-05 16:47:34 +08:00
worker.py feat: unified management stop event (#30479) 2026-01-06 10:12:05 +08:00