OpenTelemetry - root span duration lower than process span duration #2075
Replies: 3 comments 2 replies
-
After looking back in the documentation and the example screenshot, it seems to be the expected behavior. I will raise a support ticket with Datadog and see what they say, as they present trace duration as duration of first span only. |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
Is there any otel documentation around this @draincoder? I'm wondering why there needs to be a root span that ends in a few microseconds at all. An event makes more sense - faststream/kafka receiving an event is a point in time operation. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We setup OpenTelemetry for FastStream, and observe one strange behavior.
It seems that for each message, FastStream creates 2 spans:
<topic_name> create
parent spanprocess
child spanWhile process span represents the entire duration of the handler function for the message, the parent span is almost closing a few microseconds after start, maybe just after the ACK and before calling handler function. Example:
<topic_name> create
parent span starts at time X, finishes at X + 50usprocess
child span starts at time X, starts at X + 50us, finishes at X + 250msThis creates strange rendering in some viewers, would there be any way to have
<topic_name> create
end just afterprocess
span?Rendering example (
=
represent span duration):=
<topic_name> create
=================================================================
process
Beta Was this translation helpful? Give feedback.
All reactions