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.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
chore: improve comments
ahmadshaheerc206f4fa5cd1
diff --git a/frontend/src/hooks/useUrlQueryData.ts b/frontend/src/hooks/useUrlQueryData.tsindex d0a8aefc82..2945ba96b2 100644--- a/frontend/src/hooks/useUrlQueryData.ts+++ b/frontend/src/hooks/useUrlQueryData.ts@@ -22,14 +22,16 @@ const useUrlQueryData = <T>((newQueryData: T): void => {const newQuery = JSON.stringify(newQueryData);- // Create a new URLSearchParams to get the latest URL state+ // Create a new URLSearchParams object with the current URL's search params+ // This ensures we're working with the most up-to-date URL stateconst currentUrlQuery = new URLSearchParams(window.location.search);- // Update the query parameter+ // Update or add the specified query parameter with the new serialized datacurrentUrlQuery.set(queryKey, newQuery);- // Generate the new URL with updated parameters+ // Construct the new URL by combining the current pathname with the updated query stringconst generatedUrl = `${location.pathname}?${currentUrlQuery.toString()}`;+history.replace(generatedUrl);},[history, location.pathname, queryKey],