Issues provides built-in error monitoring for Cloudflare Workers. It detects production failures and groups related failures into issues without an SDK or application wrapper.
When a Worker throws an uncaught exception, fails an invocation, returns a 5xx response, or logs an error, Issues records the failure as an occurrence. It groups related occurrences from the same Worker into one issue.
Use the Issues overview to identify recurring failures and changes in activity. To review the diagnostic context for a failure, refer to Investigate issues.
You can also create an automation to automatically send an issue to a coding agent, webhook, chat service, or incident-management tool.
You can enable Issues through Wrangler, the dashboard, or the Cloudflare CLI (cf).
Requires Wrangler 4.134.0 or later.
-
In your Worker's Wrangler configuration file, set
observability.issues.enabledtotrue.{ "$schema": "./node_modules/wrangler/config-schema.json", "observability": { "issues": { "enabled": true } } }[observability.issues] enabled = true -
Deploy your Worker.
npx wrangler deployyarn wrangler deploypnpm wrangler deploy
-
Go to the Issues page.
Go to Issues ↗ -
Select Enable issues.
-
In your
cloudflare.config.tsfile, setworker.observability.issues.enabledtotrue.cloudflare.config.tsts import { defineConfig } from "cf/config"; import * as entrypoint from "./src/index.ts" with { type: "cf-worker" }; export default defineConfig({ worker: { name: "example-worker", entrypoint, compatibilityDate: "<COMPATIBILITY_DATE>", observability: { issues: { enabled: true, }, }, }, }); -
Deploy your Worker.
cf deploy
Issues processes new traffic after you enable it. It does not process historical failures. Send production traffic to the Worker, then open a detected issue in the Issues dashboard.
To record an error that your application catches, pass the caught value to console.error() before returning a fallback response.
try {
return await handleRequest(request);
} catch (error) {
console.error(error);
return new Response("Service unavailable", { status: 503 });
}try {
return await handleRequest(request);
} catch (error) {
console.error(error);
return new Response("Service unavailable", { status: 503 });
}Issues is available to all Workers accounts in open beta. It is free to use during the beta period.
| Limit | Value |
|---|---|
| Automations per account | 50 |
| Minimum occurrence threshold | 1 |
| Recurrence inactivity period | 1 hour to 365 days |
| Completed automation-run history | 30 days |