Hello!
I’m having trouble enabling Kafka distributed traces, I can’t get distributed tracing payload header to appear (there is no such key as “newrelic”). We use Spring framework (KafkaTemplate and KafkaListener) to send and to listen to messages.
Producer:
@Autowired
private KafkaTemplate<String, MyResponse> kafkaTemplate;
@Trace(dispatcher=true)
public void sendMessage(MyResponse msg) {
ListenableFuture<SendResult<String, MyResponse >> listenableFuture = kafkaTemplate.send(topicName, key, msg);
...
Consumer:
@Trace(dispatcher = true)
@KafkaListener(topics = "${kafka.my.topic}")
public void listen(@Payload List<MyResponse> messages,
@Header(KafkaHeaders.RECEIVED_TOPIC) List<String> topics,
@Header("newrelic") {
...
I also tried fetching all headers with @Headers
but there is no “newrelic” key in the list.
Distributed tracing and Kafka-specific distributed tracing features are both enabled in yml files.
I turned log level to finest, but didn’t notice any exceptions.
Maybe somebody has any insights what could me missing?