API referenceConsole
Cloud provider
Polylane maps your Cloudflare account, reads Workers analytics, logs and traces to spot errors and slowdowns, finds the cause, and fixes it in your code.

Connect

Create read-only token

Polylane reads your account and sends Workers issues and alerts to itself.

Connect Cloudflare from the terminal. Pass --help for the flags Cloudflare accepts, plus --no-browser for headless environments.

Terminal
polylane cloud connect --provider cloudflare

How it works

Infrastructure graph

Polylane maps Workers with their routes, domains, bindings, schedules and builds, and the resources they use: KV, R2, D1, Durable Objects, Queues, Workflows, Hyperdrive, Vectorize, AI Gateway, Containers, Pages, Pipelines and Secrets Store. It also maps zones, tunnels, Access applications, load balancers, certificates, Logpush jobs, Spectrum apps and other account resources. Non-production Workers stay out of the graph unless you turn on monitoring for preview deployments.

Every 15 minutes, Polylane reads the last hour of the Cloudflare audit log. When it finds a change to a mapped resource type, it syncs the account again, at most once an hour. You can also sync the account from its page.

Deploys and changes

The same audit log read records Worker deployments, Worker versions, Pages deployments and Containers application updates as deploys. Agents compare these deploys with errors when they look for a cause.

Metrics, logs and checks

Polylane reads Cloudflare GraphQL Analytics and Workers Observability logs and traces. Every 30 minutes by default, account checks look at Worker error rate, wall time, memory resets and payload-limit errors, Durable Object errors, overloads and resets, D1 rows read, Workers AI capacity, Container start failures, failed Workflow instances, and destructive changes in the audit log. Each saved query in Workers Observability also becomes a check. You can change the check frequency in the account settings.

Alerts

Each Workers issue and each Polylane Workers alert reaches Polylane through the webhook destination. You can send your own Cloudflare notifications to the same destination. Each alert becomes an issue, and a new issue starts an investigation. Repeats of the same Workers issue go to the same issue. Polylane sets the thresholds of its three alerts from the p99 of the last seven days, and adjusts them over time.

Agents and writes

During an investigation, agents query telemetry, traces, GraphQL Analytics, Workers Issues, AI Gateway logs, Workflow instances and deployments. The account starts as Read-only in Polylane. A workspace admin can turn it off, so that agents can request Cloudflare API writes. Each write needs a safety review and your approval before it runs. The read-only token itself refuses writes outside notifications and Workers Observability.

Workers issues

Workers Issues is Cloudflare's error monitoring for Workers. It groups uncaught exceptions, failed invocations, 5xx responses and logged errors from a Worker into issues. Polylane gets each new or recurring Workers issue through an automation, opens a Polylane issue for it, and starts an investigation. Repeats of the same Workers issue go to the same Polylane issue.

Turn on Issues for your Workers

The automation only sends issues from Workers that have Issues turned on. Turn it on for each Worker in its Wrangler configuration file, then deploy the Worker:

{
  "observability": {
    "issues": {
      "enabled": true
    }
  }
}

You can also select Enable issues on the Worker's Issues page in the Cloudflare dashboard. If you deploy with Wrangler, also set the value in the configuration file. If you do not, the next deployment turns Issues off. Issues needs Wrangler 4.134.0 or later, and it only processes new traffic.

Connected accounts

When you connect an account, Polylane creates the automation for you. It covers each Worker that has Issues on, now and in the future. You do not have to do anything for each Worker except turn on Issues. To see the automation, open Issues > Automations on a Worker in the Cloudflare dashboard. Its name starts with Polylane.

Send Workers issues without connecting

You can send Workers issues to Polylane from a Cloudflare account that you do not connect, for example an account that belongs to a different team. Polylane opens an issue and investigates it with your other connected tools and your code. Connect the account later to let agents also read the Worker's logs, traces and deploys.

  1. In the Polylane console, open Settings > Telemetry Tokens and create a token. Copy it.
  2. In the Cloudflare dashboard, open a Worker that has Issues on, then go to Issues > Automations > Add automation.
  3. Select a trigger. To send each issue as it starts, use an occurrence threshold of 1.
  4. Create a destination. Select Generic Webhook and enter these values:
    • Name: Polylane
    • URL: https://sinks.polylane.com/v1/cloudflare
    • Secret: the telemetry token from step 1
  5. Select Create destination, turn on Enabled, and select Create.

