Repository navigation
fix(google-adk): use native tracing with transactional setup - #445
Merged
Merged
Conversation
Keep the public instrumentor while replacing execution wrappers with native OTel enrichment and private-by-default payload mapping. Let ADK resolve GenAI, prevent duplicate model accounting, and test floor/current SDKs through real offline pipelines and OTLP. Co-Authored-By: Claude Code <[email protected]>
Merged
This was referenced Nov 4, 2026
This was referenced Nov 12, 2026
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.
What changed
Replace the Python Google ADK execution wrappers with a small adapter over ADK's own OpenTelemetry tracer bindings. Keep
GoogleADKInstrumentor().instrument(tracer_provider=..., config=...)anduninstrument(); stop wrapping Runner, agents, model helpers, tools, and async generators.call_llmcontainers with a native model child, account for model usage only on the child, not twice.TraceConfigto mapped native content, links, exceptions and status; omit unknown native payload attributes and raw SDK/HTTP configuration. Fine-grained content hiding conservatively hides that direction's aggregate JSON. Require the already-released core privacy implementation (fi-instrumentation-otel>=1.2.2).Why a new repair
Checked existing work before coding. #270 fixes the GenAI requirement but still fails on ADK 2.13 because
_model_call.tracerno longer exists; both it and current dev leave Runner/BaseAgent mutated with the instrumented flag false. #268 repairs the old generator proxy. This native adapter supersedes those implementation paths instead of adding another round of private execution hooks. Neither existing branch was modified. Keep the package; removing its installed entry point would break customers.Validation
All runtime tests are synthetic/offline, with outbound network denied except loopback. No vendor/model API calls or real credentials.
base_llm_flow.trace_call_llm; separately reproduced fix(google-adk): support GenAI 2.x and modular tracing #270's missing_model_call.tracerand partial mutation.Migration and scope
Span names/nesting now follow ADK rather than traceAI's old wrapper names; update saved name filters. Content capture now requires an explicit
TraceConfigopt-in. ADK 2.13 content must be emitted on spans (SPAN_ONLY), not logs. Do not combine this with another ADK or Google GenAI instrumentor. Configure between runs, not during an active invocation.The adapter preserves upstream execution/cleanup rather than patching older ADK bugs. Upgrade ADK for native streaming/cancellation fixes. Python's effective minimum is made explicit as 3.10. No package version or changelog version section was edited.
The README contains the migration/setup. The matching customer docs page is staged for after this adapter is released; no docs PR advertises an unreleased registry package. Cloud/UI and live Gemini checks are not claimed. No merge, tag or registry publication is part of this PR.
E2E coverage
Not applicable (no e2e/ harness); flows hit: n/a; marker: n/a. The maintained offline framework/OTLP CI matrix covers this SDK-only change.
🤖 Generated with Claude Code