{"bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"dfdd47294db429afa0d3fcdf5a2da91cff3e6eae","tarball":"https://registry.npmjs.org/@opentelemetry/node/-/node-0.22.1-alpha.16.tgz","fileCount":15,"integrity":"sha512-DjmyC4RVE6IjXi2M1VWFowZgPyZxCBiLyJGjbIhwJ2/gTk30RshO7BTD3OJfRTbhIVAhznP080guzyNpEDfbhg==","signatures":[{"sig":"MEUCIQCjKjhkM+947+28RJD5CSSrScCQE5odjlWo4uLc8uf21gIgTdbbg1obgzBi0pjBs4GDNlRgth7LwpU2MSz4leRUep4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3Mq1CRA9TVsSAnZWagAARfIP/ijRGhkXI5kAX2zXRuGu\nYvhxtQATdMr1taCcHUvtVkyciWkOxmWD8KAzWL7TgUCH0uGGvIyPU3XHQyDH\nF8oSHTdgyVDzyRd179HznD2JGO/cKQ/YNpZRbp8Pe5Y36tvBkDsfM2qt/kQK\nIVElh4WzlN3iWLauvmZgbpMKg3A7yTf347erYQI0nSPEURhT+khQSD2FeFrF\nPra/iQx63PzZCqDWtjbXx43r3kWG8OQjKclZEBn5mhHnAIhA1sIm/eckDCZK\nEiYGcgcflzoVta4iNO+9MiZ+HvlwYTB/ndQ+VWq12DiPHtJ+UDxvl1Xn3EKl\nbvtuz6qgyXCWqa/FvyQ8qs0zIv0wBkPH+JVsiOK9jNTgNKj1mEJSvqujFly3\nrQskwI0p/iXnPI0s3M34UC5twmkOUFm4/qPDOQwSJjDTvK21yhcNF2dMo+cc\nUCtmaR+sbZlvm2LiZ0V7UjmVamTNtCZYYxeC8cG7l8d8yrvYpUeVIJS8tSoR\nvDff3JO19IRQJmuQlETH/tzbsYj7Jk1xHQj3EI/A1rMTILf5AJLWGTIiTpCO\nPqOrNO6ZeAcuqGbZjKpNmHRZtOUI8paJEyyeePwob2nYzjQ6Y7vStNOMW5nm\nccw/u72l4SKZoaOw2sfIsnebHwz9DU+XNL3sS5GjvHdfOGcTcuQrBsOsoEpT\nAMlK\r\n=05Zh\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[![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/main/packages/opentelemetry-tracing) package.\n\n## How auto instrumentation works\n\nThis package exposes a `NodeTracerProvider`.\nFor loading instrumentations please use `registerInstrumentations` function from [opentelemetry-instrumentation](https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-instrumentation)\n\nOpenTelemetry comes with a growing number of instrumentation plugins for well known modules (see [supported modules](https://github.com/open-telemetry/opentelemetry-js#instrumentations)) and an API to create custom instrumentation (see [the instrumentation developer guide](https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/instrumentation-guide.md)).\n\n> **Please note:** This module does *not* bundle any plugins. They need to be installed separately.\n\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/main/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\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/main/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/instrumentation-http\n# and for example one additional\nnpm install --save instrumentation-graphql\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```javascript\nconst { registerInstrumentations } = require('@opentelemetry/instrumentation');\nconst { NodeTracerProvider } = require('@opentelemetry/node');\n\n// Create and configure NodeTracerProvider\nconst provider = new NodeTracerProvider();\n\n// Initialize the provider\nprovider.register();\n\n// register and load instrumentation and old plugins - old plugins will be loaded automatically as previously\n// but instrumentations needs to be added\nregisterInstrumentations({\n});\n\n// Your application code - http will automatically be instrumented if\n// @opentelemetry/plugin-http is present\nconst http = require('http');\n```\n\n## Instrumentation configuration\n\nIn the following example:\n\n- the express instrumentation is enabled\n- the http instrumentation has a custom config for a `requestHook`\n\n```javascript\nconst { registerInstrumentations } = require('@opentelemetry/instrumentation');\nconst { HttpInstrumentation } = require('@opentelemetry/instrumentation-http');\nconst { ExpressInstrumentation } = require('@opentelemetry/instrumentation-express');\n\nconst provider = new NodeTracerProvider();\nprovider.register();\n\n// register and load instrumentation and old plugins - old plugins will be loaded automatically as previously\n// but instrumentations needs to be added\nregisterInstrumentations({\n  instrumentations: [\n    new ExpressInstrumentation(),\n    new HttpInstrumentation({\n        requestHook: (span, request) => {\n          span.setAttribute(\"custom request hook attribute\", \"request\");\n        },\n    }),\n  ],\n});\n\n\n```\n\n## Examples\n\nSee how to automatically instrument [http](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/http) and [gRPC](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/grpc) / [grpc-js](https://github.com/open-telemetry/opentelemetry-js/tree/main/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 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.svg?path=packages%2Fopentelemetry-node\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-node\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-node&type=dev\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":"5af147b159c9dfad8d00a20a3b140d55736f1919","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":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_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.17.1+x64 (linux)","description":"OpenTelemetry Node SDK provides automatic telemetry (tracing, metrics, etc) for Node.js applications","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"}],"_nodeVersion":"14.17.1","dependencies":{"semver":"^7.1.3","@opentelemetry/core":"^0.22.1-alpha.16+5af147b1","@opentelemetry/tracing":"^0.22.1-alpha.16+5af147b1","@opentelemetry/propagator-b3":"^0.22.1-alpha.16+5af147b1","@opentelemetry/propagator-jaeger":"^0.22.1-alpha.16+5af147b1","@opentelemetry/context-async-hooks":"^0.22.1-alpha.16+5af147b1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","shimmer":"1.2.1","ts-node":"10.0.0","ts-mocha":"8.0.0","typescript":"4.3.4","@types/node":"14.17.4","@types/mocha":"8.2.2","@types/sinon":"10.0.2","@types/semver":"7.3.6","@types/shimmer":"1.0.1","@opentelemetry/api":"^1.0.1","@opentelemetry/resources":"^0.22.1-alpha.16+5af147b1","@opentelemetry/semantic-conventions":"^0.22.1-alpha.16+5af147b1"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/node_0.22.1-alpha.16_1625082548886_0.7441635937558702","host":"s3://npm-registry-packages"},"_id":"@opentelemetry/node@0.22.1-alpha.16","version":"0.22.1-alpha.16"}