Visitar URL original
ref(server-utils): Export the pg query span helpers by chargome · Pull Request #25163 · getsentry/sentry-javascript · GitHub
Skip to content

ref(server-utils): Export the pg query span helpers - #25163

Merged
chargome merged 1 commit into
developfrom
feat/pg-export-query-span-helpers
Oct 9, 2026
Merged

chargome merged 1 commit into
developfrom
feat/pg-export-query-span-helpers

Conversation

@chargome

@chargome chargome commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Exports the pg query-channel binding, the connection attribute builder and PgConnectionParams so a driver that bundles its own copy of pg can emit the same span shape. The Neon integration in #25164 is the first consumer.

The deprecated db.connection_string attribute moves behind an opt-in. Only the pg integration sets it, for parity with its OTel predecessor, so new callers describe the connection with server.address and server.port alone. No behavior change for pg.

Refs #25144

@chargome
chargome added this pull request to stack #25166 October 8, 2026 09:12
@chargome chargome self-assigned this Oct 8, 2026
@chargome

chargome commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 8916d1b. Configure here.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.8 kB - -
@sentry/browser - with treeshaking flags 27.92 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.84 kB - -
@sentry/browser (incl. Tracing) 51.85 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 51.87 kB - -
@sentry/browser (incl. Tracing, Profiling) 54.8 kB - -
@sentry/browser (incl. Tracing, Replay) 91.58 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 80.45 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 96.29 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 109.27 kB - -
@sentry/browser (incl. Feedback) 47.32 kB - -
@sentry/browser (incl. sendFeedback) 34.84 kB - -
@sentry/browser (incl. FeedbackAsync) 39.95 kB - -
@sentry/browser (incl. Metrics) 30.82 kB - -
@sentry/browser (incl. Logs) 31.11 kB - -
@sentry/browser (incl. Metrics & Logs) 31.75 kB - -
@sentry/react 31.63 kB - -
@sentry/react (incl. Tracing) 54.17 kB - -
@sentry/vue 37.84 kB - -
@sentry/vue (incl. Tracing) 54.78 kB - -
@sentry/svelte 29.83 kB - -
@sentry/remix (Remix 3 client bundle) 56.83 kB - -
CDN Bundle 31.53 kB - -
CDN Bundle (incl. Tracing) 52.34 kB - -
CDN Bundle (incl. Logs, Metrics) 33.72 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 54.3 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.65 kB - -
CDN Bundle (incl. Tracing, Replay) 90.01 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 91.96 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.17 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.15 kB - -
CDN Bundle - uncompressed 92.92 kB - -
CDN Bundle (incl. Tracing) - uncompressed 155.46 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.46 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 161.41 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.5 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 275.63 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 281.57 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 289.33 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 295.26 kB - -
@sentry/nextjs (client) 56.53 kB - -
@sentry/sveltekit (client) 52.23 kB - -
@sentry/core/server 40.86 kB - -
@sentry/core/browser 13.71 kB - -
@sentry/node 151.04 kB +0.04% +52 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.59 kB - -
@sentry/node - without tracing 94.01 kB +0.01% +4 B 🔺
@sentry/node - without channel injection 129.21 kB +0.05% +59 B 🔺
@sentry/aws-serverless 102.17 kB +0.01% +7 B 🔺
@sentry/cloudflare (withSentry) - minified 209.81 kB - -
@sentry/cloudflare (withSentry) 520.23 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 227.48 kB - -

View base workflow run

@chargome
chargome force-pushed the feat/pg-export-query-span-helpers branch from 8916d1b to 03d5c1f Compare October 8, 2026 09:37
@chargome
chargome marked this pull request as ready for review October 8, 2026 11:15
@chargome
chargome requested a review from a team as a code owner October 8, 2026 11:15
@chargome
chargome requested review from andreiborza and isaacs and removed request for a team October 8, 2026 11:15
@chargome
chargome removed this pull request from stack #25166 October 8, 2026 11:23
@chargome
chargome added this pull request to stack #25178 October 8, 2026 11:23
@chargome
chargome marked this pull request as draft October 8, 2026 11:23
Expose the query-channel binding and the connection attribute builder so a
driver that bundles its own copy of pg can emit the same span shape. The
deprecated db.connection_string attribute moves behind an opt-in that only
the pg integration sets, so new callers describe the connection with
server.address and server.port alone. No behavior change for pg.

Refs #25144
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@chargome
chargome force-pushed the feat/pg-export-query-span-helpers branch from 03d5c1f to c3f20db Compare October 9, 2026 10:08
@chargome
chargome marked this pull request as ready for review October 9, 2026 10:39
@chargome
chargome removed the request for review from isaacs October 9, 2026 10:39
@chargome
chargome merged commit 9ef8a0e into develop Oct 9, 2026
538 of 540 checks passed
@chargome
chargome deleted the feat/pg-export-query-span-helpers branch October 9, 2026 10:41
chargome added a commit that referenced this pull request Oct 9, 2026
…erless (#25176)

Adds the orchestrion config for `@neondatabase/serverless`, so the
bundler plugins and the runtime hook can inject channels into it. The
integration that subscribes to those channels follows in #25164 and
registers the config there, which keeps every layer's CI green on its
own.

The package ships two minified esbuild bundles with mangled identifiers
that differ between CJS and ESM, so the name-based matchers find
nothing. The selectors key on property names and string literals that
survive minification: pg's `_pulseQueryQueue` sibling method for
`Client.prototype.query`, the `Neon-Connection-String` header literal
for the HTTP executor, and the `resolvedURL` return shape for the
connection resolver.

`@neondatabase/serverless` becomes a dev dependency of server-utils for
a test that transforms and executes the published bundles, so a Neon
release that reshapes them fails CI. The version range is capped at
`<2`.

Stacked on #25163.

Refs #25144

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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.

2 participants