PlanetScale databases and branches in the context graph
Connect a PlanetScale organisation and Polylane adds its MySQL and Postgres databases and branches to the context graph, with Query Insights in every investigation.
What changed
Connect a PlanetScale organisation and Polylane syncs it every 15 minutes. Each database and branch becomes a node with its region, production flag and parent branch. Services that reach a branch are linked to it by its connection host, for example through a
Cloudflare Hyperdrive configuration, so an error in a Worker or a container can be followed to the exact branch behind it.
Query Insights
PlanetScale has no logs API, so Polylane reads Query Insights for each database and branch: queries, query errors, p99 latency, rows read and query time. Failing queries serve as the branch's error lines. During an investigation, agents read the top query patterns, error groups and latency windows for one branch. Polylane asks for an OAuth grant or a service token, never database credentials.
Checks on production branches
Every 30 minutes, Polylane checks each production branch for latency problems PlanetScale itself detects, query errors and the worst p99 latency of a query pattern against the account's history, and query volume. A drop to zero queries can mean an application lost its connection. See the PlanetScale integration.
Why it matters
A slow endpoint is often a slow query. With PlanetScale in the context graph, an investigation follows an error from the service to the branch it connects to and reads that branch's failing and slow queries.
How to use it
- Open the
PlanetScale integration in the Polylane console and click Connect with
PlanetScale.
- Approve the access Polylane asks for. If your account can open more than one organisation, pick the one to connect.
- The first sync starts when
PlanetScale sends you back.
Without a browser, create a service token under Settings → Service tokens in PlanetScale with
read_organization and read_databases, and paste the token ID and token into Polylane.