Skip to content

Instantly share code, notes, and snippets.

@rajrao
Last active October 30, 2023 19:59
Show Gist options
  • Save rajrao/11e50f5964d3c950470eede148d357fa to your computer and use it in GitHub Desktop.
Save rajrao/11e50f5964d3c950470eede148d357fa to your computer and use it in GitHub Desktop.

The following query allows you to search for a requestid and get a link to the event (which is obtained by adding @log to the query)

fields @timestamp as Timestamp, @message, @logStream as LogStream, @log
| filter(@requestId = '09d10d9b-e8e0-46fa-ad9e-01a00c87d221')
| sort @timestamp desc
| limit 10

Get stats about a certain kind of message

fields @timestamp, @message, @logStream, @log
| filter( @message like /TooManyRequests/)
| stats count() by bin(1d) as date
| order by date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment