dify/api/controllers
GareArc c56e5a5b71
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-04 00:38:17 -08:00
..
common refactor: migrate some ns.model to BaseModel (#30388) 2026-01-01 00:38:12 +08:00
console feat(telemetry): add prompt generation telemetry to Enterprise OTEL 2026-02-04 00:38:17 -08:00
files refactor: port api/fields/file_fields.py (#30638) 2026-01-06 22:55:58 +08:00
inner_api refactor: port reqparse to BaseModel (#28993) 2025-12-08 15:31:19 +09:00
mcp refactor: port reqparse to BaseModel (#28993) 2025-12-08 15:31:19 +09:00
service_api refactor: port api/fields/file_fields.py (#30638) 2026-01-06 22:55:58 +08:00
trigger fix: remove unnecessary error log when trigger endpoint returns 404 (#29587) 2025-12-12 17:53:40 +08:00
web chore: case insensitive email (#29978) 2026-01-13 15:42:44 +08:00
__init__.py chore(api/controllers): Apply Ruff Formatter. (#7645) 2024-08-26 15:29:10 +08:00