{"name":"@opentelemetry/plugin-pg","version":"0.14.0","description":"OpenTelemetry postgres automatic instrumentation package.","main":"build/src/index.js","types":"build/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js-contrib.git"},"scripts":{"test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","test:debug":"ts-mocha --inspect-brk --no-timeouts -p tsconfig.json 'test/**/*.test.ts'","test:local":"cross-env RUN_POSTGRES_TESTS_LOCAL=true npm run test","tdd":"npm run test -- --watch-extensions ts --watch","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../../","lint":"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../../scripts/version-update.js","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","watch":"tsc -w"},"keywords":["opentelemetry","postgres","pg","postgresql","nodejs","tracing","profiling","plugin"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","engines":{"node":">=8.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"@opentelemetry/context-async-hooks":"0.18.0","@opentelemetry/node":"0.18.0","@opentelemetry/test-utils":"^0.14.0","@opentelemetry/tracing":"0.18.0","@types/mocha":"7.0.2","@types/node":"14.0.27","@types/pg":"7.14.4","@types/shimmer":"1.0.1","codecov":"3.7.2","cross-env":"7.0.2","gts":"3.1.0","mocha":"7.2.0","nyc":"15.1.0","pg":"8.3.0","rimraf":"3.0.2","ts-mocha":"8.0.0","ts-node":"9.0.0","tslint-consistent-codestyle":"1.16.0","tslint-microsoft-contrib":"6.2.0","typescript":"4.1.3"},"dependencies":{"@opentelemetry/api":"^0.18.0","@opentelemetry/core":"^0.18.0","shimmer":"^1.2.1"},"gitHead":"7a87f4105ff432380132d81f56a33e3f5c4e8fb1","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib#readme","_id":"@opentelemetry/plugin-pg@0.14.0","_nodeVersion":"12.21.0","_npmVersion":"lerna/3.22.1/node@v12.21.0+x64 (darwin)","dist":{"integrity":"sha512-Em3jne13oV7h4+xEjXtLbsu1qntAGUNtpCTzMNHIjla9z3lykzONQABCnsS8PTf/ekc16B46qO/mMx1E5qjI7Q==","shasum":"847898cd1cd8cf49aa4b2fe6af21928fc034f3a5","tarball":"http://registry-npm.ywwl.com/@opentelemetry/plugin-pg/download/@opentelemetry/plugin-pg-0.14.0.tgz","fileCount":15,"unpackedSize":36855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQqJgCRA9TVsSAnZWagAAKf8P/ROHqia3zCLEa3HMWF1I\nlryD85q5Yl+BWIuQ1abwwLXpNTlQECinvWU5Usw6E3pO+QxMvdgAIREoXimw\nZCknSsch0dCJ5V8rQCbZaeDlyo8010mFTpBQfDLFeqhjHpFfInSRVMM1C4A/\nagvW+PqmOtoZ+r92TOedLTRJ3L9yhjhizNGOfcP8e7lHIx9vd+1IXgj86fMv\nsOtC+uX7duauCtSccNWXkNdaCUmZ6jCVpAjfl2AUB+XHPNnyYiiJfY0xmz1x\ngtmG+NNMCZEXLjZXMAlT6b9CKLU1O+oabbmCOkC5VTtQFUbJvOpP3dzgUuIx\noBHjhCuOzc5Jftz8666tquto5lE43YufcNa3VFpY3yEEJXK0pVioc+jbzMUt\nSlZd5WQ35eLgYL8leLHaksJ+alRf1wITh1ZDjCcU9HceE9Q+MHLiYeaQpsSJ\n/PyP6/mlIw5Btlp+KhUhfrYPzL176g4M9OnyDZJFv116/SvAWYnDMdj6tms7\nzBJ6X9YHwDPiK06CIQPdpPuec5ffflmBP5TsiFUp7UMl3Dyx/kIxoRHEjmmI\nJeJldOh0wfC2X/B7ZU/1BZRsNF9DXM8h1BPPAspJ9FcYX493Q1RDz+aU2Bo9\n9rii9vNDRJyplj0GfVo7rYmFpgWQcE/dIQcjlNxs7aTn9uM+xcgTMhTFC7BW\nScPW\r\n=hShR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUVSznUoTb5VCfZ42u5OpwdLFTqJymYqPFCOvOi+hHAgIhAJVqAKIkMx2bNqVRbffAW1u1D6Nn/6OcwQNVw/55AXL9"}],"size":10234,"noattachment":false,"key":"/@opentelemetry/plugin-pg/-/@opentelemetry/plugin-pg-0.14.0.tgz"},"_npmUser":{"name":"obecny","email":"bobecny@gmail.com"},"directories":{},"maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-pg_0.14.0_1614979679968_0.18768720010392537"},"_hasShrinkwrap":false,"deprecated":"Deprecated in favor of @opentelemetry/instrumentation-pg","readme":"# OpenTelemetry Postgres Instrumentation for Node.js\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis module provides automatic instrumentation for [`pg`](https://github.com/brianc/node-postgres).\n\nFor automatic instrumentation see the\n[@opentelemetry/node](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-node) package.\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/plugin-pg\nnpm install --save @opentelemetry/plugin-pg-pool\n```\n\n## Usage\n\nTo load all of the [default supported plugins](https://github.com/open-telemetry/opentelemetry-js#plugins), use the below approach. Each plugin is only loaded when the module that it patches is loaded; in other words, there is no computational overhead for listing plugins for unused modules.\n\n```js\nconst { NodeTracerProvider } = require('@opentelemetry/node');\n\nconst provider = new NodeTracerProvider(); // All default plugins will be used\n```\n\nIf instead you would just want to load a specific plugin (**pg** in this case), specify it in the `NodeTracer` configuration.\n\n```js\nconst { NodeTracerProvider } = require('@opentelemetry/node');\n\nconst provider = new NodeTracerProvider({\n  plugins: {\n    pg: {\n      enabled: true,\n      // You may use a package name or absolute path to the module\n      path: '@opentelemetry/plugin-pg',\n    }\n  }\n});\n```\n\nIf you are using any of the [`pg.Pool`](https://node-postgres.com/api/pool) APIs, you will also need to include the [`pg-pool` plugin](../opentelemetry-plugin-pg-pool).\n\n```js\nconst { NodeTracerProvider } = require('@opentelemetry/node');\n\nconst provider = new NodeTracerProvider({\n  plugins: {\n    pg: {\n      enabled: true,\n      // You may use a package name or absolute path to the module\n      path: '@opentelemetry/plugin-pg',\n    },\n    'pg-pool': {\n      enabled: true,\n      // You may use a package name or absolute path to the module\n      path: '@opentelemetry/plugin-pg-pool',\n    },\n  }\n});\n```\n\nSee [examples/postgres](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/examples/postgres) for a short example.\n\n### PostgreSQL Plugin Options\n\nPostgreSQL plugin has few options available to choose from. You can set the following:\n\n| Options | Type | Description |\n| ------- | ---- | ----------- |\n| [`enhancedDatabaseReporting`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-api/src/trace/instrumentation/Plugin.ts#L90) | `boolean` | If true, additional information about query parameters and results will be attached (as `attributes`) to spans representing database operations |\n\n## Supported Versions\n\n- [pg](https://npmjs.com/package/pg): `7.x`\n- [pg-pool](https://npmjs.com/package/pg-pool): `2.x` (Installed by `pg`)\n\n## Useful links\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-contrib.svg?path=plugins%2Fnode%2Fopentelemetry-plugin-pg\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-contrib?path=plugins%2Fnode%2Fopentelemetry-plugin-pg\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-contrib.svg?path=plugins%2Fnode%2Fopentelemetry-plugin-pg&type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-contrib?path=plugins%2Fnode%2Fopentelemetry-plugin-pg&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/plugin-pg\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fplugin-pg.svg\n","publish_time":1614979680147,"_cnpm_publish_time":1614979680147,"dist-tags":{"latest":"0.15.0"}}