You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For "complete" postgres support, the pg.Pool and pg.Cursor APIs should also be patched. Only pg-pool is a dependency of pg and is directly exposed by pg, so it gets much more usage. Having these as separate plugins would make overall postgres patching more clean and testable (rather than doing internal file patching). They should live in a similar directory so that all could be simultaneously tested as they would be in the wild, e.g pool.query(...) would be using our pg patching for client.query(...). Initial folder structure is below. PTAL! Alternatively, tests requiring both plugins could be put inside pg/ or pg-pool/ and those tests would just be importing in both plugins.
Folder structure proposal # 1
- packages/opentelemetry-plugin-postgres/
- - tests/ # tests requiring both plugins
- - pg/ # tests and implementation for pg module plugin
- - pg-pool/ # tests and implementation for pg-pool module plugin
- - package.json # mock entry point for running tests in tests/
Folder structure proposal # 2
- packages/opentelemetry-plugin-postgres/
- - pg/ # tests and implementation for pg module plugin
- - pg-pool/ # tests and implementation for pg-pool module plugin
# and tests which require both plugins
The text was updated successfully, but these errors were encountered:
Related to #417
Is it applicable for Node or Browser or both
Node.js
Do you expect this plugin to be commonly used (Weekly downloads)
pg
-- more important!Additional context
For "complete" postgres support, the
pg.Pool
andpg.Cursor
APIs should also be patched. Onlypg-pool
is a dependency ofpg
and is directly exposed bypg
, so it gets much more usage. Having these as separate plugins would make overall postgres patching more clean and testable (rather than doing internal file patching). They should live in a similar directory so that all could be simultaneously tested as they would be in the wild, e.gpool.query(...)
would be using ourpg
patching forclient.query(...)
. Initial folder structure is below. PTAL! Alternatively, tests requiring both plugins could be put insidepg/
orpg-pool/
and those tests would just be importing in both plugins.Folder structure proposal # 1
Folder structure proposal # 2
The text was updated successfully, but these errors were encountered: