wrangler d1 insights runs across account databases
Introduced 2026-10-29 · score 0.97
HOW TO USE IT
To inspect top queries across all D1 databases, omit the database name when running `wrangler d1 insights`; identify each result's database with `databaseId`.
npx wrangler d1 insights --jsonWHY THIS HELPS
Inspect top queries across every D1 database in the account.
REQUIREMENTS AND LIMITATIONS
- Version: 4.156.0
- Availability: experimental
- Non-interactive: `--json` suppresses the command banner; output is logged as JSON.
- database name: Omit to fetch insights for every D1 database in the account.
- --json: Return output as JSON; default false.
- Prerequisite: Requires Wrangler authentication; command calls `requireAuth`.
- Prerequisite: `d1 insights` is experimental.
FIRST-PARTY EVIDENCE
- https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.156.0
- https://github.com/cloudflare/workers-sdk/blob/25802bce9f605916239bfd4714263c88f9b3098b/packages/wrangler/src/d1/insights.ts
- https://developers.cloudflare.com/d1/observability/metrics-analytics/
Check the installed version and the source before using it. Entry JSON