| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
get_fast_api_app(web=False) still installed ApiServerSpanExporter and InMemoryExporter even though the debug endpoints that read them are only mounted with web=True. Those buffers retain every span (including full llm_request / llm_response) for the life of the process and OOM long-lived Cloud Run / GKE instances. Register the exporters only on DevServer, and FIFO-cap the event dict, span deque, and session index so adk web cannot grow without bound either. Closes google#6915
| Back | FazBrowse Home | New Git URL |
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
Problem:
get_fast_api_app(web=False) unconditionally installed ApiServerSpanExporter and InMemoryExporter on the process tracer. Those buffers store full llm_request / llm_response attributes and every span, with no eviction. The debug endpoints that read them (/dev/apps/.../debug/trace) are only mounted with web=True, so a production Cloud Run / GKE process pays unbounded memory for buffers nobody reads. Measured ~200 KB/LLM turn and OOM about every 6 days.
Solution:
Testing Plan
Unit Tests:
Manual End-to-End (E2E) Tests:
adk web still serves /dev/apps/{app}/debug/trace/{event_id} (covered by test_debug_trace).
Checklist