fix: replace nonexistent trace_tool_response with trace_merged_tool_calls in ADK patch#1289
Open
MaxwellCalkin wants to merge 1 commit intoAgentOps-AI:mainfrom
Open
fix: replace nonexistent trace_tool_response with trace_merged_tool_calls in ADK patch#1289MaxwellCalkin wants to merge 1 commit intoAgentOps-AI:mainfrom
MaxwellCalkin wants to merge 1 commit intoAgentOps-AI:mainfrom
Conversation
…alls in ADK instrumentation Fixes AgentOps-AI#1257. google.adk.telemetry.trace_tool_response does not exist in any supported version of google-adk (1.4.1+). The function was renamed to trace_merged_tool_calls, causing a warning on startup: Could not wrap google.adk.telemetry.trace_tool_response: module "google.adk.telemetry" has no attribute "trace_tool_response" Changes: - Replace _adk_trace_tool_response_wrapper with _adk_trace_merged_tool_calls_wrapper matching the current trace_merged_tool_calls(response_event_id, function_response_event) signature - Fix _adk_trace_tool_call_wrapper to correctly extract the tool object from args[0] and tool arguments from args[1], matching the current trace_tool_call(tool, args, function_response_event) signature (previously args[0] was incorrectly treated as the arguments dict) - Update patch_adk() to wrap trace_merged_tool_calls instead of trace_tool_response
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix Google ADK instrumentation error on startup:
Fixes #1257.
Problem
google.adk.telemetry.trace_tool_responsedoes not exist in any supported version ofgoogle-adk(1.4.1+). The function was renamed totrace_merged_tool_callswith a different signature:Additionally,
_adk_trace_tool_call_wrapperincorrectly extractsargs[0]as the tool arguments dict when it is actually thetoolobject. The currenttrace_tool_callsignature is:Changes
_adk_trace_tool_response_wrapperwith_adk_trace_merged_tool_calls_wrappermatching thetrace_merged_tool_calls(response_event_id, function_response_event)signature_adk_trace_tool_call_wrapperto correctly extract thetoolobject fromargs[0]and tool arguments fromargs[1]patch_adk()to wraptrace_merged_tool_callsinstead oftrace_tool_responseTest plan