Skip to content
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

Request(plugin-postgres): pg-pool #418

Closed
markwolff opened this issue Oct 9, 2019 · 0 comments · Fixed by #501
Closed

Request(plugin-postgres): pg-pool #418

markwolff opened this issue Oct 9, 2019 · 0 comments · Fixed by #501
Milestone

Comments

@markwolff
Copy link
Member

markwolff commented Oct 9, 2019

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-pool: 800k DLs/week; dependency of pg -- more important!
  • pg-cursor: 50k DLs/week

Additional context

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
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 a pull request may close this issue.

2 participants