apache / apache/camel-quarkus

camel-quarkus-opentelemetry gives empty traceId in the logs

Open
#4,981 20 comments 0 reactions 0 assignees View on GitHub
area/opentelemetry bug
Dominant language
Java
Stars
302
Forks
232
Avg merge
1d 20h
Merged PRs (30d)
114

Description

### Bug description

Hello. We use camel kafka quarkus in our project with these dependencies
`
org.apache.camel.quarkus
camel-quarkus-opentelemetry
`
`
io.quarkus
quarkus-opentelemetry
`

And the logger is configured in the application.properties file by this line
`%quarkus.log.console.format=%d{HH:mm:ss} %-5p traceId=%X{traceId}, spanId=%X{spanId} [%c{2.}] (%t) %s%e%n`

Since I added the `camel-quarkus-opentelemetry` dependency, I see a trace created when a camel route is triggered (using jaeger). But all the logs that are created has empty traceId and spanId.

Sample code from our apllication :
`@ApplicationScoped
public class Routes extends RouteBuilder {
@Override
public void configure() throws Exception {
from("kafka:{{kafka.x.in.topic.name}}").routeId("x")
.log("Received : \"${body}\"").etc
}`

Sample output:
`12:48:13 INFO traceId=, spanId= [x] (Camel (camel-1) thread #17 - KafkaConsumer[x.topic.in]) Received : "{
"payload": {
...
},
"time": "2023-06-05T07:00:07Z"
}"`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the logging format in application.properties and the Kafka-triggered route in Routes. Reproduce the route with camel-quarkus-opentelemetry and compare the application logs with the Jaeger trace. Done means the route logs contain the corresponding non-empty traceId and spanId.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kafka
Domain
observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.