camel-quarkus-opentelemetry @WithSpan context missing
- Dominant language
- Java
- Stars
- 302
- Forks
- 232
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 114
Description
Camel Quarkus: 2.13.x
It seems that the trace context is being kept only if the trace is being initiated by an http request.
Given the following bean:
```java
@ApplicationScoped
@Named("telemetryBean")
public class TelemetryBean {
@WithSpan
public String span(String source) {
System.out.println(source);
return source;
}
}
```
And the following route builder:
```java
@Override
public void configure() throws Exception {
from("platform-http:/test")
.bean("telemetryBean","span('http')");
from("timer:timer?period=5000")
.bean("telemetryBean","span('test')");
}
```
This are the collected traces:

The first one contains 2 spans correctly related:

While the second and the third traces contains two unrelated spans that should be instead related each other
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue from the TelemetryBean and the route builder's HTTP and timer routes, then compare the collected traces for each trigger. Investigate the Camel Quarkus OpenTelemetry integration around @WithSpan context propagation. Done means the timer-triggered spans are related to each other as the HTTP-triggered spans are.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100