{"bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"fb25957bdfd97b5357d1e31197434a07a561db5d","tarball":"https://registry.npmjs.org/@opentelemetry/plugin-http/-/plugin-http-0.17.1-alpha.8.tgz","fileCount":18,"integrity":"sha512-RiRF362OrFe7vUua1hfLSa+k/BF/7kk4ETlYEiEjWFnvhiJHlFzuK533Csd8yZFBwrFZrZwo54OLvlVYAiwkqA==","signatures":[{"sig":"MEUCIQCcJ+n75Ugkw59rD+13jXlT6B8Pw2o2SvBfrsfunwgLBQIgV4yeB3WTFBgBZARXUOEFZZ7vqAE4Fv+2yLpqnJ81Xco=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":84303,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPO5HCRA9TVsSAnZWagAArL8P/RFiva2PxTfC3TjY2mMa\nqCtCoV6dwP6GhI1iyrlzS/ESJ6/bAuHr3knm3WnO/1YDB6WGSuJxeIdRSBMZ\nF4OtLrkEb4tQvsm99KkM4uYo6pCKWuywYTgLGg5fFwUFvLRqftM+Qpf5BYv/\nMOGgTl1UH5EFbLBpizulvBQW1t64RS5fVOQoDOtdnLbZ8AOSJ4jHYNv/Yob8\nReIPrRwZ5yNVoel6AR70jerNu1FIuB9iBZc9dtMcsp7ifBKQ4BcEJhrqM386\nelRXO/wexlJpnOISSPcrBoD07l6nLxKbu7veeDgotuAbSeUuHwfqs+lxd8dv\nLdmbzhVuZR14eerl/cLoxoEy0Pmro0bTd81bVYsT9WwmbDIDT2k9/IDfhIuD\n0D4dhYiaPg9E4J5zeO5Tz85aTwY35T1kslFn6/8uKJS51ciY/+RYDA6Byd1i\nqhnMQon3gdKJIl2nbMD1QXXhBFlwyQ0US7QiQlqQ6rMQVjWMZ3VFg4IJMbsN\nuBq6M6bd8YUDCKlB0NWJ95bS+FPJKXzT0HHl1TcSc1gKWwlyd43MjPPOtbgF\nVxAe0alogLstUTcR4MCnILiBeNX7fgxurodmdsfWT14X2biz8Yv82405iAms\ng0tXHzQ3JzWuuCiOzVspeggDSA/FoPvbX3UgH/2/tPJL62dWTYw0b25JMcoy\nL4SE\r\n=wO4a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","name":"@opentelemetry/plugin-http","types":"build/src/index.d.ts","author":{"name":"OpenTelemetry Authors"},"readme":"# OpenTelemetry HTTP 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 [`http`](https://nodejs.org/api/http.html).\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-http\n```\n\n## Usage\n\nOpenTelemetry HTTP 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 (HTTP in this case), specify it in the Node Tracer's configuration.\n\n```js\nconst { NodeTracerProvider } = require('@opentelemetry/node');\n\nconst provider = new NodeTracerProvider({\n  plugins: {\n    http: {\n      enabled: true,\n      // You may use a package name or absolute path to the file.\n      path: '@opentelemetry/plugin-http',\n      // http plugin options\n    }\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\n```js\nconst { NodeTracerProvider } = require('@opentelemetry/node');\n\nconst provider = new NodeTracerProvider();\n```\n\nSee [examples/http](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/http) for a short example.\n\n### Http Plugin Options\n\nHttp plugin has few options available to choose from. You can set the following:\n\n| Options | Type | Description |\n| ------- | ---- | ----------- |\n| [`applyCustomAttributesOnSpan`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-plugin-http/src/types.ts#L52) | `HttpCustomAttributeFunction` | Function for adding custom attributes |\n| [`requestHook`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-plugin-http/src/types.ts#L60) | `HttpRequestCustomAttributeFunction` | Function for adding custom attributes before request is handled |\n| [`responseHook`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-plugin-http/src/types.ts#L67) | `HttpResponseCustomAttributeFunction` | Function for adding custom attributes before response is handled |\n| [`ignoreIncomingPaths`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-plugin-http/src/types.ts#L28) | `IgnoreMatcher[]` | Http plugin will not trace all incoming requests that match paths |\n| [`ignoreOutgoingUrls`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-plugin-http/src/types.ts#L28) | `IgnoreMatcher[]` | Http plugin will not trace all outgoing requests that match urls |\n| [`serverName`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-plugin-http/src/types.ts#L28) | `string` | The primary server name of the matched virtual host. |\n| `requireParentforOutgoingSpans` | Boolean | Require that is a parent span to create new span for outgoing requests. |\n| `requireParentforIncomingSpans` | Boolean | Require that is a parent span to create new span for incoming requests. |\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://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-plugin-http\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-plugin-http\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-plugin-http\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-plugin-http&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/plugin-http\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fplugin-http.svg\n","engines":{"node":">=8.0.0"},"gitHead":"67f7e70a3de005484d3e110b06f6bbee75b6f8a6","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","http","nodejs","tracing","profiling","plugin"],"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","description":"OpenTelemetry http automatic instrumentation package.","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.15.5","dependencies":{"semver":"^7.1.3","shimmer":"^1.2.1","@opentelemetry/api":"^0.18.0","@opentelemetry/core":"^0.17.1-alpha.8+67f7e70a","@opentelemetry/semantic-conventions":"^0.17.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"9.6.0","gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","axios":"0.21.1","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","request":"2.88.2","ts-node":"9.1.1","ts-mocha":"8.0.0","@types/got":"9.6.11","superagent":"6.1.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10","@types/semver":"7.3.4","@types/shimmer":"1.0.1","@types/superagent":"4.1.10","@opentelemetry/node":"^0.17.1-alpha.8+67f7e70a","@opentelemetry/tracing":"^0.17.1-alpha.8+67f7e70a","request-promise-native":"1.0.9","@types/request-promise-native":"1.0.17","@opentelemetry/context-async-hooks":"^0.17.1-alpha.8+67f7e70a"},"_npmOperationalInternal":{"tmp":"tmp/plugin-http_0.17.1-alpha.8_1614605895245_0.010814383306556374","host":"s3://npm-registry-packages"},"_id":"@opentelemetry/plugin-http@0.17.1-alpha.8","version":"0.17.1-alpha.8"}