fix(closes OPEN-8223): enhance Google ADK tracing with improved user query handling and output management #558
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.
Pull Request
Summary
Fix Google ADK tracer issue where traces showed
"user_query": "Processing..."and"output": nullwhen applications used early generator exit patterns (e.g.,breakon first final response).Changes
google_adk_tracer.py: Update step data immediately during generator iteration instead of after loop completionModified Files:
src/openlayer/lib/integrations/google_adk_tracer.py(lines 608-649)Context
User reports of incomplete traces when using common async generator patterns:
async for event in agent.run_async(...):
if event.is_final_response():
response = event.content.parts[0].text
break # ← This broke tracingRoot cause: Step updates happened after
async forloop, butbreakprevented loop completion, so updates never occurred.Testing
fastapi-agui-example/