Repository navigation
feat(node): Add neonIntegration for @neondatabase/serverless - #25164
Merged
Merged
Conversation
chargome
added this pull request to stack #25166
October 8, 2026 09:12
This was referenced Oct 8, 2026
Member
Author
|
bugbot run |
Contributor
size-limit report 📦
|
chargome
force-pushed
the
feat/neon-integration
branch
from
October 8, 2026 09:37
9b1cb9f to
01f61fd
Compare
chargome
force-pushed
the
feat/neon-integration
branch
from
October 8, 2026 09:40
01f61fd to
66187ed
Compare
Member
Author
|
bugbot run |
Member
Author
|
bugbot run |
chargome
force-pushed
the
feat/neon-integration
branch
from
October 8, 2026 11:22
dcb4fab to
d738c1b
Compare
chargome
removed this pull request from stack #25166
October 8, 2026 11:23
chargome
changed the base branch from
feat/pg-export-query-span-helpers
to
feat/neon-orchestrion-config
October 8, 2026 11:23
chargome
added this pull request to stack #25178
October 8, 2026 11:23
This was referenced Oct 8, 2026
Member
Author
|
bugbot run |
There was a problem hiding this comment.
✅ 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 d738c1b. Configure here.
chargome
marked this pull request as ready for review
October 8, 2026 15:06
chargome
requested review from
mydea,
nicohrubec and
s1gr1d
and removed request for
a team
October 8, 2026 15:06
JPeer264
approved these changes
Oct 9, 2026
JPeer264
left a comment
Member
There was a problem hiding this comment.
Overall LGTM. Got couple of nits
chargome
force-pushed
the
feat/neon-integration
branch
from
October 9, 2026 09:55
d738c1b to
81fb7e1
Compare
Queries through the Neon serverless driver produced no db spans: the package bundles its own pg, so the pg instrumentation never sees it, and the HTTP driver only showed an http.client span without SQL. Subscribes to the orchestrion channels from the Neon config and registers it, so build-time bundler plugins get the same coverage as the runtime hook. The WebSocket driver reuses the pg query span builder. The HTTP executor inside neon() gets one span per request, covering sql.query(), tagged templates and transaction() batches without double counting lazy query promises. Connection attributes for HTTP come from the resolver call that runs inside that span. Fixes #25144 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
chargome
force-pushed
the
feat/neon-integration
branch
from
October 9, 2026 10:08
81fb7e1 to
cd4d0a3
Compare
chargome
added a commit
that referenced
this pull request
Oct 9, 2026
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 Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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>
chargome
added a commit
that referenced
this pull request
Oct 9, 2026
) Runs both Neon drivers end to end against Neon's own proxy (`ghcr.io/timowilhelm/local-neon-http-proxy`) in front of a local Postgres, so the HTTP `/sql` and WebSocket `/v2` wire protocols are the real ones. Covers `sql.query()`, tagged templates, `transaction()` batches, a failing statement and pool queries, in ESM and CJS under the default span lifecycle. The suite is excluded on Bun like the other database suites, since `bun run` cannot inject the diagnostics channels; the Bun plugin build does run it. The pool test is Node only, because on Bun and Deno the pool's connect callback runs outside the segment's async context. `ws` is added because Node 20 has no global `WebSocket`. Stacked on #25164. Refs #25144 Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
neonIntegrationfor@neondatabase/serverless. Both drivers emitdbspans with the pg span shape: the WebSocketClient/Pooland the HTTPneon()function, including Drizzle'sneon-httpandneon-serverlessadapters.Subscribes to the channels from #25176 and registers the config, so build-time bundler plugins get the same coverage as the runtime hook.
neon(), not the lazy query promise, sotransaction()batches get one span instead of one per statement plus one for the batch.db.connection_stringis deprecated and not emitted.End-to-end tests follow in #25177.
Stacked on #25176.
Fixes #25144