dify/api/enterprise/telemetry
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
..
entities feat(enterprise): Add OTEL telemetry with slim traces, metrics, and structured logs 2026-02-02 15:50:43 -08:00
__init__.py feat(enterprise): Add OTEL telemetry with slim traces, metrics, and structured logs 2026-02-02 15:50:43 -08:00
draft_trace.py feat(enterprise): Add OTEL telemetry with slim traces, metrics, and structured logs 2026-02-02 15:50:43 -08:00
enterprise_trace.py feat(telemetry): add input/output token split to enterprise OTEL traces 2026-02-03 19:27:11 -08:00
event_handlers.py feat(enterprise): Add OTEL telemetry with slim traces, metrics, and structured logs 2026-02-02 15:50:43 -08:00
exporter.py fix(enterprise): Remove OTEL log export 2026-02-02 23:28:48 -08:00
id_generator.py feat(enterprise): Add OTEL telemetry with slim traces, metrics, and structured logs 2026-02-02 15:50:43 -08:00
telemetry_log.py feat(enterprise): Add OTEL logs export with span_id correlation 2026-02-02 18:16:58 -08:00