dify/api/controllers/console/app
GareArc 22c8d8d772
feat(telemetry): add prompt generation telemetry to Enterprise OTEL
- Add PromptGenerationTraceInfo trace entity with operation_type field
- Implement telemetry for rule-generate, code-generate, structured-output, instruction-modify operations
- Emit metrics: tokens (total/input/output), duration histogram, requests counter, errors counter
- Emit structured logs with model info and operation context
- Content redaction controlled by ENTERPRISE_INCLUDE_CONTENT env var
- Fix user_id propagation in TraceTask kwargs
- Fix latency calculation when llm_result is None

No spans exported - metrics and logs only for lightweight observability.
2026-02-05 20:14:49 -08:00
..
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00
advanced_prompt_template.py refactor: port reqparse to Pydantic model (#28913) 2025-11-30 16:09:42 +09:00
agent.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
annotation.py refactor: port api/controllers/console/app/annotation.py api/controllers/console/explore/trial.py api/controllers/console/workspace/account.py api/controllers/console/workspace/members.py api/controllers/service_api/app/annotation.py to basemodel (#31833) 2026-02-03 09:59:00 +08:00
app.py fix: doc not gen bug (#31547) 2026-01-27 20:19:39 +09:00
app_import.py fix: doc not gen bug (#31547) 2026-01-27 20:19:39 +09:00
audio.py refactor: port api/controllers/console/app/audio.py api/controllers/console/app/message.py api/controllers/console/auth/data_source_oauth.py api/controllers/console/auth/forgot_password.py api/controllers/console/workspace/endpoint.py (#30680) 2026-02-02 18:03:07 +09:00
completion.py refactor: port reqparse to Pydantic model (#28913) 2025-11-30 16:09:42 +09:00
conversation.py refactor: if to match (#31799) 2026-02-02 18:12:03 +09:00
conversation_variables.py refactor: port reqparse to Pydantic model (#28913) 2025-11-30 16:09:42 +09:00
error.py feat: optimize http status code (#31430) 2026-01-24 10:16:16 +08:00
generator.py feat(telemetry): add prompt generation telemetry to Enterprise OTEL 2026-02-05 20:14:49 -08:00
mcp_server.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
message.py refactor: port api/controllers/console/app/audio.py api/controllers/console/app/message.py api/controllers/console/auth/data_source_oauth.py api/controllers/console/auth/forgot_password.py api/controllers/console/workspace/endpoint.py (#30680) 2026-02-02 18:03:07 +09:00
model_config.py api -> console_ns (#28246) 2025-11-24 10:04:11 +08:00
ops_trace.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
site.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
statistic.py refactor: port reqparse to Pydantic model (#28913) 2025-11-30 16:09:42 +09:00
workflow.py revert: revert human input relevant code (#31766) 2026-01-30 19:18:49 +08:00
workflow_app_log.py feat: archive workflow run logs backend (#31310) 2026-01-23 13:11:56 +08:00
workflow_draft_variable.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
workflow_run.py revert: revert human input relevant code (#31766) 2026-01-30 19:18:49 +08:00
workflow_statistic.py refactor: port reqparse to Pydantic model (#28913) 2025-11-30 16:09:42 +09:00
workflow_trigger.py fix: doc not gen bug (#31547) 2026-01-27 20:19:39 +09:00
wraps.py feat: app trial (#26281) 2026-01-22 15:42:54 +08:00