apache-kafkatracedatadogapmflamegraph

What does it mean when a child span is longer than the parent span in Datadog trace flame graph?


I'm struggling to interpret this output from a trace of a java service for kafka.consume in Datadog. I would expect the parent (kafka.consume) to span the entire duration of the child spans:

Datadog trace flame graph

You can see the kafka.consume is tracked as 14.9 s duration, but the child spans exceed that. What is going on?


Solution

  • I don't know how your program is written, but kafka.consume is likely running in its own thread. This trace indicates that kafka.consume triggered MemberCosmosServiceImpl.getMe... asynchronously and did not wait for MemberCosmosService... to return something.