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
SSE streaming operation duration is incomplete — span ends at stream initiation #1220
The current span for SSE streaming requests ends immediately after the stream is initiated (when the publisher returns), not when the stream actually completes. This means gen_ai.client.operation.duration (if it existed) would only record the stream setup time — potentially 0ms — rather than the full end-to-end streaming duration.
Current Behavior
CLIENT Span: sendMessage
│
│ ← Span ends here (stream publisher created)
│
[CLIENT Span: event-1] (addLink)
[CLIENT Span: event-2] (addLink)
[CLIENT Span: event-3] (addLink)
│
│ ← Stream actually ends here (no span records this)
▼
The parent span closes before any events are sent.
There is no span or metric that captures the full duration from stream initiation to the last event.
The measured "operation duration" may be 0ms or near-0ms, completely misleading.
Expected Behavior
Either extend the parent span's lifetime to cover the full streaming duration, or
Record a dedicated metric (a2a.task.request.duration or similar) that measures the time from stream initiation to the final event.
Impact
Operation latency appears as ~0ms in dashboards, masking actual processing time.
Cannot measure true end-to-end streaming duration.
SLO/SLA monitoring based on operation duration would be incorrect.
Activity