Skip to content

Merge main into planner#9

Merged
ddobrin merged 36 commits intoplannerfrom
main
Mar 19, 2026
Merged

Merge main into planner#9
ddobrin merged 36 commits intoplannerfrom
main

Conversation

@ddobrin
Copy link
Owner

@ddobrin ddobrin commented Mar 19, 2026

No description provided.

salmanmkc and others added 30 commits January 23, 2026 08:49
Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com>
Intentionally named AGENTS.md instead of e.g. GEMINI.md to be fully model neutral; see https://agents.md for background.
PiperOrigin-RevId: 884415542
PiperOrigin-RevId: 884472852
…modified by another thread during iteration

PiperOrigin-RevId: 884587639
PiperOrigin-RevId: 884881559
This change ensures that the OpenTelemetry context is correctly propagated across asynchronous boundaries throughout the ADK, primarily within RxJava streams.

### Key Changes

*   **Context Propagation:** Replaces manual `Scope` management (which often fails in reactive code) with `.compose(Tracing.withContext(context))`. This ensures the OTel context is preserved when work moves between different threads or schedulers.
*   **`Runner` Refactoring:**
    *   Adds a top-level `"invocation"` span to `runAsync` and `runLive` calls.
    *   Captures the context at entry points and propagates it through the internal execution flow (`runAsyncImpl`, `runLiveImpl`, `runAgentWithFreshSession`).
*   **`BaseLlmFlow` & `Functions`:** Updates preprocessing, postprocessing, and tool execution logic to maintain context. This ensures that spans created within tools or processors are correctly parented.
*   **`PluginManager`:** Ensures that plugin callbacks (like `afterRunCallback` and `onEventCallback`) execute within the captured context.
*   **Testing:** Adds several unit tests across `BaseLlmFlowTest`, `FunctionsTest`, `PluginManagerTest`, and `RunnerTest` that specifically verify context propagation using `ContextKey` and `Schedulers.computation()`.

### Files Modified
*   **`BaseLlmFlow.java`**, **`Functions.java`**, **`PluginManager.java`**, **`Runner.java`**: Core logic updates for context propagation.
*   **`LlmAgentTest.java`**, **`BaseLlmFlowTest.java`**, **`FunctionsTest.java`**, **`PluginManagerTest.java`**, **`RunnerTest.java`**: New tests for OTel integration.
*   **`BUILD` files**: Updated dependencies for OpenTelemetry APIs and SDK testing.

PiperOrigin-RevId: 884998997
InMemorySessionService sets a Session's last modified time based on when
the last appended event's timestamp. The timestamp in an event is
recorded in millis while the Session's timestamp is an Instant. During
the transformation, Events perform this converstion using division.
Before this change, the timestamp was truncated to the second, yet the
code was trying to extract nanos which were always 0. This fixes that
bug with a simple type change. I've also added a test to prevent
regressions.
This change introduces a new plugin for the Agent Development Kit (ADK) that logs agent execution events to BigQuery. It includes:
-   `BigQueryAgentAnalyticsPlugin`: A plugin that captures various agent lifecycle events (user messages, tool calls, model invocations) and sends them to BigQuery.
-   `BigQueryLoggerConfig`: Configuration options for the plugin, including project/dataset/table IDs, batching, and retry settings.
-   `BigQuerySchema`: Defines the BigQuery and Arrow schemas used for the event table.
-   `BatchProcessor`: Handles batching of events and writing them to BigQuery using the Storage Write API with Arrow format.
-   `JsonFormatter`: Utility for safely formatting JSON content for BigQuery.

PiperOrigin-RevId: 885133967
…um type for the metadata keys

PiperOrigin-RevId: 885539894
PiperOrigin-RevId: 885777704
These changes are now in sync with Python ADK

PiperOrigin-RevId: 886040294
… copy and add null handling for `artifactDelta` in the Builder

PiperOrigin-RevId: 886130618
@ddobrin ddobrin merged commit c898c20 into planner Mar 19, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants