{"name":"@opentelemetry/plugin-ioredis","version":"0.15.0","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-contrib.git"},"scripts":{"test":"nyc ts-mocha -p tsconfig.json 'test/**/*.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 npm run test","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 .","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","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/context-async-hooks":"0.18.2","@opentelemetry/node":"0.18.2","@opentelemetry/test-utils":"^0.15.0","@opentelemetry/tracing":"0.18.2","@types/ioredis":"4.17.3","@types/mocha":"7.0.2","@types/node":"14.0.27","@types/shimmer":"1.0.1","codecov":"3.7.2","cross-env":"7.0.2","gts":"3.1.0","ioredis":"4.17.3","mocha":"7.2.0","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-ioredis@0.15.0","_nodeVersion":"14.8.0","_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","dist":{"integrity":"sha512-E4BOPxZ0rN8RKArW5NUYC7gCHBYT/nlkHJj5HVsKzcWp2vfyWVZ75PEUVoJ+niVX3z+Uk2FslcWSB0OXxe0uxQ==","shasum":"94e7fa3931e49297f536cab1423a72b3915dfa19","tarball":"http://registry-npm.ywwl.com/@opentelemetry/plugin-ioredis/download/@opentelemetry/plugin-ioredis-0.15.0.tgz","fileCount":13,"unpackedSize":29884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJga150CRA9TVsSAnZWagAAXI4P/2HMsDP4G7qCBVsCtJZQ\nC70TITA8p8XjK3TIsetPpSC7uvUEUJSwx9yut2mgraOg2mS6OcQhr2e+YgDG\nlQpWh1Zqta87aatQiK1SZJV6rV6ddjMBBzUVA298aleA3ll3khtwlyABBMTm\nLp+enlO5q97XbO+k1uNt/8sFgnja99sqtj9c4PCedvp2MYH7ZysFW8bHUGjI\n9Nq0Lo41qYerW1PCtTafWuXQEEfvUlu2hGfbGZBaBjNP8vTB00RtS4a/F9Sc\nWmpjvIqfwU/HdBmw45AbYbDdC7qiIZiCwXcCqIZk65mM5lIu1FVwiTbnmlfG\nWHk/xUh2hKUtdBg6ydIaOCtqDkdwurnJmPYibKf1sNXPNHUJefm85E2DVphT\npTDGw4lcmE0/KfO/xs0bPSvHkTyxfYYuJ+F/ZuzUNAHCt0VN4GOdTDyp8hTC\nyvo59a3tFWYB6YkgA17k7NM/wVoor/86SOXbneYFCctZVeYAlto0BvMwP/Fv\nYsUKX4uugp/l7RduxmtKEkqMLuxBjjwFev6eS6yKsRnJD5AFFWAJW9Nn4ML+\ngHq2Zn+dvmiWr5Z0cuWXiaIDwD878U7DF5Wyl86lH+k/+Dl2gLo6RF+BjLWl\nyjN7OzIJ9Gv7G+CpMuNT9CAyWUEeOV4vJMviAe3HR1Hxp+XWgbH7eo5XbSnl\ngDN9\r\n=zhdX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFSZtUb2hVzk4Me2jlILYbwTDF4Ccj3z/J1EX6iFYfh/AiBznKTqKdBufqkhGYOVic0r3B2VRsaTJFL1Gz70NS5lAg=="}],"size":8785,"noattachment":false,"key":"/@opentelemetry/plugin-ioredis/-/@opentelemetry/plugin-ioredis-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-ioredis_0.15.0_1617649267647_0.35597406232465434"},"_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":1617649267819,"_cnpm_publish_time":1617649267819,"dist-tags":{"latest":"0.15.0"}}