{"name":"@opentelemetry/plugin-mongodb","version":"0.15.0","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-contrib.git"},"scripts":{"test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","tdd":"npm run test -- --watch-extensions ts --watch","clean":"rimraf build/*","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"},"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/context-async-hooks":"0.18.2","@opentelemetry/node":"0.18.2","@opentelemetry/tracing":"0.18.2","@types/mocha":"7.0.2","@types/mongodb":"3.5.25","@types/node":"14.0.27","@types/shimmer":"1.0.1","codecov":"3.7.2","gts":"3.1.0","mocha":"7.2.0","mongodb":"3.5.9","nyc":"15.1.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","@opentelemetry/semantic-conventions":"^0.18.0","shimmer":"^1.2.1"},"gitHead":"a2de7757da17a026433f0735035f65f7f88f1666","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib#readme","_id":"@opentelemetry/plugin-mongodb@0.15.0","_nodeVersion":"14.8.0","_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","dist":{"integrity":"sha512-UUgu3uwFqtiCIGsMLnv2WD3r24KdBDJTZjIR7qSC9b2hwwq0tDTJiEwp6a0HAdj08ka/DjBRJjjKcQDykq72Zg==","shasum":"bb1c44150e11b2f5d8edab7c23ad5bc817e732d2","tarball":"http://registry-npm.ywwl.com/@opentelemetry/plugin-mongodb/download/@opentelemetry/plugin-mongodb-0.15.0.tgz","fileCount":11,"unpackedSize":31632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJga157CRA9TVsSAnZWagAAqMQQAJ5w93J/v8Jhlz5Byv8H\nXwMVbxiSQXYe2b9A8An90t5wPwli7zNwvU73bkThnXagb6dHxKBnCzw4yT50\nZJN2Lo54vLunDTI11JR0rkbEoUcC9QH7PHdx9C0Qna9ivfwikQU9Gc9nF50h\n+o2LnSHUjma0qxqv99lArjbdONn2Srcul8cMb8+HMni1Xoxu5nzQLeNp6RQF\nMBOq7W1lpVBGB7Ut3l01epBgewgnaON0Pi306byBweM08xhqfmvziOWZ+pSA\n0dFVdvYy1PgtHZXDO/Zo2kn6bRR9HFgQa0uPToJCunV3rzGHwegQTDLTzuu6\nwa6bey/cEqVRyS0EQETXNNYcx4d9RWyIkv0B7xXfCJ2VY5RBWNC5ncQ53EjR\nC7ENwzujy6fDBAtIqd0H66SQrPAEpWjl4oAbn9UIjsvD588gjqljIdGVlKLi\npnBzx/Ufp+C+U51a9tCOfLQHdG1AZcl56vdFgfUpZUSt99ZIeeYDrgWFB2is\nhnN4URGQvsfqFUtx+W13knBwBNkWvTKCoKhfkSDsPw+/tGXHxNYOOdVAJgOZ\nBH6dbJ96KG1zWXS4YySgV3HM8wKUwtcCSdMlP8WAhYk0+WkWYt+o0ouphb73\nr62E9rkg+yGPbZQdQJkSoePnueo81cIf0OGZ5BxcIVp/DdADpPm7XvJLeBqL\n1hlB\r\n=fJij\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBMYSM/ZTMrmtu2iuYtKFapKkeqng7qN1d6795epTI0OAiEA1fhD1PoUQdUPwuHeo5JjWbTt+6ltCf9t5+9OWzOpleM="}],"size":9376,"noattachment":false,"key":"/@opentelemetry/plugin-mongodb/-/@opentelemetry/plugin-mongodb-0.15.0.tgz"},"_npmUser":{"name":"dyladan","email":"dyladan@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-mongodb_0.15.0_1617649275460_0.7004612317746048"},"_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":1617649275566,"_cnpm_publish_time":1617649275566,"dist-tags":{"latest":"0.15.0"}}