[FEATURE] Port DebugLoggingPlugin from adk-python
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Please make sure you read the contribution guide and file the issues in the right place.
Contribution guide.
🔴 Required Information
Is your feature request related to a specific problem?
When an agent misbehaves, adk-java has no way to produce a record of what happened that you can read
afterwards, diff against another run, or attach to a bug report. What was sent to the model and what
came back, each tool call and its result, the events the runner yielded - all of it goes out as log
lines, mixed in with everything else the process is printing. Nothing gathers one invocation into one
place.
adk-python closed that gap by shipping DebugLoggingPlugin, which writes one YAML document per
invocation to a file. adk-java has no equivalent.
Describe the Solution You'd Like
DebugLoggingPlugin in com.google.adk.plugins.debuglogging, registered on a Runner like any
other plugin, behaving as adk-python's does:
- record the user message, every LLM request and response, every tool call, result and error, every
event the runner yields, and — optionally — a snapshot of session state as the invocation ends; - write one YAML document per invocation, appended to a file, so a session's invocations
accumulate in one readable artifact that can be attached to a bug report; - curate rather than dump, as upstream does: tool declarations recorded as names only, inline
data as its mime type with the bytes omitted, grounding metadata as a boolean, requested auth
configs as a count; - switch the session-state snapshot and full system instructions on or off per instance.
No existing class changes and no existing API changes. All twelve callbacks it needs are already
declared on Plugin, and every one of them is observe-only here: eleven return Maybe.empty(), and
afterRunCallback returns a Completable that only writes the file. None of them returns a value
that alters the run.
Impact on your work
When an agent does something unexpected, there is nothing to save and nothing to hand to someone
else. Not blocking, and there is no timeline — this is a parity gap, not an outage.
Willingness to contribute
Yes. A PR follows immediately after this issue: one new public plugin class plus supporting types in
a plugins.debuglogging subpackage, with tests. No existing file is modified, and no new dependency
is added — jackson-dataformat-yaml is already a compile-scope dependency of core.
🟡 Recommended Information
Describe Alternatives You've Considered
LoggingPlugin, which adk-java already has. It logs prose lines to slf4j while the run happens,
truncating what it prints. That is useful for watching a run go by, but what it produces cannot be
re-read as data, diffed between two runs, or attached to an issue. Complementary, not a replacement —
the same hooks, a different output.
ADK's tracing/telemetry. Spans answer "where did the time go" and are read in a tracing backend.
A debug trace answers "what was said, in order", is read in a text editor, and needs no backend.
ReplayPlugin and the recordings package in google-adk-dev. Closer in spirit, but it reads
recordings rather than writing them, and it targets deterministic playback rather than a document a
person reads. It also ships in a different artifact from core.
Write the plugin in application code. It works — the behavior above was built using public API
only. But it is a few hundred lines of serialization curation per application, it drifts from
upstream separately in each copy, and the parts that matter most (what to omit) are exactly the
parts each copy will get wrong differently.
Proposed API / Implementation
Registration needs no new API:
Runner runner =
new InMemoryRunner(
agent, "my-app", ImmutableList.of(new DebugLoggingPlugin(Path.of("adk_debug.yaml"))));
All twelve hooks upstream overrides are already declared on Plugin, with compatible shapes -
for example, the two that carry the model exchange, and the one that does the writing:
default Maybe<LlmResponse> beforeModelCallback(
CallbackContext callbackContext, LlmRequest.Builder llmRequest)
default Maybe<LlmResponse> afterModelCallback(
CallbackContext callbackContext, LlmResponse llmResponse)
// returns Completable, so the file write need not block the caller
default Completable afterRunCallback(InvocationContext invocationContext)
The class is written and tested; the PR carries it.
- Ngôn ngữ chính
- Java
- Star
- 1.7k
- Fork
- 433
- Merge trung bình
- 3 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 46
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của google/adk-java
-
GeminiUtil placeholder user turn ("Continue output. DO NOT look at this line ...") is flagged by prompt injection filtersCó thể đã có người làm @hemasekhar-p đã nhận 2 ngày trước. Đang mởneeds review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
google/adk-java#1628 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[spring-ai] ToolConverter silently drops enum and items from tool parameter schemasCó thể đã có người làm @hirematha đã nhận 5 ngày trước. Đang mởneeds review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
google/adk-java#1609 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[spring-ai] Streaming responses ending with CJK punctuation (。!?) are misclassified as partial and never persisted to the sessionCó thể đã có người làm @hirematha đã nhận 5 ngày trước. Đang mởneeds review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
google/adk-java#1608 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
FirestoreSessionService loses event fields on reload, breaking later turns and tool confirmationsCó thể đã có người làm @innoprej đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Claude model throws UnsupportedOperationException("Not supported yet.") on thinking blocks from Claude 5 modelsCó thể đã có người làm @hemasekhar-p đã nhận 2 ngày trước. Đang mởneeds review
google/adk-java#1630 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của google/adk-java
Issue tương tự
-
[Bug] The producer summary counts an unreported client version as a second version and warns about a version mixCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
apache/rocketmq-dashboard#6110 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
`Processing lsp` never exits and leaves orphaned processesCó thể đã có người làm @overcast302 đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
processing/processing4#1578 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/doris-flink-connector#707 ·
-
ASM is not up-to-dateĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] S3 CORS responses omit Access-Control-Allow-Credentials for matched originsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
floci-io/floci#5369 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày