Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

fix: update correct format in URL in case of custom date time (#4371)

Vikrant Guptacbf150ef7bc3
diff --git a/frontend/src/container/TopNav/DateTimeSelection/index.tsx b/frontend/src/container/TopNav/DateTimeSelection/index.tsx
index 65c6b36974..4cb538cb57 100644
--- a/frontend/src/container/TopNav/DateTimeSelection/index.tsx
+++ b/frontend/src/container/TopNav/DateTimeSelection/index.tsx
@@ -223,8 +223,14 @@ function DateTimeSelection({
setLocalStorageKey('endTime', endTimeMoment.toString());
updateLocalStorageForRoutes('custom');
if (!isLogsExplorerPage) {
- urlQuery.set(QueryParams.startTime, startTimeMoment.toString());
- urlQuery.set(QueryParams.endTime, endTimeMoment.toString());
+ urlQuery.set(
+ QueryParams.startTime,
+ startTimeMoment?.toDate().getTime().toString(),
+ );
+ urlQuery.set(
+ QueryParams.endTime,
+ endTimeMoment?.toDate().getTime().toString(),
+ );
const generatedUrl = `${location.pathname}?${urlQuery.toString()}`;
history.replace(generatedUrl);
}