Skip to content

Instantly share code, notes, and snippets.

@chasers
Created April 2, 2025 17:15
Show Gist options
  • Save chasers/ac6e1ff89a8f30b96e34d852231085bf to your computer and use it in GitHub Desktop.
Save chasers/ac6e1ff89a8f30b96e34d852231085bf to your computer and use it in GitHub Desktop.
Use Supabase Logs Explorer to see ChatGCP-User requests
SELECT
count(t0.id) as count,
f2.path as path
FROM
edge_logs AS t0
INNER JOIN UNNEST(t0.metadata) AS f1 ON TRUE
INNER JOIN UNNEST(f1.request) AS f2 ON TRUE
INNER JOIN UNNEST(f2.headers) AS f3 ON TRUE
WHERE
AND (REGEXP_CONTAINS(f3.user_agent, 'ChatGPT-User'))
GROUP BY
path
ORDER BY
count DESC
LIMIT
10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment