dify/api/core/workflow/nodes/tool
GareArc 8ceb1ed96f
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-05 20:12:30 -08:00
..
__init__.py feat/enhance the multi-modal support (#8818) 2024-10-21 10:43:49 +08:00
entities.py fix: add list type support for ToolInput constant value in tool node (#31276) 2026-01-29 10:49:29 +08:00
exc.py refactor(tool-node): introduce specific exceptions for tool node errors (#10357) 2024-11-07 14:02:38 +08:00
tool_node.py feat(telemetry): add input/output token split to enterprise OTEL traces 2026-02-05 20:12:30 -08:00