Last active
April 14, 2024 19:19
-
-
Save TheOtherBrian1/27f7810067fb08ca4b6e0b3959ca982f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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