dify/api/core/app
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
..
app_config refactor: port api/controllers/console/datasets/datasets_document.py api/controllers/service_api/app/annotation.py api/core/app/app_config/easy_ui_based_app/agent/manager.py api/core/app/apps/pipeline/pipeline_generator.py api/core/workflow/nodes/knowledge_retrieval/knowledge_retrieval_node.py to match case (#31832) 2026-02-02 19:07:30 +09:00
apps feat(enterprise): Add OTEL telemetry with slim traces, metrics, and structured logs 2026-02-05 20:12:28 -08:00
entities refactor(typing): use enum types for workflow status fields (#31792) 2026-02-02 09:41:34 +08:00
features revert: revert human input relevant code (#31766) 2026-01-30 19:18:49 +08:00
layers revert: revert human input relevant code (#31766) 2026-01-30 19:18:49 +08:00
task_pipeline revert: revert human input relevant code (#31766) 2026-01-30 19:18:49 +08:00
workflow feat(telemetry): add input/output token split to enterprise OTEL traces 2026-02-05 20:12:30 -08:00
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00