feat(logging): add structured payload logging with masking and truncation by katepallewarprathmesh-sketch · Pull Request #1238 · a2aproject/a2a-java · GitHub
Skip to content

feat(logging): add structured payload logging with masking and truncation - #1238

Closed
katepallewarprathmesh-sketch wants to merge 2 commits into
a2aproject:mainfrom
katepallewarprathmesh-sketch:main
Closed

katepallewarprathmesh-sketch wants to merge 2 commits into
a2aproject:mainfrom
katepallewarprathmesh-sketch:main

Conversation

@katepallewarprathmesh-sketch

Copy link
Copy Markdown

Fixes #1221

I added DEBUG-level structured payload logging for the A2A protocol. Task requests, state changes and artifacts are now logged as structured events, along with negotiation payloads, auth decisions and push notification subscription/delivery. Payloads are truncated to 4KB with a [truncated] marker and sensitive fields like token, credentials, password and url are masked by default. You can customize masking and truncation via system properties or a custom strategy, and logs are correlated with traces via trace_id/span_id from OpenTelemetry or MDC. The logger is disabled by default so there is no overhead when not enabled.

…tion

Provide DEBUG-level structured logs for task requests/state changes/
artifacts, negotiation payloads, auth decisions, notification
subscription/delivery with 4KB truncation ([truncated] marker),
sensitive-data masking (customizable) and trace_id/span_id correlation
via OTel reflection + MDC.

Fixes a2aproject#1221

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…6-a2a-java

feat(logging): add structured payload logging with masking and truncation
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.

No structured payload logging

1 participant