Files
openobserve/web/src/plugins/traces
Omkar Kesarkhane efd839f068 fix: traces time-range issue (#8014)
### **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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</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>&nbsp;
</td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___
2025-08-20 11:51:46 +05:30
..
2025-04-23 08:59:08 +05:30
2024-10-15 10:57:58 +05:30