From cd3491510dffb9c6bc46bb5ad9e2f5e9716a45d0 Mon Sep 17 00:00:00 2001 From: Rodrigo Mansueli Nunes Date: Fri, 24 Feb 2023 10:58:27 -0300 Subject: [PATCH] added Storage Object Request template --- .../Settings/Logs/Logs.constants.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/studio/components/interfaces/Settings/Logs/Logs.constants.ts b/studio/components/interfaces/Settings/Logs/Logs.constants.ts index 1ad8909622c..a3672b85662 100644 --- a/studio/components/interfaces/Settings/Logs/Logs.constants.ts +++ b/studio/components/interfaces/Settings/Logs/Logs.constants.ts @@ -200,6 +200,28 @@ limit 100 `, for: ['database'], }, + { + label: 'Storage Object Requests', + description: 'Number of requests done on Storage Objects', + 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 '%rest/v1/object%' + group by + r.path, r.method + order by + timestamp desc + limit 100 +`, + for: ['api'], + }, ] export const LOG_TYPE_LABEL_MAPPING: { [k: string]: string } = {