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: resolves issue related ops not flowing from search box to panel (#1918)

Amol Umbark4b13b0a8a4f4
diff --git a/frontend/src/container/LogsSearchFilter/SearchFields/index.tsx b/frontend/src/container/LogsSearchFilter/SearchFields/index.tsx
index 5e11ec1a72..bca82bdaaf 100644
--- a/frontend/src/container/LogsSearchFilter/SearchFields/index.tsx
+++ b/frontend/src/container/LogsSearchFilter/SearchFields/index.tsx
@@ -36,7 +36,14 @@ function SearchFields({
const keyPrefixRef = useRef(hashCode(JSON.stringify(fieldsQuery)));
useEffect(() => {
- setFieldsQuery(createParsedQueryStructure([...parsedQuery] as never[]));
+ const updatedFieldsQuery = createParsedQueryStructure([
+ ...parsedQuery,
+ ] as never[]);
+ setFieldsQuery(updatedFieldsQuery);
+ const incomingHashCode = hashCode(JSON.stringify(updatedFieldsQuery));
+ if (incomingHashCode !== keyPrefixRef.current) {
+ keyPrefixRef.current = incomingHashCode;
+ }
}, [parsedQuery]);
const addSuggestedField = useCallback(