Google ADK Agents Instrumentation#1767
Conversation
facf5dc to
378260f
Compare
✅MegaLinter analysis: Success
Notices📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining See detailed reports in MegaLinter artifacts
|
75fd23d to
e9f0722
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop-google-adk #1767 +/- ##
=====================================================
Coverage ? 81.65%
=====================================================
Files ? 216
Lines ? 26513
Branches ? 4180
=====================================================
Hits ? 21648
Misses ? 3456
Partials ? 1409 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| transaction.add_ml_model_info("GoogleADK", GOOGLEADK_VERSION) | ||
| transaction._add_agent_attribute("llm", True) | ||
|
|
||
| func_name = callable_name(wrapped) |
There was a problem hiding this comment.
In our agent spec, it's not a requirement that we include the full callable name in the function trace name. Since this one is pretty long, I'm wondering if we're better off just using the name of the wrapped function. The goal with using the full name was more so to disambiguate the function name so the customer is clear what function was wrapped.
| func_name = callable_name(wrapped) | ||
| agent_name = getattr(instance, "name", "agent") | ||
| function_trace_name = f"{func_name}/{agent_name}" | ||
| agentic_subcomponent_data = {"type": "APM-AI_AGENT", "name": agent_name} |
There was a problem hiding this comment.
Going forward, we will ideally only want to send the subcomponent attr if we have a local agent executing (rather than an invocation by a local or remote agent). Is there a way in the ADK repo to distinguish between remote and local agents and executions vs invocations?
|
|
||
|
|
||
| def instrument_googleadk_agents_llm_agent(module): | ||
| if hasattr(module, "LlmAgent") and hasattr(module.LlmAgent, "_run_async_impl"): |
There was a problem hiding this comment.
Is there any risk of this function getting called multiple times for a single agent execution (ex: re-entrance)? I'm thinking about the case that sub-agents are used. Maybe a test case for sub-agents could help?

Overview