apache / apache/camel-quarkus

camel-quarkus-opentelemetry2 investigate improving tracing for camel-quarkus-vertx-websocket

Open
#8,280 8 comments 1 reaction 1 assignee Claimed by @JinyuChen97 View on GitHub
area/opentelemetry2 area/vertx-websocket
Dominant language
Java
Stars
302
Forks
232
Avg merge
1d 22h
Merged PRs (30d)
108

Description

Given a route like:

```java
from("vertx-websocket:/hello")
.to("direct:logGreeting");

from("direct:logGreeting")
.log("Greeting: ${body}");

from("timer:tick?period=10000?repeatCount=1")
.setBody().constant("Hello World")
.to("vertx-websocket:/hello");
```

The trace span hierarchy result is:

Vert.x WebSocket Traces

In some regards, this is expected. The nature / lifecycle of the WebSocket mean you'll get:

1. A span generated from the Vert.x HTTP server for the initial WS upgrade
2. Separate spans generated for the `timer` consumer and the trigger of the `vertx-websocket` producer
3. Separate spans for the `vertx-websocket` consumer and the `direct` producer

The traces are separated because there is no easy way of associating the full end-to-end routing with the original HTTP request.

We could perhaps see if it's possible to add an otel span 'link' back to the initial HTTP span so that the overall trace picture makes better sense. This is similar to how `quarkus-websockets-next` tracing works.

Or remove / suppress the span generated from the Vert.x HTTP server for the initial WS upgrade entirely.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.