Overview
Instructions
Overview
Instructions
Overview
Send logs from your Vercel apps to GraphJSON for easy debugging, troubleshooting and alerting.
Instructions
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.
SELECT timestamp, JSONExtractString(json, 'message') as stdoutFROM logsLIMIT 10
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
SELECT timestamp, JSONExtractString(json, 'message') as stdoutFROM logsWHERE JSONExtractString(json, 'message') LIKE '%ERROR%'LIMIT 10
This integration offers additional features for Pro and Enterprise plans.