Skip to content

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

Open
xuwei95 wants to merge 1 commit intolanggenius:mainfrom
xuwei95:feat/show-the-hierarchy-in-phonenix-trace
Open

feat: try to see the hierarchy in phonenix trace rather than all single events#35027
xuwei95 wants to merge 1 commit intolanggenius:mainfrom
xuwei95:feat/show-the-hierarchy-in-phonenix-trace

Conversation

@xuwei95
Copy link
Copy Markdown
Contributor

@xuwei95 xuwei95 commented Apr 13, 2026

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

Before After
... ...

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

…le events

try to see the hierarchy in phonenix trace rather than all single events
@xuwei95 xuwei95 requested a review from QuantumGhost as a code owner April 13, 2026 02:20
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. 💪 enhancement New feature or request labels Apr 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-13 02:21:31.101527433 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-13 02:21:21.314554940 +0000
@@ -58,6 +58,14 @@
    --> core/model_manager.py:344:13
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
    --> core/model_manager.py:361:13
+ERROR Object of class `OTLPSpanExporter` has no attribute `timeout` [missing-attribute]
+  --> core/ops/arize_phoenix_trace/arize_phoenix_trace.py:80:17
+ERROR Object of class `int` has no attribute `replace` [missing-attribute]
+   --> core/ops/arize_phoenix_trace/arize_phoenix_trace.py:245:37
+ERROR Argument `str | None` is not assignable to parameter `workflow_run_id` with type `str` in function `ArizePhoenixDataTrace._get_app_info_from_workflow_run_id` [bad-argument-type]
+    --> core/ops/arize_phoenix_trace/arize_phoenix_trace.py:1337:79
+ERROR Argument `str | None` is not assignable to parameter `workflow_run_id` with type `str` in function `ArizePhoenixDataTrace._get_app_info_from_workflow_run_id` [bad-argument-type]
+    --> core/ops/arize_phoenix_trace/arize_phoenix_trace.py:1586:79
 ERROR Argument `dict[str, list[str] | str | None]` is not assignable to parameter `attributes` with type `dict[str, str] | None` in function `mlflow.tracing.fluent.start_span_no_context` [bad-argument-type]
    --> core/ops/mlflow_trace/mlflow_trace.py:271:24
 ERROR Argument `dict[str, dict[str, Any] | str | None]` is not assignable to parameter `attributes` with type `dict[str, str] | None` in function `mlflow.tracing.fluent.start_span_no_context` [bad-argument-type]
@@ -3988,8 +3996,14 @@
    --> tests/unit_tests/core/ops/aliyun_trace/test_aliyun_trace_utils.py:214:34
 ERROR Argument `None` is not assignable to parameter `outputs` with type `Mapping[str, Any]` in function `core.ops.aliyun_trace.utils.format_output_messages` [bad-argument-type]
    --> tests/unit_tests/core/ops/aliyun_trace/test_aliyun_trace_utils.py:247:35
-ERROR Argument `test_set_span_status.SilentError` is not assignable to parameter `error` with type `Exception | str | None` in function `core.ops.arize_phoenix_trace.arize_phoenix_trace.set_span_status` [bad-argument-type]
-   --> tests/unit_tests/core/ops/arize_phoenix_trace/test_arize_phoenix_trace.py:132:27
+ERROR Could not import `error_to_string` from `core.ops.arize_phoenix_trace.arize_phoenix_trace` [missing-module-attribute]
+  --> tests/unit_tests/core/ops/arize_phoenix_trace/test_arize_phoenix_trace.py:12:5
+ERROR Could not import `safe_json_dumps` from `core.ops.arize_phoenix_trace.arize_phoenix_trace` [missing-module-attribute]
+  --> tests/unit_tests/core/ops/arize_phoenix_trace/test_arize_phoenix_trace.py:13:5
+ERROR Could not import `set_span_status` from `core.ops.arize_phoenix_trace.arize_phoenix_trace` [missing-module-attribute]
+  --> tests/unit_tests/core/ops/arize_phoenix_trace/test_arize_phoenix_trace.py:14:5
+ERROR Could not import `wrap_span_metadata` from `core.ops.arize_phoenix_trace.arize_phoenix_trace` [missing-module-attribute]
+  --> tests/unit_tests/core/ops/arize_phoenix_trace/test_arize_phoenix_trace.py:16:5
 ERROR Object of class `ModuleType` has no attribute `Histogram` [missing-attribute]
   --> tests/unit_tests/core/ops/tencent_trace/test_client.py:88:5
 ERROR Object of class `ModuleType` has no attribute `MeterProvider` [missing-attribute]
@@ -4062,6 +4076,10 @@
    --> tests/unit_tests/core/ops/tencent_trace/test_client.py:547:12
 ERROR Cannot index into `object` [bad-index]
    --> tests/unit_tests/core/ops/tencent_trace/test_client.py:558:12
+ERROR Could not import `_NODE_TYPE_TO_SPAN_KIND` from `core.ops.arize_phoenix_trace.arize_phoenix_trace` [missing-module-attribute]
+ --> tests/unit_tests/core/ops/test_arize_phoenix_trace.py:4:62
+ERROR Could not import `_get_node_span_kind` from `core.ops.arize_phoenix_trace.arize_phoenix_trace` [missing-module-attribute]
+ --> tests/unit_tests/core/ops/test_arize_phoenix_trace.py:4:87
 ERROR Method `trace` inherited from class `BaseTraceInstance` has no implementation and cannot be accessed via `super()` [missing-attribute]
   --> tests/unit_tests/core/ops/test_base_trace_instance.py:17:9
 ERROR Missing argument `public_key` in function `core.ops.entities.config_entity.LangfuseConfig.__init__` [missing-argument]

@crazywoola
Copy link
Copy Markdown
Member

Please resolve the errors in the CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💪 enhancement New feature or request size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show node hierarchy/nesting details in Phoenix trace view for complex workflows

2 participants