feat(google-adk): add ADK instrumentation and e2e coverage#1765
Open
Abhijeet Prasad (AbhiPrasad) wants to merge 3 commits intomainfrom
Open
feat(google-adk): add ADK instrumentation and e2e coverage#1765Abhijeet Prasad (AbhiPrasad) wants to merge 3 commits intomainfrom
Abhijeet Prasad (AbhiPrasad) wants to merge 3 commits intomainfrom
Conversation
Member
Author
|
wait this need some more work. I realized the parent child relationships are wrong 😢 |
4 tasks
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. |
45ea59e to
19c40c1
Compare
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.
19c40c1 to
d4ef367
Compare
Member
Author
|
Okay fixed the parent-child relationships! This is good to review now. |
d4ef367 to
4739528
Compare
4739528 to
3ae014b
Compare
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:
Screenshot