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
fix: on delete current query length should be more than 1 (#3125)
Palash Gupta6b77165d09f1
diff --git a/frontend/src/hooks/queryBuilder/useQueryOperations.ts b/frontend/src/hooks/queryBuilder/useQueryOperations.tsindex 38ed75fb0a..04c2002d30 100644--- a/frontend/src/hooks/queryBuilder/useQueryOperations.ts+++ b/frontend/src/hooks/queryBuilder/useQueryOperations.ts@@ -27,6 +27,7 @@ export const useQueryOperations: UseQueryOperations = ({removeQueryBuilderEntityByIndex,panelType,initialDataSource,+ currentQuery,} = useQueryBuilder();const [operators, setOperators] = useState<SelectOption<string, string>[]>([]);const [listOfAdditionalFilters, setListOfAdditionalFilters] = useState<@@ -121,8 +122,10 @@ export const useQueryOperations: UseQueryOperations = ({);const handleDeleteQuery = useCallback(() => {- removeQueryBuilderEntityByIndex('queryData', index);- }, [removeQueryBuilderEntityByIndex, index]);+ if (currentQuery.builder.queryData.length > 1) {+ removeQueryBuilderEntityByIndex('queryData', index);+ }+ }, [removeQueryBuilderEntityByIndex, index, currentQuery]);const handleChangeQueryData: HandleChangeQueryData = useCallback((key, value) => {