{"name":"@opentelemetry/plugin-mongodb","version":"0.3.3","description":"OpenTelemetry mongodb 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.git"},"scripts":{"test":"nyc ts-mocha -p tsconfig.json 'test/**/*.ts'","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","tdd":"yarn test -- --watch-extensions ts --watch","clean":"rimraf build/*","check":"gts check","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js","compile":"npm run version:update && tsc -p .","fix":"gts fix","prepare":"npm run compile"},"keywords":["opentelemetry","mongodb","nodejs","tracing","profiling","plugin"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","engines":{"node":">=8.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"@opentelemetry/node":"^0.3.3","@opentelemetry/tracing":"^0.3.3","@types/mocha":"^5.2.7","@types/mongodb":"^3.2.3","@types/node":"^12.7.2","@types/shimmer":"^1.0.1","codecov":"^3.6.1","gts":"^1.1.0","mocha":"^6.2.0","mongodb":"^3.4.1","nyc":"^14.1.1","rimraf":"^3.0.0","ts-mocha":"^6.0.0","ts-node":"^8.6.2","tslint-consistent-codestyle":"^1.16.0","tslint-microsoft-contrib":"^6.2.0","typescript":"3.7.2"},"dependencies":{"@opentelemetry/core":"^0.3.3","@opentelemetry/types":"^0.3.3","shimmer":"^1.2.1"},"bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","_id":"@opentelemetry/plugin-mongodb@0.3.3","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"dist":{"integrity":"sha512-umUFj71KGRsUZ5M+6JqRb/R0yLmJPHqhXI74JvQFbXIoDuQygdtZ5TQS1cmSPVk5la/eZlUcMILx/Q4zAxCbGA==","shasum":"7014d6312bec9e52817cc8848a051c68c8503613","tarball":"http://registry-npm.ywwl.com/@opentelemetry/plugin-mongodb/download/@opentelemetry/plugin-mongodb-0.3.3.tgz","fileCount":11,"unpackedSize":32794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKNGGCRA9TVsSAnZWagAAjHYP/jD8+oiZeH6gVLj5sIu3\nCugNIVaET1bZt9C0pDmcLpG7ERJUr70/vlJ2OuGg7Kn4vOVLmW6RTPNQSght\nLzPGIatdfsI3DY3OmKKX62e+1L8UZmMwRnlpc7NgFJlwv1j70vClAkxalX/2\nPN2P/rwyAlVeOgs2MIUjzETRonzCl17ccj5WN1mIC7wbxtHzb+6GKvtB3oW7\nzt+VelT9NuEtSjh4SCisdjbiVV/eUlIPCvqOtOvLC2SUXVYJohT0qhBUzOtO\ntpEhKZcOKJzJgYtMjTcMOZMathp30HcC1MLHM3FC8sy0sjhx8dVUBHOCZXWZ\nEY4Ctfh7bcg325qqi/Up44qdWGBZxKyf9L8JApdPwqfCeVTtINhLU2Up3IGi\n5zsmesxS75GGybM4vlFq7eLYG/OKzSze4eBJ1zN2wq2mpQi0eevbkgZ3FJdq\ns/+jIdoJ0X1NhXMlx/uEZdRryDTUAzQkVvFjTH7iuGvJHR/XvYpA61pjaj9s\n/TJ8UoDk6tFeP3S0N/BfiaAbRTv9KCAD0zxV8kO2nZcnOtirKVNsCKusgMyf\nceY8PVy0G+o7lQzgq1OOyuAjVTHyQ/51khOAWFwTr44eVBnBXnExEfWOy+ib\noBijAHxlQ8KZ25Aa1bud54jXTdq+tzMiO8PP9vao55HJuUoiaWwPm4Vd/deu\nvsMq\r\n=TMwq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuEHrCNCu3HU2c11I0G4BkdpgzyTCW/D7NzRv4bSaZUAIhAKhUHxszX+dVoJF2iPCmCTv4xfbOu0BJMg6lDkNySnso"}],"size":8933,"noattachment":false,"key":"/@opentelemetry/plugin-mongodb/-/@opentelemetry/plugin-mongodb-0.3.3.tgz"},"maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-mongodb_0.3.3_1579733382203_0.9494972153964472"},"_hasShrinkwrap":false,"deprecated":"Deprecated in favor of @opentelemetry/instrumentation-mongodb","readme":"# OpenTelemetry mongodb 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 [`mongodb`](https://github.com/mongodb/node-mongodb-native).\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-mongodb\n```\n### Supported Versions\n - `'>=2.0.0 <4`\n\n## Usage\n\nOpenTelemetry Mongodb Instrumentation allows the user to automatically collect trace data and export them to their backend of choice, to give observability to distributed systems.\n\nTo load a specific plugin (mongodb in this case), specify it in the registerInstrumentations's configuration.\n```js\nconst { NodeTracerProvider } = require('@opentelemetry/node');\nconst { registerInstrumentations } = require('@opentelemetry/instrumentation');\n\nconst provider = new NodeTracerProvider();\nprovider.register();\n\nregisterInstrumentations({\n  instrumentations: [\n    {\n      plugins: {\n        mongodb: {\n          enabled: true,\n          // You may use a package name or absolute path to the file.\n          path: '@opentelemetry/plugin-mongodb',\n        }\n      },\n    },\n  ],\n  tracerProvider: provider,\n});\n\n```\n\nTo load all of the [supported plugins](https://github.com/open-telemetry/opentelemetry-js#plugins), use 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```js\nconst { NodeTracerProvider } = require('@opentelemetry/node');\nconst { registerInstrumentations } = require('@opentelemetry/instrumentation');\n\nconst provider = new NodeTracerProvider();\nprovider.register();\nregisterInstrumentations({\n  tracerProvider: provider,\n});\n```\n\nSee [examples/mongodb](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/examples/mongodb) for a short example.\n\n### Mongo Plugin Options\n\nMongodb 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#L91) | `string` | If true, additional information about query parameters and results will be attached (as `attributes`) to spans representing database operations |\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-mongodb\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-contrib?path=plugins%2Fnode%2Fopentelemetry-plugin-mongodb\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-contrib.svg?path=plugins%2Fnode%2Fopentelemetry-plugin-mongodb&type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-contrib?path=plugins%2Fnode%2Fopentelemetry-plugin-mongodb&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/plugin-mongodb\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fplugin-mongodb.svg\n","publish_time":1579733382353,"_cnpm_publish_time":1579733382353,"dist-tags":{"latest":"0.15.0"}}