kubernetes-quickstart icon indicating copy to clipboard operation
kubernetes-quickstart copied to clipboard

Producer not having traces (but consumer has)

Open patpatpat123 opened this issue 2 years ago • 0 comments

Hello there,

First of all, if not anything else, I wanted to say thank you for this project. The code, as well as the blogpost, is easy to read, easy to understand.

I wanted to reach out, because it seems there is an issue with the code. I added this pattern statement in the property file:

logging.pattern.console: '%d{yyyy-MM-dd HH:mm:ss} ${PID} %-5level --- [%thread] [${spring.application.name:},%X{traceId:-},%X{spanId:-}] %logger{36} : %msg%n'

Please note the },%X{traceId:-},%X{spanId:-}]

With that, I would have expected logs within your project to contain traces.

While the consumer here: https://github.com/piomin/kubernetes-quickstart/blob/master/kafka/consumer/src/main/java/pl/piomin/services/kafka/consumer/ListenerService.java#L21 does contain the traces in the output logs (great!)

I would have expected the trace to be the same here as well: https://github.com/piomin/kubernetes-quickstart/blob/master/kafka/producer/src/main/java/pl/piomin/services/kafka/producer/SenderService.java

Unfortunately, the trace is empty for the producer part.

May I ask if you reproduce the same?

If yes, how to fix this issue please?

Thank you

patpatpat123 avatar Dec 11 '23 12:12 patpatpat123