Skip to content

Instantly share code, notes, and snippets.

@TheOtherBrian1
Last active April 14, 2024 19:19
Show Gist options
  • Save TheOtherBrian1/27f7810067fb08ca4b6e0b3959ca982f to your computer and use it in GitHub Desktop.
Save TheOtherBrian1/27f7810067fb08ca4b6e0b3959ca982f to your computer and use it in GitHub Desktop.
select
cast(timestamp as datetime) as timestamp,
event_message,
status_code
from edge_logs
cross join unnest(metadata) as metadata
cross join unnest(metadata.request) as request
cross join unnest(metadata.response) as response
where
-- only look for requests through the database API
path like '%rest/v1%'
and
-- only look for errors
status_code > 399
and
regexp_contains(event_message, 'create_secret')
order by
timestamp desc
limit 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment