newrelic / newrelic-java-agent

The New Relic Java agent
Apache License 2.0
199 stars 143 forks source link

Missing Kafka producer Span #2059

Open meiao opened 1 week ago

meiao commented 1 week ago

Description

In a test application using distributed tracing, the Span that should be created by the KafkaProducer#doSend method is never sent.

The screenshot below shows the Spans sent to the backend, but there is a highlighted parend.id which does not have a corresponding Span. Screenshot 2024-09-10 at 5 11 50 PM

The headers are added correctly to the Kafka message and the distributed trace is created between services.

Audit logs showed that the agent does not send that Span.

Although, the missing Span is shown in the Transaction Traces.

Reproduction code in https://github.com/prodjito/kafka-producer-consumer

The test was executed by invoking the ProducerServlet and the ConsumerServlet manually, from apps running in different JVMs.

workato-integration[bot] commented 1 week ago

https://new-relic.atlassian.net/browse/NR-316300