You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding the camel-quarkus-opentracing dependency, camel will output Jaeger traces using the Quarkus Opentracing tracer. However, it seems it initiates the Span after the Routes have finished?
When using Opentracing with Quarkus, I'm able to do for e.g:
@Path("/")
public class ApplicationResource {
@Inject
Tracer tracer;
@GET
@Path("/quarkus-jaeger")
public Response quarkusJaeger() {
JaegerSpanContext spanCtx = ((JaegerSpan)tracer.activeSpan()).context();
log.info("Quarkus Jaeger traceId=" + spanCtx.getTraceId());
return Response.status(Response.Status.OK).build();
}
This is very beneficial as I'm able to go from log to trace very easily. When logging an error I can quickly go from that error log to see the entire trace from the traceId.
But in Camel-Quarkus, it seems there's no current activeSpan() when processing routes? Nowhere in my code/setup am I able to printout/retrieve the current traceId. And the logs doesn't include the traceId by default when using the log-format above. Is this an architectural limitation, or possible to initiate an active Span to be used inside a Route somehow?
The text was updated successfully, but these errors were encountered:
Yes, that worked! The context on my OpenTracingSpanAdapter didn't have a toTraceId() method though, but casting the Span to a JaegerSpan made me able to retrieve it.
When adding the camel-quarkus-opentracing dependency, camel will output Jaeger traces using the Quarkus Opentracing tracer. However, it seems it initiates the Span after the Routes have finished?
When using Opentracing with Quarkus, I'm able to do for e.g:
And it'll print the traceId:
Also if I add the log format for e.g:
It'll print the current traceId and spanId in every log output:
This is very beneficial as I'm able to go from log to trace very easily. When logging an error I can quickly go from that error log to see the entire trace from the traceId.
But in Camel-Quarkus, it seems there's no current activeSpan() when processing routes? Nowhere in my code/setup am I able to printout/retrieve the current traceId. And the logs doesn't include the traceId by default when using the log-format above. Is this an architectural limitation, or possible to initiate an active Span to be used inside a Route somehow?
The text was updated successfully, but these errors were encountered: