{"name":"@opentelemetry/plugin-ioredis","version":"0.3.3","description":"OpenTelemetry ioredis 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'","test:debug":"cross-env RUN_REDIS_TESTS_LOCAL=true ts-mocha --inspect-brk --no-timeouts -p tsconfig.json 'test/**/*.test.ts'","test:local":"cross-env RUN_REDIS_TESTS_LOCAL=true yarn test","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 .","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","fix":"gts fix","prepare":"npm run compile"},"keywords":["opentelemetry","ioredis","redis","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/test-utils":"^0.3.3","@opentelemetry/tracing":"^0.3.3","@types/ioredis":"^4.14.3","@types/mocha":"^5.2.7","@types/node":"^13.1.0","@types/shimmer":"^1.0.1","codecov":"^3.6.1","cross-env":"^6.0.3","gts":"^1.1.2","ioredis":"^4.14.1","mocha":"^6.2.2","nyc":"^15.0.0","rimraf":"^3.0.0","ts-mocha":"^6.0.0","ts-node":"^8.5.4","tslint-consistent-codestyle":"^1.16.0","tslint-microsoft-contrib":"^6.2.0","typescript":"3.7.4"},"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-ioredis@0.3.3","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"dist":{"integrity":"sha512-pzEhmg0oZdODk6QMEywXLkb5finj+GxDTU0YArK5Le5TPMJNtu4bjIJ8ySzsnFSi4bl90iIt7ZX/tlVxyPt6Wg==","shasum":"adfde48951fb6f30fe5d4b68c7454318e2239691","tarball":"http://registry-npm.ywwl.com/@opentelemetry/plugin-ioredis/download/@opentelemetry/plugin-ioredis-0.3.3.tgz","fileCount":15,"unpackedSize":31491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKNGACRA9TVsSAnZWagAABNkP/RK52cNLlkwCjR0HO3U9\nYm+NawyxQpuLBUDokSsdswF0hnxz+hgKqp9ffjChwnTthtR+6V1TljEBcbCd\nYKVEPLKzh4/ktoDcraMoCYW0NgQz7+7OlKUk3AFVEnL42yMsnbSIYCE11nUT\ns0t+pNqsSDhPVHYDOddLv+mzJrl8XUCK6kbYn6Y2Tr2EqC2t38B2pKhqxbEY\n1wWAewky31e+5HDX22we6cMpWprYsEzdzDPKTzozoY+B2vgIm8lhYadwB4DW\nOGk2Kf1ZPMfELq3DRJx+nTrXY7cdrDPBHBWINqxzHZ7hQoMp2OAyxSGCioGo\nXm2+zqjjei12fG3At9/J+xyvGTL8o5mwl75/4uLpRscHuTpxNhhidvMgwm6w\nXbQ6k9LS7B4LRIv8kEbL+wJE4IYxft4dxCMJt8Rf8WaazcfDDSsRIaIxE2hm\n6kWeleu6aVORZf2De8tlIwDbInkgB8Mv2Ckv5Cv11rTbtngFgguJA+a6llUU\nHgdt5NhrqWRo0v2qM44T6nAYAGbKZDWfn9r9+uaFPjKlkgf1s8cUrgRKeXVO\nOncodjp+qov8c25JFu0p6slH/4nGq85JfEaEZQkwjwIzNRo9FyVcO1RtsG5P\nDq0GIY+/dJYTqsF/FyWXbOIVcghLT4ASmDEkt7wNblfEZwVm2ua/PaiVonxx\nInAI\r\n=FC4l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDM4K7DGJte6k9t2tvLFuX4+IZYxaGBHYk3ASoISXyXWgIgbiH9kFCn+4+kpOwUll6qbKhNFauwn7FdS5Jg2d46gL0="}],"size":8249,"noattachment":false,"key":"/@opentelemetry/plugin-ioredis/-/@opentelemetry/plugin-ioredis-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-ioredis_0.3.3_1579733375593_0.5566583089761967"},"_hasShrinkwrap":false,"deprecated":"Deprecated in favor of @opentelemetry/instrumentation-ioredis","readme":"# OpenTelemetry ioredis 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 [`ioredis`](https://github.com/luin/ioredis).\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```\nnpm install --save @opentelemetry/plugin-ioredis\n```\n\n### Supported Versions\n - `>=2.0.0`\n\n## Usage\n\nTo load a specific plugin (**ioredis** 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        ioredis: {\n          enabled: true,\n          // You may use a package name or absolute path to the file.\n          path: '@opentelemetry/plugin-ioredis',\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```javascript\nconst { NodeTracerProvider } = require('@opentelemetry/node');\nconst { registerInstrumentations } = require('@opentelemetry/instrumentation');\n\nconst provider = new NodeTracerProvider();\nprovider.register();\nregisterInstrumentations({\n  tracerProvider: provider,\n});\n\n```\n\n### IORedis Plugin Options\n\nIORedis plugin has few options available to choose from. You can set the following:\n\n| Options | Type | Description |\n| ------- | ---- | ----------- |\n| `dbStatementSerializer` | `DbStatementSerializer` | IORedis plugin will serialize db.statement using the specified function. |\n\n#### Custom db.statement Serializer\nThe plugin serializes the whole command into a Span attribute called `db.statement`. The standard serialization format is `{cmdName} {cmdArgs.join(',')}`.\nIt is also possible to define a custom serialization function. The function will receive the command name and arguments and must return a string.\n\nHere is a simple example to serialize the command name skipping arguments:\n\n```javascript\nconst { NodeTracerProvider } = require('@opentelemetry/node');\n\nconst provider = new NodeTracerProvider({\n  plugins: {\n    ioredis: {\n      enabled: true,\n      // You may use a package name or absolute path to the file.\n      path: '@opentelemetry/plugin-ioredis',\n      dbStatementSerializer: function (cmdName, cmdArgs) {\n        return cmdName;\n      }\n    }\n  }\n});\n\n```\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-ioredis\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-contrib?path=plugins%2Fnode%2Fopentelemetry-plugin-ioredis\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-contrib.svg?path=plugins%2Fnode%2Fopentelemetry-plugin-ioredis&type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-contrib?path=plugins%2Fnode%2Fopentelemetry-plugin-ioredis&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/plugin-ioredis\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fplugin-ioredis.svg\n","publish_time":1579733375755,"_cnpm_publish_time":1579733375755,"dist-tags":{"latest":"0.15.0"}}