-
Notifications
You must be signed in to change notification settings - Fork 571
fix(pg): fix instrumentation of ESM-imported pg-pool #2807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…trib into fix-pg-pool
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2807 +/- ##
==========================================
+ Coverage 89.50% 89.55% +0.04%
==========================================
Files 180 180
Lines 8719 8722 +3
Branches 1767 1767
==========================================
+ Hits 7804 7811 +7
+ Misses 915 911 -4
🚀 New features to boost your workflow:
|
Thanks for fixing this 🙂 opentelemetry-js-contrib/plugins/node/opentelemetry-instrumentation-pg/test/pg.test.ts Lines 1098 to 1125 in d9e757f
Doing so would also check the box in #1942 |
The ESM imported top-level object is a Module Namespace Object per ECMA262 spec that is, apparently, incompatible with the 'PG' class object that 'pg' returns. The ".defaults" holds the equivalent of require('pg').
Fixes: #2759