Skip to content

feat(cloudflare): Skip spans for the pi_ tables of PiHarness - #25028

Open
JPeer264 wants to merge 1 commit into
jp/pi-durable-e2efrom
jp/cloudflare-skip-pi-tables
Open

JPeer264 wants to merge 1 commit into
jp/pi-durable-e2efrom
jp/cloudflare-skip-pi-tables

Conversation

@JPeer264

@JPeer264 JPeer264 commented Oct 5, 2026

Copy link
Copy Markdown
Member

The Agents SDK PiHarness (changelog) keeps the state of pi-durable in the SQLite database of the Durable Object, in tables with the pi_ prefix of its session store. Each statement became a db.query span: one run with one tool call had 189 of them next to its 7 agent spans, and the request that submitted the prompt had 120 more. These statements are framework bookkeeping, like the ones on the cf_ tables of agents, so they are now skipped the same way, and durableObjectSqlSpanAllowlist: [/^pi_/] brings them back.

The cost is the same as for cf_: a user table whose name starts with pi_ also loses its spans until it is on the allowlist. Names such as api_keys or pipelines are not affected.

Before: 196 spans, after: 7 spans for the same prompt.

🤖 Generated with Claude Code

@JPeer264
JPeer264 added this pull request to stack #25029 October 5, 2026 07:22
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.52 kB - -
@sentry/browser - with treeshaking flags 27.68 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.57 kB - -
@sentry/browser (incl. Tracing) 51.42 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 51.43 kB - -
@sentry/browser (incl. Tracing, Profiling) 54.41 kB - -
@sentry/browser (incl. Tracing, Replay) 90.99 kB -0.06% -49 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 80.02 kB -0.03% -19 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 95.69 kB -0.05% -47 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 108.69 kB -0.05% -47 B 🔽
@sentry/browser (incl. Feedback) 47.02 kB - -
@sentry/browser (incl. sendFeedback) 34.58 kB - -
@sentry/browser (incl. FeedbackAsync) 39.68 kB - -
@sentry/browser (incl. Metrics) 30.53 kB - -
@sentry/browser (incl. Logs) 30.81 kB - -
@sentry/browser (incl. Metrics & Logs) 31.48 kB - -
@sentry/react 31.36 kB - -
@sentry/react (incl. Tracing) 53.77 kB +0.01% +1 B 🔺
@sentry/vue 37.49 kB - -
@sentry/vue (incl. Tracing) 54.33 kB - -
@sentry/svelte 29.55 kB - -
@sentry/remix (Remix 3 client bundle) 55.76 kB - -
CDN Bundle 31.23 kB - -
CDN Bundle (incl. Tracing) 51.98 kB - -
CDN Bundle (incl. Logs, Metrics) 33.46 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 53.93 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.21 kB -0.03% -19 B 🔽
CDN Bundle (incl. Tracing, Replay) 89.54 kB -0.04% -28 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 91.5 kB -0.03% -25 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 95.7 kB -0.02% -19 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 97.69 kB -0.03% -23 B 🔽
CDN Bundle - uncompressed 92.15 kB - -
CDN Bundle (incl. Tracing) - uncompressed 154.48 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 98.73 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 160.44 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 228.3 kB -0.04% -76 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 274.21 kB -0.03% -76 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 280.15 kB -0.03% -76 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 287.91 kB -0.03% -76 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 293.84 kB -0.03% -76 B 🔽
@sentry/nextjs (client) 56.3 kB - -
@sentry/sveltekit (client) 51.83 kB - -
@sentry/core/server 40.58 kB - -
@sentry/core/browser 13.62 kB - -
@sentry/node 148.51 kB +2.61% +3.77 kB 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.37 kB +0.18% +149 B 🔺
@sentry/node - without tracing 93.48 kB +0.19% +173 B 🔺
@sentry/node - without channel injection 126.68 kB +3.05% +3.74 kB 🔺
@sentry/aws-serverless 101.72 kB +0.15% +149 B 🔺
@sentry/cloudflare (withSentry) - minified 208.64 kB +0.02% +40 B 🔺
@sentry/cloudflare (withSentry) 516.88 kB +0.03% +129 B 🔺

View base workflow run

@JPeer264
JPeer264 force-pushed the jp/cloudflare-skip-pi-tables branch from ef92609 to 8e25d1f Compare October 5, 2026 09:44
@JPeer264
JPeer264 force-pushed the jp/cloudflare-skip-pi-tables branch from 8e25d1f to 08ac2af Compare October 5, 2026 11:22
@JPeer264
JPeer264 force-pushed the jp/cloudflare-skip-pi-tables branch from 08ac2af to ecd24b7 Compare October 5, 2026 12:39
@JPeer264
JPeer264 marked this pull request as ready for review October 5, 2026 12:40
@JPeer264
JPeer264 requested a review from a team as a code owner October 5, 2026 12:40
@JPeer264
JPeer264 requested review from isaacs and mydea and removed request for a team October 5, 2026 12:40
@JPeer264 JPeer264 self-assigned this Oct 5, 2026
@JPeer264
JPeer264 requested a review from andreiborza October 5, 2026 12:40
The PiHarness of the agents SDK keeps the state of pi-durable in the
SQLite database of the Durable Object, in tables with a pi_ prefix. Each
statement became a db.query span, close to 200 for one run, and they
buried the agent spans of the run. The tables are now treated like the
cf_ tables of the agents framework: their statements start no span, and
durableObjectSqlSpanAllowlist brings them back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JPeer264
JPeer264 force-pushed the jp/cloudflare-skip-pi-tables branch from ecd24b7 to 5f53090 Compare October 5, 2026 12:53

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant