You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ada3581
Browse filesBrowse the repository at this point in the historyBrowse files
feat(opentelemetry): add push notification tracing with CLIENT spans (#1228)
Add OpenTelemetryPushNotificationSenderDecorator that wraps
PushNotificationSender to create a CLIENT span for every push delivery.
The span carries task_id, context_id, push_notification.event_kind, and
optional response payload attributes, with error.type on delivery failure.
Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
Copy file name to clipboardExpand all lines: docs/content/dev/extra/opentelemetry.md
+37-1Lines changed: 37 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,6 +106,21 @@ The following attributes are automatically added to spans (defined in `A2AObserv
106
106
|`gen_ai.agent.a2a.response`| Full response data (only if extraction enabled) |
107
107
|`error.type`| Error message (on failures) |
108
108
109
+
### Push Notification Delivery Tracing
110
+
111
+
When the server delivers a push notification to a client webhook, `OpenTelemetryPushNotificationSenderDecorator` creates a `CLIENT` span named `SendPushNotification`. This span is independent of the original request span but carries the `gen_ai.agent.a2a.task_id` attribute, allowing correlation by task ID in your observability tool.
112
+
113
+
The module also provides **W3C trace-context propagation** for outbound push notification HTTP requests. When the OpenTelemetry server module is on the classpath, the `OpenTelemetryHttpClientProducer` CDI bean wraps the HTTP client used by `BasePushNotificationSender` with `OpenTelemetryA2AHttpClient`, which injects `traceparent` and `tracestate` headers into every push notification delivery. It also produces a context-propagating `Executor` (via `Context.taskWrapping()`) that ensures the OTel trace context survives the async boundary when push notifications are dispatched to multiple recipients in parallel. This allows the receiving webhook to join the distributed trace.
Copy file name to clipboardExpand all lines: extras/opentelemetry/common/src/main/java/org/a2aproject/sdk/extras/opentelemetry/A2AObservabilityNames.java
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -20,4 +20,7 @@ public interface A2AObservabilityNames {
Copy file name to clipboardExpand all lines: extras/opentelemetry/integration-tests/src/main/java/org/a2aproject/sdk/extras/opentelemetry/it/A2ATestRoutes.java
Copy file name to clipboardExpand all lines: extras/opentelemetry/integration-tests/src/main/java/org/a2aproject/sdk/extras/opentelemetry/it/TestAgentCardProducer.java
Copy file name to clipboardExpand all lines: extras/opentelemetry/integration-tests/src/main/java/org/a2aproject/sdk/extras/opentelemetry/it/TestUtilsBean.java
0 commit comments