Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ const getEdgeLogsQuery = () => {

-- ONLY include logs where the path does not include /rest/
WHERE edge_logs_request.path NOT LIKE '%/rest/%'
AND edge_logs_request.path NOT LIKE '%/storage/%'

`
}
Expand Down Expand Up @@ -445,6 +446,41 @@ const getSupavisorLogsQuery = () => {
`
}

// WHERE pathname includes `/storage/`
const getSupabaseStorageLogsQuery = () => {
return `
select
id,
el.timestamp as timestamp,
'storage' as log_type,
CAST(edge_logs_response.status_code AS STRING) as status,
CASE
WHEN edge_logs_response.status_code BETWEEN 200 AND 299 THEN 'success'
WHEN edge_logs_response.status_code BETWEEN 400 AND 499 THEN 'warning'
WHEN edge_logs_response.status_code >= 500 THEN 'error'
ELSE 'success'
END as level,
edge_logs_request.path as path,
edge_logs_request.host as host,
null as event_message,
edge_logs_request.method as method,
authorization_payload.role as api_role,
COALESCE(sb.auth_user, null) as auth_user,
null as log_count,
null as logs
from edge_logs as el
cross join unnest(metadata) as edge_logs_metadata
cross join unnest(edge_logs_metadata.request) as edge_logs_request
cross join unnest(edge_logs_metadata.response) as edge_logs_response
left join unnest(edge_logs_request.sb) as sb
left join unnest(sb.jwt) as jwt
left join unnest(jwt.authorization) as auth
left join unnest(auth.payload) as authorization_payload
-- ONLY include logs where the path includes /storage/
WHERE edge_logs_request.path LIKE '%/storage/%'
`
}

/**
* Combine all log sources to create the unified logs CTE
*/
Expand All @@ -462,6 +498,8 @@ WITH unified_logs AS (
${getAuthLogsQuery()}
union all
${getSupavisorLogsQuery()}
union all
${getSupabaseStorageLogsQuery()}
)
`
}
Expand Down
7 changes: 0 additions & 7 deletions apps/www/components/Hero/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Link from 'next/link'
import { Button } from 'ui'
import SectionContainer from '~/components/Layouts/SectionContainer'
import { useSendTelemetryEvent } from '~/lib/telemetry'
import AnnouncementBadge from '../Announcement/Badge'

const Hero = () => {
const sendTelemetryEvent = useSendTelemetryEvent()
Expand All @@ -16,12 +15,6 @@ const Hero = () => {
<div className="mx-auto max-w-2xl lg:col-span-6 lg:flex lg:items-center justify-center text-center">
<div className="relative z-10 lg:h-auto pt-[90px] lg:pt-[90px] lg:min-h-[300px] flex flex-col items-center justify-center sm:mx-auto md:w-3/4 lg:mx-0 lg:w-full gap-4 lg:gap-8">
<div className="flex flex-col items-center">
<AnnouncementBadge
url="/state-of-startups"
announcement="Take the survey"
badge="State of Startups 2025"
className="mb-8 -mt-4 lg:-mt-8"
/>
<h1 className="text-foreground text-4xl sm:text-5xl sm:leading-none lg:text-7xl">
<span className="block text-foreground">Build in a weekend</span>
<span className="text-brand block md:ml-0">Scale to millions</span>
Expand Down
3 changes: 1 addition & 2 deletions apps/www/components/Nav/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import MobileMenu from './MobileMenu'
import RightClickBrandLogo from './RightClickBrandLogo'
import { useSendTelemetryEvent } from '~/lib/telemetry'
import useDropdownMenu from './useDropdownMenu'
import { AnnouncementBanner, AuthenticatedDropdownMenu } from 'ui-patterns'
import { AuthenticatedDropdownMenu } from 'ui-patterns'

interface Props {
hideNavbar: boolean
Expand Down Expand Up @@ -71,7 +71,6 @@ const Nav = ({ hideNavbar, stickyNavbar = true }: Props) => {

return (
<>
<AnnouncementBanner />
<div
className={cn('sticky top-0 z-40 transform', disableStickyNav && 'relative')}
style={{ transform: 'translate3d(0,0,999px)' }}
Expand Down
Loading