java-kafka-client icon indicating copy to clipboard operation
java-kafka-client copied to clipboard

Get current trace scope for calling span.log() with opentracing-kafka-streams?

Open kevinhooke opened this issue 5 years ago • 0 comments

If I pass TracingKafkaClientSupplier into new KafkaStreams(), e.g.

KafkaStreams streams = new KafkaStreams(builder.build(), this.properties, kafkaClientSupplier);

.. how can I get hold of the current/parent/root span in order to add calls to span.log() in my code? At best I have 1 trace across producers and consumers underneath my Stream which looks like it's constructed by TracingKafkaClientSupplier , and then in an attempt to create new spans in order to call span.log() I end up with another separate trace with my log spans in it. What I'm expecting to see is a single trace with the spans from the producers and consumers, and my calls to span.log() in the same trace, but I can't work out how to get this working?

kevinhooke avatar Dec 27 '19 00:12 kevinhooke