pilichoumao opened a new issue, #6881: URL: https://github.com/apache/rocketmq-dashboard/issues/6881
### Studio Version `rocketmq-studio` at a92c23144408cdf5729707050e9ecd9b75f1bad0; source verification on Ubuntu Linux, Node 20.20.2 / Vitest 4.1.10. ### Describe the Bug A metrics response can contain a finite timestamp that JavaScript Date cannot represent, such as `1e20` seconds. The sample normalizer accepts it, but `buildMetricCsvRows` calls `new Date(timestamp * 1000).toISOString()` unconditionally. Clicking the panel's Export CSV button then throws RangeError instead of downloading any rows, including otherwise valid samples in the same response. Both scalar and histogram samples use this path. This was reproduced with controlled provider responses and the actual MetricsExplorer component. It is abnormal-response handling, not a claim that a normal Prometheus server emits these timestamps. ### Expected Behavior Export the accepted raw samples without allowing a derived ISO field to abort the file. Preserve the raw epoch, value, labels and sample type; leave Timestamp ISO empty only when that timestamp cannot be represented as a Date. Document the empty derived field so the file does not silently drop data or invent a date. ### Verification and Related Work The research baseline failed 5 of 33 utility tests, and the actual component export regression failed while the existing normal export passed. A filtering prototype passed, but filtering is deliberately not the proposed final behavior because it discards raw samples. Formal regressions will preserve rows, test positive/negative Date boundaries, overflow, epoch zero and fractional seconds, and check both scalar and histogram CSV output plus the component download. Related #5789 / merged #5362 guard general date formatters, not this direct CSV conversion. Open #5726 addresses CSV epoch units, not Date representability. No equivalent open fix was found after scanning current PR titles/bodies and targeted searches. AI assistance was used for investigation and test preparation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
