mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-06 08:09:24 +00:00
### **User description** #8015 ___ ### **PR Type** Bug fix, Enhancement ___ ### **Description** - Use microseconds to avoid precision loss - Correct trace time-range end calculation - Add ns-to-us conversion utility - Align chart math with new units ___ ### Diagram Walkthrough ```mermaid flowchart LR nsTimes["Trace times in ns"] -- "convert to us" --> usTimes["Store start/end in µs"] usTimes -- "build chart uses ms" --> chartData["Compute x0/x1 in ms"] chartData -- "fallback end uses µs diff" --> updateChart["updateChart precise range"] ``` <details> <summary><h3> File Walkthrough</h3></summary> <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Bug fix</strong></td><td><table> <tr> <td> <details> <summary><strong>TraceDetails.vue</strong><dd><code>Use microseconds for trace bounds and fix range calc</code> </dd></summary> <hr> web/src/plugins/traces/TraceDetails.vue <ul><li>Store <code>lowestStartTime</code>/<code>highestEndTime</code> in microseconds<br> <li> Add <code>convertTimeFromNsToUs</code> helper<br> <li> Adjust chart x0/x1 calculations to mixed units safely<br> <li> Compute default <code>newEnd</code> from µs range instead of last bar</ul> </details> </td> <td><a href="https://github.com/openobserve/openobserve/pull/8014/files#diff-bc7fe6b6339ee2cde6494c0982d4b860847447e79f7431f07d598e0446df06f2">+28/-12</a> </td> </tr> </table></td></tr></tr></tbody></table> </details> ___