Cloudflare Workers Logging
Cloudflare Workers Logging gives your agents access to Workers telemetry data — request logs, console output, and errors generated by your Cloudflare Workers. This is useful for debugging Worker behavior, tracing request flows, and identifying error patterns.
What This Connection Provides
Section titled “What This Connection Provides”Once connected, agents can:
- Query logs — search and filter Workers telemetry data including HTTP request logs,
console.logoutput, and uncaught exceptions. - List available log keys — discover which fields are available in your Workers telemetry data.
- List values for specific keys — explore the distinct values for any log field to understand your data.
The default lookback period is 24 hours, with a maximum of 7 days.
Credentials Needed
Section titled “Credentials Needed”To set up this connection, you will need:
- API Token — a Cloudflare API token with Workers read permissions.
- Account ID — your Cloudflare account identifier.
- Script Name (optional) — the name of a specific Worker to scope logs to.
How to Get Your Cloudflare API Token
Section titled “How to Get Your Cloudflare API Token”- Go to dash.cloudflare.com.
- Click your profile icon in the top-right corner and select My Profile.
- Go to the API Tokens tab.
- Click Create Token.
- You can either:
- Use the Read All Resources template for broad read access, or
- Click Create Custom Token and grant the following permissions:
- Account > Workers Scripts > Read
- Account > Workers Tail > Read
- Complete the token creation flow and copy the token immediately — it will not be shown again.
How to Find Your Account ID
Section titled “How to Find Your Account ID”- Log in to the Cloudflare dashboard at dash.cloudflare.com.
- Select any domain, or navigate to Workers & Pages in the sidebar.
- Your Account ID is displayed in the right sidebar under Account details.
- It is a 32-character hexadecimal string (e.g.,
a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6).
Script Name (Optional)
Section titled “Script Name (Optional)”If you want to scope log queries to a specific Worker, enter the Worker’s script name. This is the name shown in your Workers & Pages dashboard.
If you leave this field blank, agents will query logs across all Workers in your account.
Setting Up the Connection
Section titled “Setting Up the Connection”- In OpsTower, navigate to Connections in the sidebar.
- Click Add Connection and select Cloudflare Workers Logging.
- Enter your API Token and Account ID.
- Optionally enter a Script Name to limit queries to a specific Worker.
- Save the connection.
Once the connection shows a green status indicator, you can enable it on any Debugger agent to start querying your Workers telemetry.