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.

[Refactor]: added extra param to check isdepend on query build (#4523)

Rajat Dabadead8924ed13e5
diff --git a/frontend/src/container/OnboardingContainer/Steps/LogsConnectionStatus/LogsConnectionStatus.tsx b/frontend/src/container/OnboardingContainer/Steps/LogsConnectionStatus/LogsConnectionStatus.tsx
index 994234eca8..b7ebbcfde8 100644
--- a/frontend/src/container/OnboardingContainer/Steps/LogsConnectionStatus/LogsConnectionStatus.tsx
+++ b/frontend/src/container/OnboardingContainer/Steps/LogsConnectionStatus/LogsConnectionStatus.tsx
@@ -89,6 +89,8 @@ export default function LogsConnectionStatus(): JSX.Element {
refetchInterval: pollingInterval,
enabled: true,
},
+ {},
+ false,
);
const verifyLogsData = (
diff --git a/frontend/src/hooks/queryBuilder/useGetExplorerQueryRange.ts b/frontend/src/hooks/queryBuilder/useGetExplorerQueryRange.ts
index c874f5e6db..bd85d8f799 100644
--- a/frontend/src/hooks/queryBuilder/useGetExplorerQueryRange.ts
+++ b/frontend/src/hooks/queryBuilder/useGetExplorerQueryRange.ts
@@ -17,6 +17,7 @@ export const useGetExplorerQueryRange = (
panelType: PANEL_TYPES | null,
options?: UseQueryOptions<SuccessResponse<MetricRangePayloadProps>, Error>,
params?: Record<string, unknown>,
+ isDependentOnQB = true,
): UseQueryResult<SuccessResponse<MetricRangePayloadProps>, Error> => {
const { isEnabledQuery } = useQueryBuilder();
const { selectedTime: globalSelectedInterval, minTime, maxTime } = useSelector<
@@ -32,11 +33,11 @@ export const useGetExplorerQueryRange = (
const isEnabled = useMemo(() => {
if (!options) return isEnabledQuery;
if (typeof options.enabled === 'boolean') {
- return isEnabledQuery && options.enabled;
+ return options.enabled && (!isDependentOnQB || isEnabledQuery);
}
return isEnabledQuery;
- }, [options, isEnabledQuery]);
+ }, [options, isEnabledQuery, isDependentOnQB]);
return useGetQueryRange(
{