We've enhanced Sanity Functions with automatic system logging that gives you better visibility into why your functions are or aren't running. The runtime now injects system logs directly into your function's log stream for key operational events.
Previously, when a function didn't run, it could be unclear why. Was it rate limited? Did it hit a recursion limit? Was the project over quota? You'd need to reach out to support channels to understand what happened.
Your function logs now include system-generated messages for important runtime events like rate limiting, quota exhaustion, and recursion blocking. These logs appear alongside your function's own console output, making it easier to diagnose issues without having to reach out to support.
The system automatically logs the following events:
When viewing your function logs in the CLI (npx -y sanity@latest functions logs --watch) or in your project dashboard, system messages appear with color-coded severity levels:
2026-01-28 23:00:00.000 INFO Function invocation started
2026-01-28 23:00:01.000 WARN Maximum recursion depth exceeded: function invocation blocked
2026-01-28 23:00:02.000 WARN Quota exceeded: function invocation blocked
2026-01-28 23:00:03.000 WARN Rate limit exceeded: function invocation blocked
2026-01-28 23:00:04.000 ERROR Function invocation failed
Fetched April 11, 2026