Skip to content

feat(server-utils): Migrate postgres.js instrumentation to orchestrion#21983

Open
andreiborza wants to merge 5 commits into
developfrom
ab/postgresjs-orchestrion
Open

feat(server-utils): Migrate postgres.js instrumentation to orchestrion#21983
andreiborza wants to merge 5 commits into
developfrom
ab/postgresjs-orchestrion

Conversation

@andreiborza

@andreiborza andreiborza commented Jul 6, 2026

Copy link
Copy Markdown
Member

Adds an orchestrion (diagnostics-channel injection) based postgres.js (postgres v3.x) integration to server-utils, covering query spans and connection attributes at parity with the OTel integration. Leaves the existing OTel PostgresJsInstrumentation intact (it's swapped out when injection is enabled) and reuses the core query/connection helpers via _INTERNAL_ re-exports rather than duplicating them.

Fixes #20921

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@andreiborza andreiborza requested a review from a team as a code owner July 6, 2026 12:39
@andreiborza andreiborza requested review from JPeer264 and mydea and removed request for a team and JPeer264 July 6, 2026 12:39
@andreiborza

Copy link
Copy Markdown
Member Author

bugbot run

@andreiborza andreiborza removed the request for review from mydea July 6, 2026 12:43

@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 0300e4a. Configure here.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.59 kB - -
@sentry/browser - with treeshaking flags 26.03 kB - -
@sentry/browser (incl. Tracing) 46.27 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.03 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.03 kB - -
@sentry/browser (incl. Tracing, Replay) 85.56 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.17 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 90.26 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 102.91 kB - -
@sentry/browser (incl. Feedback) 44.76 kB - -
@sentry/browser (incl. sendFeedback) 32.38 kB - -
@sentry/browser (incl. FeedbackAsync) 37.51 kB - -
@sentry/browser (incl. Metrics) 28.67 kB - -
@sentry/browser (incl. Logs) 28.91 kB - -
@sentry/browser (incl. Metrics & Logs) 29.59 kB - -
@sentry/react 29.38 kB - -
@sentry/react (incl. Tracing) 48.53 kB - -
@sentry/vue 33.03 kB - -
@sentry/vue (incl. Tracing) 48.16 kB - -
@sentry/svelte 27.61 kB - -
CDN Bundle 30 kB - -
CDN Bundle (incl. Tracing) 48.26 kB - -
CDN Bundle (incl. Logs, Metrics) 31.57 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.57 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.81 kB - -
CDN Bundle (incl. Tracing, Replay) 85.73 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.04 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.55 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.83 kB - -
CDN Bundle - uncompressed 89.35 kB - -
CDN Bundle (incl. Tracing) - uncompressed 145.99 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.05 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 149.96 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 218.75 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.16 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.12 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 278.86 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 282.81 kB - -
@sentry/nextjs (client) 50.94 kB - -
@sentry/sveltekit (client) 46.68 kB - -
@sentry/core/server 78.43 kB +0.06% +45 B 🔺
@sentry/core/browser 64.74 kB - -
@sentry/node-core 63.21 kB - -
@sentry/node 124.73 kB -0.01% -5 B 🔽
@sentry/node (incl. diagnostics channel injection) 131.75 kB +0.6% +774 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 69.95 kB - -
@sentry/node/light 50.72 kB - -
@sentry/node - without tracing 74.82 kB - -
@sentry/aws-serverless 85.59 kB -0.01% -1 B 🔽
@sentry/cloudflare (withSentry) - minified 181.68 kB - -
@sentry/cloudflare (withSentry) 449.39 kB - -

View base workflow run

Comment thread packages/server-utils/src/integrations/tracing-channel/postgres-js/utils.ts Outdated

@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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c65871a. Configure here.

Comment thread packages/server-utils/src/orchestrion/index.ts
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.

Rewrite PostgresJsInstrumentation to orchestrion

1 participant