Cloudflare sends the secret with each webhook, and Polylane uses it to find your workspace. You can use the same destination for other Cloudflare notifications, such as Workers Observability alerts or health checks. Each alert becomes an issue in Polylane.

If you connect the account later, Polylane creates its own automation. Delete the automation that you created, so that each Workers issue reaches Polylane only once.

Permissions

The link creates an account-owned token: a service principal that keeps working when the person who created it leaves the account. It requests read access across the account:

  • Developer Platform: Workers, KV, R2, D1, Queues, Basin Pipelines, Basin Catalog, Hyperdrive, Durable Objects, K2 streams, Containers, Secrets Store, Artifacts and more.
  • AI and Machine Learning: Workers AI, AI Gateway, AI Search, Vectorize, Browser Run.
  • DNS and Zones: DNS, zone settings, registrar, DNS firewall.
  • Network Services: Load Balancing, Magic Transit and WAN, Spectrum, tunnels.
  • App Security: WAF, rulesets, DDoS, bot management, page rules, certificates.
  • Zero Trust and Cloudflare One.
  • Cache, Email, Media, Rules, Analytics and Logs.

It also requests edit on Notifications and Workers Observability. Polylane uses these two to create its webhook destination, notification policies, Workers Issues automation and Workers alerts, and to remove them when you disconnect.

The token cannot deploy, change configuration, roll back, change billing, manage API tokens, or write SSO, SCIM or OAuth identity settings.

Disconnecting

When you disconnect the account in Polylane, Polylane deletes its webhook destination, notification policies, Workers Issues automation and Workers alerts, and stops all sync and checks.

Then revoke the API token in your Cloudflare dashboard under Manage Account → API Tokens.

Disconnect

Disconnecting stops every sync and check and deletes the credentials Polylane held. Everything Polylane set up in Cloudflare is removed as well; nothing is left behind.

Terminal
polylane cloud disconnect <id>

Tools

17

Operations agents can perform in threads.

List Telemetry Keys
List available Cloudflare telemetry data keys
List Telemetry Values
List values for a Cloudflare telemetry key
Run Telemetry Query
Query Cloudflare Workers / container logs, traces, and AI Gateway request logs
Traces
Read Cloudflare traces (list summaries, get full span tree)
Run Graphql Query
Execute a GraphQL query against the Cloudflare Analytics API
Graphql Schema Search
Search the Cloudflare GraphQL schema for matching types, fields, args, and enum values
Graphql Schema Overview
Fetch a paginated overview of all Cloudflare GraphQL types
Graphql Type Details
Fetch fields, args, and enum values for one Cloudflare GraphQL type
Graphql Complete Schema
Fetch the Cloudflare GraphQL schema with optional root-type details
Sql Datasets
List the datasets and columns of the Cloudflare SQL API
Run Sql Query
Query Cloudflare analytics and logs with the SQL API
Ai Gateway Logs
List Cloudflare AI Gateway logs, or fetch one log's full detail
Access Application Logs
List Cloudflare Access authentication events for an Access application
Workflow Instances
List or get Cloudflare Workflows instances
Workers Issues
List or get Cloudflare Workers Issues
Api
Call any Cloudflare REST API endpoint that lacks a dedicated tool
Deployments
List Cloudflare Worker/Pages deployments or Worker versions

Supported resources

51

Resource types that show up in your infrastructure graph.

Cloudflare Worker
AI Gateway
Cloudflare Container
Durable Object
D1 Database
Hyperdrive
Cloudflare KV
Basin Pipeline
Basin Stream
Basin Sink
R2 Bucket
R2 Domain
Cloudflare Queue
Secret Store
Cloudflare Secret
Cloudflare Pages
Domain
AI
Analytics Engine
Browser Run
Vectorize
Cloudflare Workflow
Cloudflare Zone
Worker Route
Worker Domain
Dispatch Namespace
Tenant Worker
Snippet
mTLS Certificate
Cloudflare Tunnel
Access Application
Spectrum App
Turnstile Widget
Waiting Room
Health Check
Load Balancer
Load Balancer Pool
Load Balancer Monitor
Logpush Job
SSL Certificate
Email Address
Stream Live Input
Cloudflare Images
Calls App
AI Search
Basin Catalog
Artifacts Namespace
K2 Stream
Workers VPC Service
Email Sending Subdomain
Flagship App