Repository navigation
refactor(postgres): remove identity hooks - #10649
Conversation
Postgres.js is a pure Orchestrion integration, so activate it through the rewrite protocol instead of RITM/IITM identity hooks, matching azure-cosmos, bullmq, and supabase. Drop the hooks.js entry and the identity-hook stub, and enable rewrite activation for the postgres registry entry. Rewriter targets and the generated supported-versions output are unchanged.
Overall package sizeSelf size: 9.44 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.5.1 | 127.66 kB | 531.94 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
|
✅ All CI checks and tests passed. Datadog automation helped this PR pass. 🎉 All green!🧪 All tests passed 🔄 Datadog retried 2 tests - 2 passed on retry 🎯 Code Coverage (details) 🔗 Commit SHA: 22a8d30 | Docs | View more details | Give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10649 +/- ##
==========================================
- Coverage 98.87% 98.87% -0.01%
==========================================
Files 1059 1058 -1
Lines 171895 171887 -8
Branches 74 74
==========================================
- Hits 169957 169949 -8
Misses 1938 1938
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
wconti27
left a comment
There was a problem hiding this comment.
Looks good, would you want to do a bulk transition for the remainders considering this PR is so easy to review?
@wconti27 I think this is the last easy flip one, any other is either a hybrid instrumentation or use a different activation path (for example test opt) |
BenchmarksBenchmark execution time: 2026-10-06 18:11:57 Comparing candidate commit 22a8d30 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2387 metrics, 16 unstable metrics.
|
@pabloerhard Ah okay, thanks for the info and the changes here! |
@wconti27 That said, I'll look into what the pending non hybrid instrumentations (the ones that subscribe through other means) need to be hookless, if simple enough I might be opening a batch of PR's for that. |
Postgres.js is a pure Orchestrion integration, so activate it through the rewrite protocol instead of RITM/IITM identity hooks, matching azure-cosmos, bullmq, and supabase. Drop the hooks.js entry and the identity-hook stub, and enable rewrite activation for the postgres registry entry. Rewriter targets and the generated supported-versions output are unchanged.
Postgres.js is a pure Orchestrion integration, so activate it through the rewrite protocol instead of RITM/IITM identity hooks, matching azure-cosmos, bullmq, and supabase. Drop the hooks.js entry and the identity-hook stub, and enable rewrite activation for the postgres registry entry. Rewriter targets and the generated supported-versions output are unchanged.
What does this PR do?
Moves the Postgres.js (
postgres) integration off the RITM/IITM identity hooks so it activates only through the Orchestrion rewrite protocol, matchingazure-cosmos,bullmq, andsupabase:packages/datadog-instrumentations/src/postgres.js.postgresentry fromhelpers/hooks.js.activate: trueon the postgres entry inhelpers/rewriter/instrumentation-registry.js, so evaluating a rewritten Postgres.js file publishes the load that enables the plugin.postgresto the hookless Orchestrion plugin lists inplugin-structure.spec.jsand to the assertion that pure Orchestrion integrations are registered only as rewrite targets.Motivation
Orchestrion can now activate integrations without a module hook. Postgres.js is a pure Orchestrion integration, so the identity hook only adds loader overhead and a second activation path.
Additional Notes
targets.jsonis unchanged when regenerated, and the generated supported-versions output still listspostgres3.0.0 – 3.4.9, because rewriter-only ranges are already included.PLUGINS=postgres npm run test:pluginsagainst Postgres 9.5 (85 passing, covering 3.0.0 and 3.4.9, ESM variants, CJS, and the preloadedquery.jspartial-rewrite case), plus the plugin-structure, supported-integrations generator, loader-hook, plugin versions, rewriter/instrumentation helper, turbopack, and installer specs.