The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
feat: add flagging for local logs
TzeYiinge3d510a726eb
diff --git a/docker/.env.example b/docker/.env.exampleindex 6d101403b72..2f2b3070e8d 100644--- a/docker/.env.example+++ b/docker/.env.example@@ -81,4 +81,7 @@ IMGPROXY_ENABLE_WEBP_DETECTION=true# Configure Logflare API CallsLOGFLARE_API_KEY=api-key-LOGFLARE_URL=http://localhost:54328\ No newline at end of file+LOGFLARE_URL=http://localhost:54328++# Enable logging and observability in the UI+NEXT_PUBLIC_ENABLE_LOGS=true\ No newline at end of filediff --git a/studio/.env b/studio/.envindex 236f623b6f9..adaf247319b 100644--- a/studio/.env+++ b/studio/.env@@ -17,3 +17,4 @@ LOGFLARE_URL=http://localhost:54329NEXT_PUBLIC_SITE_URL=http://localhost:3000NEXT_PUBLIC_GOTRUE_URL=$SUPABASE_PUBLIC_URL/auth/v1NEXT_PUBLIC_HCAPTCHA_SITE_KEY=10000000-ffff-ffff-ffff-000000000001+NEXT_PUBLIC_ENABLE_LOGS=true\ No newline at end of filediff --git a/studio/components/interfaces/Settings/Logs/Logs.constants.ts b/studio/components/interfaces/Settings/Logs/Logs.constants.tsindex e0e5c686ec2..c1cb707456d 100644--- a/studio/components/interfaces/Settings/Logs/Logs.constants.ts+++ b/studio/components/interfaces/Settings/Logs/Logs.constants.ts@@ -1,4 +1,5 @@import dayjs from 'dayjs'+import { IS_PLATFORM } from 'lib/constants'import { DatetimeHelper, FilterTableSet, LogTemplate } from '.'export const LOGS_EXPLORER_DOCS_URL =@@ -665,3 +666,5 @@ export const TIER_QUERY_LIMITS: {TEAM: { text: '90 days', value: 90, unit: 'day', promptUpgrade: false },ENTERPRISE: { text: '90 days', value: 90, unit: 'day', promptUpgrade: false },}++export const SHOW_O11Y = IS_PLATFORM ? true : process.env.NEXT_PUBLIC_ENABLE_LOGS == 'true'diff --git a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsxindex bc052104c5a..783e7b4aeb9 100644--- a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx+++ b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx@@ -13,6 +13,7 @@ import SVG from 'react-inlinesvg'import { ProjectBase } from 'types'import { Route } from 'components/ui/ui.types'import { BASE_PATH, IS_PLATFORM, PROJECT_STATUS } from 'lib/constants'+import { SHOW_O11Y } from 'components/interfaces/Settings/Logs'export const generateToolRoutes = (ref?: string, project?: ProjectBase): Route[] => {const isProjectBuilding = project?.status === PROJECT_STATUS.COMING_UP@@ -139,18 +140,22 @@ export const generateOtherRoutes = (ref?: string, project?: ProjectBase): Route[},]: []),- {- key: 'logs',- label: 'Logs',- icon: <IconList size={18} strokeWidth={2} />,- link:- ref &&- (isProjectPaused- ? homeUrl- : isProjectBuilding- ? buildingUrl- : `/project/${ref}/logs/explorer`),- },+ ...(SHOW_O11Y+ ? [+ {+ key: 'logs',+ label: 'Logs',+ icon: <IconList size={18} strokeWidth={2} />,+ link:+ ref &&+ (isProjectPaused+ ? homeUrl+ : isProjectBuilding+ ? buildingUrl+ : `/project/${ref}/logs/explorer`),+ },+ ]+ : []),{key: 'api',label: 'API Docs',