JinyuChen97 opened a new pull request, #24363:
URL: https://github.com/apache/camel/pull/24363
This commit enables WebSocket message spans to be linked back to their
originating HTTP upgrade request spans using OpenTelemetry span links.
Key changes:
1. VertxWebsocketHost: Capture HTTP upgrade span context using reflection
- Avoids compile-time dependency on OpenTelemetry
- Stores span context in RoutingContext during WebSocket upgrade
2. VertxWebsocketPeer: Store handshake span context
- New field to hold the HTTP upgrade span context
- Persists for the lifetime of the WebSocket connection
3. VertxWebsocketSpanDecorator: Custom span decorator for vertx-websocket
- Collects span contexts from target WebSocket peers (Producer)
- Supports multiple span links (sendToAll scenarios)
- Uses reflection to avoid component dependencies
4. OpenTelemetryTracer: Create span links from collected contexts
- Extract span contexts from exchange headers
- Support both direct SpanContext objects and serialized format
- Add links to spans during creation
5. VertxWebsocketConstants: Add HANDSHAKE_SPAN_CONTEXT_KEY constant
Benefits:
- Complete distributed tracing across HTTP and WebSocket boundaries
- Zero compile-time dependencies between components
- Supports both single and multiple span links
Related to: camel-quarkus issue #8280
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]