You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Langfuse (and other tracing providers): trace name is hardcoded to "workflow" / "message" instead of the app name #47341
I confirm that I am using English to submit this report, otherwise it will be closed.
Please do not modify this template :) and fill in all the required fields.
1. Is this request related to a challenge you're experiencing? Tell me about your story.
When Langfuse tracing is enabled on a Workflow app (e.g. an app named "My Classifier"), every trace shows up in Langfuse with name = "workflow", regardless of the app's name. The trace list doesn't tell you which app produced each trace. With several apps sending to the same Langfuse project, every Workflow trace is called workflow and every Chatflow/Chatbot trace is called message.
Langfuse uses the trace name for filtering, dashboards, evaluations and dataset runs, so a constant value makes it useless there.
The root span names are hardcoded in api/services/tracing/canonical.py (introduced in #44673):
_workflow() → name="workflow"
_message() / chatflow root → name="message"
The Langfuse provider then maps the root span name straight to langfuse.trace.name (api/providers/trace/trace-langfuse/src/dify_trace_langfuse/provider.py, _trace_attributes).
Workarounds today all have drawbacks:
One Langfuse project per app: more keys to manage and no cross-app view.
Use the app name as the root trace name by default (e.g. My Classifier), and keep the entity type in metadata (trace_entity_type is already there).
Optionally, add a "Trace name" field to the per-app tracing config so it can be overridden.
Also add app_name to the trace metadata.
If changing the default is a breaking change for people filtering by workflow/message, a per-app or per-provider toggle ("use app name as trace name") would also work.
Activity