feat(opentelemetry): add push notification tracing and trace-context propagation by ehsavoie · Pull Request #1229 · a2aproject/a2a-java · GitHub
Skip to content

feat(opentelemetry): add push notification tracing and trace-context propagation - #1229

Open
ehsavoie wants to merge 1 commit into
a2aproject:mainfrom
ehsavoie:issue_1217
Open

ehsavoie wants to merge 1 commit into
a2aproject:mainfrom
ehsavoie:issue_1217

Conversation

@ehsavoie

Copy link
Copy Markdown
Collaborator
  • Add OpenTelemetryPushNotificationSenderDecorator with CLIENT spans that reflect actual delivery outcome (OK on success, ERROR on failure)
  • Add OpenTelemetryA2AHttpClient to inject W3C traceparent/tracestate headers into outbound push notification HTTP requests
  • Change PushNotificationSender.sendNotification() from void to boolean so decorators can observe delivery success or failure
  • Use @Alternative @priority(1) to resolve CDI ambiguity on A2AHttpClient
  • DRY: merge extractTaskId/extractContextId into single extractIds()
  • Fix null safety in span error description
  • Remove LENIENT Mockito strictness, stub only in tests that need it
  • Refactor integration test helpers: shared HttpClient, Gson, clearExportedSpans()
  • Use HashMap instead of ConcurrentHashMap where CopyOnWriteArrayList suffices

Fixes #1217 🦕

@ehsavoie

Copy link
Copy Markdown
Collaborator Author

@kabir

kabir commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

… propagation

BREAKING: PushNotificationSender.sendNotification() now returns boolean.

- OTel decorator creates CLIENT spans for push delivery with error tracking
- W3C traceparent/tracestate headers injected into outbound push notification requests
- @Instrumented CDI qualifier transparently wraps application HTTP client and dispatch executor
- Three-tier CDI resolution: @Instrumented → @Named/unqualified → built-in default

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>

This branch has not been deployed

No deployments
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.

Push notification delivery is completely untraceable

2 participants