Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
hotfix(otel): replace hardcoded span attributes with shared constants (#29227)
NeatGuyCodingb365bffd0209
diff --git a/api/extensions/otel/runtime.py b/api/extensions/otel/runtime.pyindex f8ed330cf6d..16f5ccf488e 100644--- a/api/extensions/otel/runtime.py+++ b/api/extensions/otel/runtime.py@@ -11,6 +11,7 @@ from opentelemetry.propagators.composite import CompositePropagatorfrom opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagatorfrom configs import dify_config+from extensions.otel.semconv import DifySpanAttributes, GenAIAttributesfrom libs.helper import extract_tenant_idfrom models import Account, EndUser@@ -51,8 +52,8 @@ def on_user_loaded(_sender, user: Union["Account", "EndUser"]):if not tenant_id:returnif current_span:- current_span.set_attribute("service.tenant.id", tenant_id)- current_span.set_attribute("service.user.id", user.id)+ current_span.set_attribute(DifySpanAttributes.TENANT_ID, tenant_id)+ current_span.set_attribute(GenAIAttributes.USER_ID, user.id)except Exception:logger.exception("Error setting tenant and user attributes")pass