feat(google-adk): add ADK instrumentation and e2e coverage#1765
Draft
Abhijeet Prasad (AbhiPrasad) wants to merge 1 commit intomainfrom
Draft
feat(google-adk): add ADK instrumentation and e2e coverage#1765Abhijeet Prasad (AbhiPrasad) wants to merge 1 commit intomainfrom
Abhijeet Prasad (AbhiPrasad) wants to merge 1 commit intomainfrom
Conversation
Add manual and load-time instrumentation for `@google/adk` across runner, agent, and tool execution. This introduces the wrapper entrypoint, tracing-channel plugin, vendored SDK types, exports, and loader config needed to emit Braintrust spans for Google ADK workflows. Add a dedicated Google ADK e2e scenario with a committed lockfile and stable snapshots for both wrapped and hook-driven execution. Stabilize the scenario by pre-creating ADK sessions, letting the loader hook respect `BRAINTRUST_DISABLE_INSTRUMENTATION`, and normalizing volatile outputs in the assertions so the coverage stays repeatable.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Member
Author
|
wait this need some more work. I realized the parent child relationships are wrong 😢 |
4 tasks
There was a problem hiding this comment.
The tests in this entire file seem rather shallow. Would honestly just remove them to spare our clankers from using context for them.
There was a problem hiding this comment.
Let's also add the google-adk scenarios to the e2e test summary for CI. I've used that quite a bit.
Member
I honestly don't know why this is so painful in this SDK. Tracing channels make it harder because they are event based. It should honestly just be a simple wrapping call imo. |
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.
resolves #1477
Add Braintrust instrumentation for
@google/adkwith auto-instrumentation support by default when users run with Braintrust's loader hook.This adds tracing for:
Runner.runAsyncBaseAgent.runAsyncand subclassesFunctionTool.runAsyncIt also adds Google ADK e2e coverage for both hook-driven and wrapped execution.
Because ADK uses
@google/genaiunder the hood, underlying LLM spans continue to come from the existing Google GenAI instrumentation.Recommended usage: auto-instrumentation
The primary way users should adopt this is via Braintrust auto-instrumentation:
Then they can use
@google/adknormally and Braintrust will trace supported ADK operations automatically.Example:
If needed, it can be disabled with:
Manual usage
Manual wrapping is also available for cases where users want explicit control:
Testing