dify/api/core/tools
GareArc 4d47339ce6
feat: Add parent trace context propagation for workflow-as-tool hierarchy
Enables distributed tracing for nested workflows across all trace providers
(Langfuse, LangSmith, community providers). When a workflow invokes another
workflow via workflow-as-tool, the child workflow now includes parent context
attributes that allow trace systems to reconstruct the full execution tree.

Changes:
- Add parent_trace_context field to WorkflowTool
- Set parent context in tool node when invoking workflow-as-tool
- Extract and pass parent context through app generator

This is a community enhancement (ungated) that improves distributed tracing
for all users. Parent context includes: trace_id, node_execution_id,
workflow_run_id, and app_id.
2026-02-05 20:19:29 -08:00
..
__base chore: use from __future__ import annotations (#30254) 2026-01-06 23:57:20 +09:00
builtin_tool chore: use from __future__ import annotations (#30254) 2026-01-06 23:57:20 +09:00
custom_tool chore: use from __future__ import annotations (#30254) 2026-01-06 23:57:20 +09:00
entities fix(tools): fix ToolInvokeMessage Union type parsing issue (#31450) 2026-01-24 10:18:06 +08:00
mcp_tool chore: use from __future__ import annotations (#30254) 2026-01-06 23:57:20 +09:00
plugin_tool chore: use from __future__ import annotations (#30254) 2026-01-06 23:57:20 +09:00
utils refactor: remove all reqparser (#29289) 2026-02-01 13:43:14 +09:00
workflow_as_tool feat: Add parent trace context propagation for workflow-as-tool hierarchy 2026-02-05 20:19:29 -08:00
__init__.py improve: generalize tool parameter converter (#4786) 2024-06-03 21:26:58 +08:00
errors.py revert: revert human input relevant code (#31766) 2026-01-30 19:18:49 +08:00
signature.py refactor: generate_url to support scenario to build url (#30598) 2026-01-06 14:53:38 +08:00
tool_engine.py fix: remove _try_resolve_user_from_request (#31360) 2026-01-21 21:19:11 +08:00
tool_file_manager.py chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
tool_label_manager.py rm type ignore (#25715) 2025-10-21 11:26:58 +08:00
tool_manager.py refactor(typing): Fixup typing A2 - workflow engine & nodes (#31723) 2026-01-31 18:00:56 +09:00