dify - ✅(Solved) Fix Show node hierarchy/nesting details in Phoenix trace view for complex workflows [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langgenius/dify#35045Fetched 2026-04-14 05:56:48
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
1
Author
Participants
Timeline (top)
cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #35027: feat: try to see the hierarchy in phonenix trace rather than all single events

Description (problem / solution / changelog)

[!IMPORTANT]

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Fix #35045 try to see the hierarchy in phonenix trace rather than all single events

Screenshots

BeforeAfter
......

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint and make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

Changed files

  • api/core/ops/arize_phoenix_trace/arize_phoenix_trace.py (modified, +1992/-489)
RAW_BUFFERClick to expand / collapse

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • 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 sending workflow traces from Dify to Phoenix (Arize), the trace view currently displays all spans as a flat list. However, Dify workflows often contain nested structures — loops, conditional branches, parallel executions, and sub-workflow nodes — that have parent-child execution relationships. Understanding these relationships is crucial for debugging performance bottlenecks and execution flow errors.

Currently, Phoenix only shows the root span (workflow level) and all child spans as siblings. The hierarchical relationships between nodes — e.g., which nodes belong to which loop iteration, which nodes are inside a conditional branch, or the nesting depth of sub-workflows — are completely lost in the visualization.

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.

extent analysis

TL;DR

To properly display hierarchical relationships between workflow nodes in Phoenix, modify the trace data sent from Dify to include parent-child span relationships.

Guidance

  • Review the current trace data format sent to Phoenix and identify how to represent nested structures such as loops, conditional branches, and sub-workflow nodes.
  • Investigate if Phoenix (Arize) supports displaying hierarchical span relationships and what data format it expects for such visualizations.
  • Consider adding custom attributes or tags to spans in Dify to capture parent-child relationships, which can then be used by Phoenix for correct visualization.
  • Look into existing trace visualization standards or libraries that support hierarchical displays, such as OpenTelemetry, to guide the implementation.

Example

No specific code example can be provided without knowing the exact implementation details of Dify and its interaction with Phoenix. However, the concept would involve modifying the span creation process in Dify to include a reference to the parent span when creating child spans, which can be represented in a format like { "span_id": "child_span", "parent_span_id": "parent_span" }.

Notes

The solution depends on the capabilities of Phoenix (Arize) to display hierarchical span relationships and the current implementation of trace data sending in Dify. Without specific details on these aspects, the guidance is high-level.

Recommendation

Apply workaround: Modify Dify to include parent-child span relationships in the trace data sent to Phoenix, as this seems to be the core issue preventing proper visualization of workflow hierarchies.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING