Span waterfall displayed incorrectly on Firefox
Closed this issue · 2 comments
cleptric commented
dcramer commented
Interesting - I didnt think we resorted any of the spans (or at least not intentionally)
Shubhdeep12 commented
just checked the span listing in overlay and found this line of code where we are sorting spans-
const sortedSpans = [...spans] .sort(a => (a.parent_span_id ? 1 : 0));
Although the original compare function is acceptable, it could lead to varied results in different browsers. According to conventions, the sort compare function should compare two values, yielding a positive, negative, or zero result.
After making this adjustment to the code, it appears that the results are now consistent across different browsers.