Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Update Logs.constants.ts (#21325)

Rodrigo Mansueli520e8970b676
diff --git a/apps/studio/components/interfaces/Settings/Logs/Logs.constants.ts b/apps/studio/components/interfaces/Settings/Logs/Logs.constants.ts
index 29ff5770509..11c6fd26100 100644
--- a/apps/studio/components/interfaces/Settings/Logs/Logs.constants.ts
+++ b/apps/studio/components/interfaces/Settings/Logs/Logs.constants.ts
@@ -214,12 +214,35 @@ from edge_logs
cross join unnest(m.request) AS r
cross join unnest(r.headers) AS h
where
- path like '%rest/v1/object%'
-group by
+ path like '%storage/v1/object/%'
+group by
r.path, r.method
order by
num_requests desc
limit 100
+`,
+ for: ['api'],
+ },
+ {
+ label: 'Storage Egress Requests',
+ description: 'Check the number of requests done on Storage Affecting Egress',
+ mode: 'custom',
+ searchString: `select
+ r.method as http_verb,
+ r.path as filepath,
+ count(*) as num_requests,
+ from edge_logs
+ cross join unnest(metadata) as m
+ cross join unnest(m.request) AS r
+ cross join unnest(r.headers) AS h
+ where
+ (path like '%storage/v1/object/%' or path like '%storage/v1/render/%')
+ and r.method = 'GET'
+ group by
+ r.path, r.method
+ order by
+ num_requests desc
+ limit 100
`,
for: ['api'],
},