We've observed potentially incorrect startTime and endTime values for spans in distributed traces when using OTLP (and even before). This issue was identified after extracting spans from OTLP and analyzing their start-end times.
Comparing to traces produced by golang applications (router and gateway):
userver traces look weird:
Observations:
When calculating relative (to parent) and absolute (to root) time shifts in milliseconds, we noticed unusual database access times (around one second).
Paradoxically, the start times of spans relative to the root span are in the millisecond range, even if span in 2nd service caused by operation in 1st service.
This discrepancy might be caused by the coroutine engine, possibly recording the time when a task is queued rather than when it actually starts executing.
Steps to Reproduce:
Extract spans from OTLP traces generated by a userver-based application.
Calculate relative and absolute time shifts for each span.
Analyze the resulting timings, paying attention to database access spans and their relation to the root span.
We've observed potentially incorrect startTime and endTime values for spans in distributed traces when using OTLP (and even before). This issue was identified after extracting spans from OTLP and analyzing their start-end times.
Comparing to traces produced by golang applications (router and gateway):
userver traces look weird:
Observations:
When calculating relative (to parent) and absolute (to root) time shifts in milliseconds, we noticed unusual database access times (around one second).
Paradoxically, the start times of spans relative to the root span are in the millisecond range, even if span in 2nd service caused by operation in 1st service.
This discrepancy might be caused by the coroutine engine, possibly recording the time when a task is queued rather than when it actually starts executing.
Steps to Reproduce:
Additional Information:
Questions:
Impact: This issue affects the accuracy of performance metrics and may lead to misinterpretation of trace data, particularly for database operations.
We would appreciate any insights or clarification on this matter. Thank you for your attention to this issue.