mirror of https://github.com/langgenius/dify.git
Remove app_id parameter from three endpoints and update trace manager to use
tenant_id as storage identifier when app_id is unavailable. This allows
standalone prompt generation utilities to emit telemetry.
Changes:
- controllers/console/app/generator.py: Remove app_id=None from 3 endpoints
(RuleGenerateApi, RuleCodeGenerateApi, RuleStructuredOutputGenerateApi)
- core/ops/ops_trace_manager.py: Use tenant_id fallback in send_to_celery
- Extract tenant_id from task.kwargs when app_id is None
- Use 'tenant-{tenant_id}' format as storage identifier
- Skip traces only if neither app_id nor tenant_id available
The trace metadata still contains the actual tenant_id, so enterprise
telemetry correctly emits metrics and logs grouped by tenant.
|
||
|---|---|---|
| .. | ||
| aliyun_trace | ||
| arize_phoenix_trace | ||
| entities | ||
| langfuse_trace | ||
| langsmith_trace | ||
| mlflow_trace | ||
| opik_trace | ||
| tencent_trace | ||
| weave_trace | ||
| __init__.py | ||
| base_trace_instance.py | ||
| ops_trace_manager.py | ||
| utils.py | ||