Send logs from your Vercel apps to GraphJSON for easy debugging, troubleshooting and alerting.
Vercel wraps all your console logs in the context of the request. They're buried in the message in your log event metadata. This is the stdout dump from your lambda runs. AWS gives us some metadata about the request in the report section along with the stdout string.
You can thus extract the stdout using a JSON extract function, eg.
SELECTtimestamp,JSONExtractString(json, 'message') as stdoutFROMlogsLIMIT10
For errors, each event has a message field with ERROR in it. Thus to find all logs with errors, we simply need to add a LIKE filter
SELECTtimestamp,JSONExtractString(json, 'message') as stdoutFROMlogsWHEREJSONExtractString(json, 'message') LIKE '%ERROR%'LIMIT10
This integration requires a Pro or Enterprise plan.