{"bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"aee1d78721017a5bc57f52229e5290f8c47427ec","tarball":"https://registry.npmjs.org/@opentelemetry/node/-/node-0.10.3-alpha.34.tgz","fileCount":21,"integrity":"sha512-p2966JPR7FP97Jjl215GGtIz/tu1y5LTj1uLJn2gnbojH6sNvRjSPv/uPpbApismH0RFWm7bVl0Xa8X8IZ4MOw==","signatures":[{"sig":"MEYCIQCCae0wZFuivVWln6Nv3ibbJPKlzcBon0x6fshnsVGO8AIhAIL3ZzR9I19Cyr7/Fz5E7woX+Q8mYepoeFvLHaEG9xM1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50297,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQ+6ECRA9TVsSAnZWagAAJSoP/2pFvS0o0sXrpOfAqxRW\nd//Y8A1oG+nHfBVbiDbXfh9mkk8NtZ3Rkcu/b8623uXY9ovXNedbHJLongBu\nDJmoXhUZA/T4eNNWJTS5G8aVrgkzJpyTOIntceJCI/Ep11gT4OxjYAIlQ3DS\n9B5VjwKCUV07AGEsTSBI+JBdBg4L1kcT3L+yXnViyZK8yssnPQhJiH6chWMF\nTB0LqQwVGlzsIrWrL0jF/pdhyOEreCms+F6L2qnRFBpvj9jEkKzUwPbnUcag\nnOsRT2L/B9/kbPD+XDRpwLGbhZxuCfQnqvMEQZAdBi5T4rcOAxDFd/Fo3YXP\nNe3wJ1qKc39rZgq2MyRDCR4L7A2x6STmA+u8ZrnW1cr0gecKaQdYBLWoPnFD\nEu5JiM5yi509Q586AqQ7nfbsEnWX2h1mAnX6cFCe7oMIQChSzIEKClbTxvB/\nlwDQS1wXMMjykG1XS+YU1hgkAN7SxBgw6n3i0To4o/YFZs2DTSVy3q37/DuK\nAfF/Q50oowmnhrbzLtZ87BvtDdhr3FNPPD8+ihU73vSnOK/UYCs+Mlb1AZtY\nWJWiH/6EVpWGL1DagDZyJc/YOUIgojTe7c0e6FdDsJh/3zLVJfSQN5apPVa1\ntok/90/c1r2n5xMe+AMAW23kwyx+8clhD0WG4opCt1JwrXecOQlUrKEDSFSI\nQpSa\r\n=Pv7M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","name":"@opentelemetry/node","types":"build/src/index.d.ts","author":{"name":"OpenTelemetry Authors"},"readme":"# OpenTelemetry Node SDK\n\n[![Gitter chat][gitter-image]][gitter-url]\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 *automated instrumentation and tracing* for Node.js applications.\n\nFor manual instrumentation see the\n[@opentelemetry/tracing](https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing) package.\n\n## How auto instrumentation works\n\nThis package exposes a `NodeTracerProvider` that will automatically hook into the module loader of Node.js.\n\nFor this to work, please make sure that `NodeTracerProvider` is initialized before any other module of your application, (like `http` or `express`) is loaded.\n\nOpenTelemetry comes with a growing number of instrumentation plugins for well know modules (see [supported modules](https://github.com/open-telemetry/opentelemetry-js#plugins)) and an API to create custom plugins (see [the plugin developer guide](https://github.com/open-telemetry/opentelemetry-js/blob/master/doc/plugin-guide.md)).\n\nWhenever a module is loaded `NodeTracerProvider` will check if a matching instrumentation plugin has been installed.\n\n> **Please note:** This module does *not* bundle any plugins. They need to be installed separately.\n\nIf the respective plugin was found, it will be used to patch the original module to add instrumentation code.\nThis is done by wrapping all tracing-relevant functions.\n\nThis instrumentation code will automatically\n\n- extract a trace-context identifier from inbound requests to allow distributed tracing (if applicable)\n- make sure that this current trace-context is propagated while the transaction traverses an application (see [@opentelemetry/context-base](https://github.com/open-telemetry/opentelemetry-js/blob/master/packages/opentelemetry-context-base/README.md) for an in-depth explanation)\n- add this trace-context identifier to outbound requests to allow continuing the distributed trace on the next hop (if applicable)\n- create and end spans\n\nIn short, this means that this module will use provided plugins to automatically instrument your application to produce spans and provide end-to-end tracing by just adding a few lines of code.\n\n## Creating custom spans on top of auto-instrumentation\n\nAdditionally to automated instrumentation, `NodeTracerProvider` exposes the same API as [@opentelemetry/tracing](https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing), allowing creating custom spans if needed.\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/api\nnpm install --save @opentelemetry/node\n\n# Install instrumentation plugins\nnpm install --save @opentelemetry/plugin-http\nnpm install --save @opentelemetry/plugin-https\n```\n\n## Usage\n\nThe following code will configure the `NodeTracerProvider` to instrument `http`\n(and any other installed [supported\nmodules](https://github.com/open-telemetry/opentelemetry-js#plugins))\nusing `@opentelemetry/plugin-http`.\n\n```js\nconst { NodeTracerProvider } = require('@opentelemetry/node');\n\n// Create and configure NodeTracerProvider\nconst provider = new NodeTracerProvider();\n\n// Initialize the provider\nprovider.register()\n\n// Your application code - http will automatically be instrumented if\n// @opentelemetry/plugin-http is present\nconst http = require('http');\n```\n\n## Plugin configuration\n\nUser supplied plugin configuration is merged with the default plugin\nconfiguration. Furthermore, custom plugins that are configured are implicitly\nenabled just as default plugins are.\n\nIn the following example:\n\n- the default express plugin is disabled\n- the http plugin has a custom config for a `requestHook`\n- the customPlugin is loaded from the user supplied path\n- all default plugins are still loaded if installed.\n\n```js\nconst provider = new NodeTracerProvider({\n  plugins: {\n    express: {\n      enabled: false,\n    },\n    http: {\n      requestHook: (span, request) => {\n        span.setAttribute(\"custom request hook attribute\", \"request\");\n      },\n    },\n    customPlugin: {\n      path: \"/path/to/custom/module\",\n    },\n  },\n});\n```\n\n### Disable Plugins with Environment Variables\n\nPlugins can be disabled without modifying and redeploying code.\n`OTEL_NO_PATCH_MODULES` accepts a\ncomma separated list of module names to disabled specific plugins.\nThe names should match what you use to `require` the module into your application.\nFor example, `OTEL_NO_PATCH_MODULES=pg,https` will disable the postgres plugin and the https plugin. To disable **all** plugins, set the environment variable to `*`.\n\n## Examples\n\nSee how to automatically instrument [http](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/http) and [gRPC](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/grpc) / [grpc-js](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/grpc-js) using node-sdk.\n\n## Useful links\n\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 on [gitter][gitter-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg\n[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-node\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-node\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-node\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-node&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/node\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fnode.svg\n","engines":{"node":">=8.0.0"},"gitHead":"fb06b5bb1142286acf5b326925f3af3353aa9d90","license":"Apache-2.0","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"deprecated":"Package renamed to @opentelemetry/sdk-trace-node","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (linux)","description":"OpenTelemetry Node SDK provides automatic telemetry (tracing, metrics, etc) for Node.js applications","directories":{},"maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.10.3-alpha.34+fb06b5b","@opentelemetry/core":"^0.10.3-alpha.34+fb06b5b","require-in-the-middle":"^5.0.0","@opentelemetry/tracing":"^0.10.3-alpha.34+fb06b5b","@opentelemetry/context-async-hooks":"^0.10.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","mocha":"7.2.0","rimraf":"3.0.2","codecov":"3.7.2","shimmer":"1.2.1","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/semver":"7.3.2","@types/shimmer":"1.0.1","@opentelemetry/resources":"^0.10.3-alpha.34+fb06b5b","@opentelemetry/context-base":"^0.10.2"},"_npmOperationalInternal":{"tmp":"tmp/node_0.10.3-alpha.34_1598287491951_0.2908354069832164","host":"s3://npm-registry-packages"},"_id":"@opentelemetry/node@0.10.3-alpha.34","version":"0.10.3-alpha.34"}