fixing date in UI #2329
No reviewers
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar!2329
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2329/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from GitHub pull request.
Original GitHub pull request: #1786
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/1786
Original created: 2025-10-16T13:45:56Z
Original updated: 2025-10-16T13:48:29Z
Original head: carverauto/serviceradar:1767-bugui-otel-logs-missing-dates
Original base: main
Original merged: 2025-10-16T13:48:26Z by @mfreeman451
PR Type
Bug fix, Tests
Description
Fixed missing or invalid dates in OTEL logs UI by normalizing timestamp formats
Added timestamp normalization utilities with comprehensive test coverage
Introduced
_tp_timefallback field for timestamp resolutionUpdated build info fetch to prevent caching issues
Diagram Walkthrough
File Walkthrough
otel-metrics.ts
Add timestamp fallback field to OtelMetric typeweb/src/types/otel-metrics.ts
_tp_timefield toOtelMetricinterface for timestampfallback
traceTimestamp.test.ts
Add comprehensive timestamp normalization test suiteweb/src/utils/traceTimestamp.test.ts
scenarios
traceTimestamp.ts
Implement timestamp normalization utilities with fallback logicweb/src/utils/traceTimestamp.ts
normalizeTimestampStringto convert Proton DateTime64 toISO-8601
resolveTraceTimestampMswith fallback logic for_tp_timeandstart_time_unix_nanonormalizeTraceSummaryTimestampfor trace object normalizationMetricsDashboard.tsx
Apply timestamp normalization in MetricsDashboard componentweb/src/components/Observability/MetricsDashboard.tsx
resolveTraceTimestampMsTracesDashboard.tsx
Apply timestamp normalization in TracesDashboard componentweb/src/components/Observability/TracesDashboard.tsx
normalizeTraceSummaryTimestampresolveTraceTimestampMsfor consistent timestamp displaySidebar.tsx
Prevent caching of build info fetch requestweb/src/components/Sidebar.tsx
cache: 'no-store'option to build-info.json fetch requestpackage.json
Add vitest testing framework configurationweb/package.json
vitestdev dependency for testingtestscript to run vitestImported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1786#issuecomment-3410972826
Original created: 2025-10-16T13:46:41Z
You are nearing your monthly Qodo Merge usage quota. For more information, please visit here.
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
Sensitive info exposure
Description: Disabling fetch cache for '/build-info.json' with { cache: 'no-store' } may expose build
metadata consistently to clients; if build-info.json contains sensitive details (e.g.,
commit SHAs, internal URLs), ensure it is sanitized—this is a potential exposure depending
on file contents.
Sidebar.tsx [53-56]
Referred Code
🎫 #1767
instead show the correct date/time.
fields are missing or malformed.
dates/times across different locales and timezones.
_tp_time presence) to ensure no remaining "Invalid Date" cases.
Codebase context is not defined
Follow the guide to enable codebase context checks.
No custom compliance provided
Follow the guide to enable custom compliance check.
Compliance status legend
🟢 - Fully Compliant🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1786#issuecomment-3410977605
Original created: 2025-10-16T13:47:49Z
You are nearing your monthly Qodo Merge usage quota. For more information, please visit here.
PR Code Suggestions ✨
Explore these optional code suggestions:
Use centralized timestamp normalization utility
Refactor the manual timestamp normalization to use the new
resolveTraceTimestampMsandtoISOStringutility functions for better consistencyand maintainability.
web/src/components/Observability/MetricsDashboard.tsx [259-264]
Suggestion importance[1-10]: 7
__
Why: The suggestion correctly identifies an opportunity to use the new centralized utility functions, which improves code consistency and maintainability.
Improve error handling for fetch
Enhance the
fetchcall forbuild-info.jsonto include descriptive error messagesand log them in the
.catch()block for easier debugging.web/src/components/Sidebar.tsx [53-56]
Suggestion importance[1-10]: 6
__
Why: The suggestion improves error handling by logging fetch errors, which aids debugging without changing the user-facing behavior.