dify/api/extensions
GareArc bf422dfd13
feat(telemetry): add enterprise OTEL telemetry with gateway, traces, metrics, and logs
Enterprise-only observability layer that emits OpenTelemetry traces, metrics,
and logs for workflow executions, LLM calls, message processing, and node runs.

Key components:
- core/telemetry: CE-safe gateway and event facade (no-ops when EE disabled)
- enterprise/telemetry: full trace/metric/log pipeline with OTLP exporter
- extensions/ext_enterprise_telemetry: Flask extension for lifecycle management
- tasks/enterprise_telemetry_task: Celery task for async metric dispatch

Wiring changes:
- app_factory: register ext_enterprise_telemetry extension
- ext_celery: conditionally import enterprise_telemetry_task
- configs/enterprise: add EnterpriseTelemetryConfig with OTLP settings
- ops_trace_manager: add enterprise telemetry hooks with lazy imports
- trace_entity: add new trace types (WorkflowNode, PromptGeneration, DraftNode)
- ext_otel: improve gRPC TLS auto-detection and optional auth headers

All enterprise imports are guarded behind ENTERPRISE_ENABLED +
ENTERPRISE_TELEMETRY_ENABLED feature flags with graceful fallbacks.
2026-03-24 00:24:20 -07:00
..
logstore refactor(api): move workflow knowledge nodes and trigger nodes (#33445) 2026-03-15 15:24:59 +08:00
otel feat(telemetry): add enterprise OTEL telemetry with gateway, traces, metrics, and logs 2026-03-24 00:24:20 -07:00
storage fix: pass default root to OpenDAL Operator for fs scheme (#33678) 2026-03-19 15:30:13 +08:00
__init__.py feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
ext_app_metrics.py Removes the 'extensions' directory from pyrightconfig.json and fixes … (#26512) 2025-10-05 15:57:42 +09:00
ext_blueprints.py fix: allow unauthenticated CORS preflight for embedded bots (#30587) 2026-01-06 11:40:34 +08:00
ext_celery.py feat(telemetry): add enterprise OTEL telemetry with gateway, traces, metrics, and logs 2026-03-24 00:24:20 -07:00
ext_code_based_extension.py refactor: assembling the app features in modular way (#9129) 2024-11-30 23:05:22 +08:00
ext_commands.py feat: add export app messages (#32990) 2026-03-07 11:27:15 +08:00
ext_compress.py rm type ignore (#25715) 2025-10-21 11:26:58 +08:00
ext_database.py fix: fix db env not work (#30541) 2026-01-05 11:10:45 +08:00
ext_enterprise_telemetry.py feat(telemetry): add enterprise OTEL telemetry with gateway, traces, metrics, and logs 2026-03-24 00:24:20 -07:00
ext_fastopenapi.py refactor(api): tighten phase 1 shared type contracts (#33453) 2026-03-17 17:50:51 +08:00
ext_forward_refs.py feat(api): automatically `NODE_TYPE_CLASSES_MAPPING` generation from node class definitions (#28525) 2025-12-01 14:14:19 +08:00
ext_hosting_provider.py refactor: assembling the app features in modular way (#9129) 2024-11-30 23:05:22 +08:00
ext_import_modules.py Removes the 'extensions' directory from pyrightconfig.json and fixes … (#26512) 2025-10-05 15:57:42 +09:00
ext_logging.py feat(refactoring): Support Structured Logging (JSON) (#30170) 2026-01-04 11:46:46 +08:00
ext_login.py refactor: migrate db.session.query to select in infra layer (#33694) 2026-03-19 15:48:29 +09:00
ext_logstore.py fix(logstore): prevent SQL injection, fix serialization issues, and optimize initialization (#30697) 2026-01-14 10:21:26 +08:00
ext_mail.py chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
ext_migrate.py rm type ignore (#25715) 2025-10-21 11:26:58 +08:00
ext_orjson.py remove bare list, dict, Sequence, None, Any (#25058) 2025-09-06 03:32:23 +08:00
ext_otel.py feat(telemetry): add enterprise OTEL telemetry with gateway, traces, metrics, and logs 2026-03-24 00:24:20 -07:00
ext_proxy_fix.py rm type ignore (#25715) 2025-10-21 11:26:58 +08:00
ext_redis.py feat: support redis xstream (#32586) 2026-03-04 13:18:55 +08:00
ext_request_logging.py feat: add x-trace-id to http responses and logs (#29015) 2025-12-02 17:22:34 +08:00
ext_sentry.py refactor(api): move model_runtime into dify_graph (#32858) 2026-03-02 20:15:32 +08:00
ext_session_factory.py refactor: admin api using session factory (#29628) 2025-12-15 12:01:41 +08:00
ext_set_secretkey.py refactor: assembling the app features in modular way (#9129) 2024-11-30 23:05:22 +08:00
ext_storage.py refactor(workflow-file): move `core.file` to `core.workflow.file` (#32252) 2026-02-16 22:38:19 +08:00
ext_timezone.py refactor: assembling the app features in modular way (#9129) 2024-11-30 23:05:22 +08:00
ext_warnings.py refactor: assembling the app features in modular way (#9129) 2024-11-30 23:05:22 +08:00