Skip to content

fix: skip wrapping missing google.adk telemetry functions#1278

Open
themavik wants to merge 1 commit intoAgentOps-AI:mainfrom
themavik:fix/suppress-adk-trace-tool-warning-1257
Open

fix: skip wrapping missing google.adk telemetry functions#1278
themavik wants to merge 1 commit intoAgentOps-AI:mainfrom
themavik:fix/suppress-adk-trace-tool-warning-1257

Conversation

@themavik
Copy link

Summary

Fixes #1257

When using AgentOps with google-adk>=1.5.0, users see a confusing warning:

Could not wrap google.adk.telemetry.trace_tool_response: module 'google.adk.telemetry' has no attribute 'trace_tool_response'

This happens because trace_tool_response was removed/renamed in newer versions of google-adk, but _patch_module_function treats all failures the same (warning level).

Fix

Added a hasattr() check in _patch_module_function before attempting to wrap. If the function doesn't exist in the current module version, it logs at debug level and returns early, avoiding the confusing warning.

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

Labels

None yet

Projects

None yet

1 participant