improving vertx websocket for end to end tracing in camel - POC#24363
Draft
JinyuChen97 wants to merge 1 commit into
Draft
improving vertx websocket for end to end tracing in camel - POC#24363JinyuChen97 wants to merge 1 commit into
JinyuChen97 wants to merge 1 commit into
Conversation
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 apache#8280 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit enables WebSocket message spans to be linked back to their originating HTTP upgrade request spans using OpenTelemetry span links.
Key changes:
VertxWebsocketHost: Capture HTTP upgrade span context using reflection
VertxWebsocketPeer: Store handshake span context
VertxWebsocketSpanDecorator: Custom span decorator for vertx-websocket
OpenTelemetryTracer: Create span links from collected contexts
VertxWebsocketConstants: Add HANDSHAKE_SPAN_CONTEXT_KEY constant
Benefits:
Related to: apache/camel-quarkus#8280
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com