Skip to content

google-adk: instrument Workflow nodes and workflow tool calls #863

Description

ADK 2.x Workflow is a BaseNode, not a BaseAgent, and _ToolNode calls self.tool.run_async directly, bypassing flows/llm_flows/tools/_caller._call_tool_async. As a result:

  • Workflow tool calls get no tool span (except MCP tools, via McpToolPatcher).
  • Workflows get no span between the Runner and agent spans.

ADK now marks SequentialAgent / ParallelAgent as deprecated in favor of Workflow, so this gap will grow. 2.11.0 also made workflow tool nodes pause for confirmation and run plugin callbacks (_ToolNode._run_tool_with_plugin_callbacks). This predates the 2.11.0 bump.

Proposal

  • Candidate patch targets in py/src/braintrust/integrations/adk/: google.adk.workflow._base_node.BaseNode.run (workflow/node spans) and google.adk.workflow._tool_node._ToolNode._run_impl (tool spans). Both exist in 2.10 and 2.11; gate them so 1.14.1 keeps working.
  • test_adk.py has no Workflow coverage; add cassette-backed tests.
  • Related, lower value: ModelConsultTool's advisor calls BaseLlm.generate_content_async directly, so it gets no ADK LLM span (the google-genai integration still traces the underlying call).

Parent: #858 (found while reviewing the 2026-10-05 weekly dependency update, #849).

🤖 Generated with Claude Code

Metadata

Metadata

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions