diff --git a/apps/studio/components/interfaces/SQLEditor/SQLEditor.tsx b/apps/studio/components/interfaces/SQLEditor/SQLEditor.tsx index b826c0c68ac..3aae77c19fe 100644 --- a/apps/studio/components/interfaces/SQLEditor/SQLEditor.tsx +++ b/apps/studio/components/interfaces/SQLEditor/SQLEditor.tsx @@ -125,7 +125,8 @@ export const SQLEditor = () => { const getImpersonatedRoleState = useGetImpersonatedRoleState() const databaseSelectorState = useDatabaseSelectorStateSnapshot() const logsTimeRange = useSqlEditorLogsStateSnapshot() - const queryingLogs = isLogsSource(databaseSelectorState.selectedDatabaseId) + const logsSourceEnabled = useFlag('otelLegacyLogs') + const queryingLogs = logsSourceEnabled && isLogsSource(databaseSelectorState.selectedDatabaseId) const { aiOptInLevel } = useOrgAiOptInLevel() const showPrettyExplain = useFlag('ShowPrettyExplain') diff --git a/apps/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityActions.tsx b/apps/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityActions.tsx index c7ee899b238..b8b1ee94802 100644 --- a/apps/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityActions.tsx +++ b/apps/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityActions.tsx @@ -1,5 +1,5 @@ import { Hotkey } from '@tanstack/react-hotkeys' -import { LOCAL_STORAGE_KEYS, useParams } from 'common' +import { LOCAL_STORAGE_KEYS, useFlag, useParams } from 'common' import { AlignLeft, Check, Heart, Keyboard, MoreVertical } from 'lucide-react' import { toast } from 'sonner' import { @@ -56,7 +56,8 @@ export const UtilityActions = ({ const snapV2 = useSqlEditorV2StateSnapshot() const databaseSelectorState = useDatabaseSelectorStateSnapshot() const logsTimeRange = useSqlEditorLogsStateSnapshot() - const queryingLogs = isLogsSource(databaseSelectorState.selectedDatabaseId) + const logsSourceEnabled = useFlag('otelLegacyLogs') + const queryingLogs = logsSourceEnabled && isLogsSource(databaseSelectorState.selectedDatabaseId) const [isAiOpen] = useLocalStorageQuery(LOCAL_STORAGE_KEYS.SQL_EDITOR_AI_OPEN, true) const [intellisenseEnabled, setIntellisenseEnabled] = useLocalStorageQuery( @@ -220,7 +221,9 @@ export const UtilityActions = ({ )}