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: back button issue fixed for traces/logs explorer (#3448)

Neelesh Sharma01312ec2866d
diff --git a/frontend/src/hooks/useUrlQueryData.ts b/frontend/src/hooks/useUrlQueryData.ts
index 1a0e556afd..22f26da5e9 100644
--- a/frontend/src/hooks/useUrlQueryData.ts
+++ b/frontend/src/hooks/useUrlQueryData.ts
@@ -23,7 +23,7 @@ const useUrlQueryData = <T>(
urlQuery.set(queryKey, newQuery);
const generatedUrl = `${location.pathname}?${urlQuery.toString()}`;
- history.push(generatedUrl);
+ history.replace(generatedUrl);
},
[history, location, urlQuery, queryKey],
);
diff --git a/frontend/src/providers/QueryBuilder.tsx b/frontend/src/providers/QueryBuilder.tsx
index 41d9d8eec4..07bd7c5477 100644
--- a/frontend/src/providers/QueryBuilder.tsx
+++ b/frontend/src/providers/QueryBuilder.tsx
@@ -492,7 +492,7 @@ export function QueryBuilderProvider({
const generatedUrl = `${location.pathname}?${urlQuery}`;
- history.push(generatedUrl);
+ history.replace(generatedUrl);
},
[history, location.pathname, urlQuery],
);