{"_id":"@opentelemetry/instrumentation-hapi@0.71.0","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"dist":{"shasum":"e31eb9e0c4113c03672e97b9ed779e3d80f97097","tarball":"http://registry-npm.ywwl.com/@opentelemetry/instrumentation-hapi/download/@opentelemetry/instrumentation-hapi-0.71.0.tgz","fileCount":36,"integrity":"sha512-5X0KqxyQ6Zz95In8IrXSfR3W/UpvBgtfI+QWj0OWcoWk5l6gDQQ0Xz+7DZj+H3HeKV7GpTjMvyyS+HVCpbQB/w==","signatures":[{"sig":"MEYCIQC2cD/RCyw8dV3BR7LpgWqqEhMVowIyo3dy0ijOyihwfwIhAJ0n16e8Ka68nQHxHNBk24z6HUJp4OmoYUbb1mIzH4IU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD0pHlJLoRgcILRNgtjtpetyaNrEag/36VtUkX9xylagAIhAKull4yvA6OkDM61lSlalVJ/dCkFLq24LJjqN3OyaKqD"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2finstrumentation-hapi@0.71.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":114869,"size":21965,"noattachment":false,"key":"/@opentelemetry/instrumentation-hapi/-/@opentelemetry/instrumentation-hapi-0.71.0.tgz"},"main":"./dist/index.cjs","name":"@opentelemetry/instrumentation-hapi","types":"./dist/index.d.cts","author":{"name":"OpenTelemetry Authors"},"engines":{"node":">=22.15.0"},"exports":{".":{"default":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"fc3b13eb41e9512fb0d769b431583f90b5ef8326","license":"Apache-2.0","scripts":{"tdd":"npm test -- --watch --watch-files \"**/*.ts\"","test":"nyc --no-clean mocha 'test/**/*.test.ts'","clean":"rimraf dist build","compile":"tsdown","lint:readme":"node ../../scripts/lint-readme.js","prepublishOnly":"npm run compile","version:update":"node ../../scripts/version-update.js","test-all-versions":"tav","compile:with-dependencies":"nx run-many -t compile -p @opentelemetry/instrumentation-hapi"},"version":"0.71.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"dc473fb2-cd50-4689-81c6-74584f562a54"}},"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-hapi#readme","keywords":["hapi","instrumentation","nodejs","opentelemetry","profiling","tracing"],"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-contrib.git","type":"git","directory":"packages/instrumentation-hapi"},"_npmVersion":"lerna/9.0.7/node@v24.22.2+x64 (linux)","description":"OpenTelemetry instrumentation for `@hapi/hapi` http web application framework","directories":{},"maintainers":[{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"overbalance","email":"overbalancedev@proton.me"},{"name":"npmjs-account","email":"npmjs-account@opentelemetry.io"},{"name":"trentm","email":"trentm@gmail.com"},{"name":"martinkuba","email":"martin@martinkuba.com"}],"_nodeVersion":"24.22.2","dependencies":{"@opentelemetry/core":"^3.0.0","@opentelemetry/instrumentation":"^0.301.0","@opentelemetry/semantic-conventions":"^1.27.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"joi":"17.12.2","@hapi/hapi":"21.3.12","@opentelemetry/api":"^1.10.0","@opentelemetry/sdk-trace":"^3.0.0","@opentelemetry/contrib-test-utils":"^0.72.0","@opentelemetry/context-async-hooks":"^3.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.10.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/instrumentation-hapi_0.71.0_1793914587245_0.2542564613210011"},"readme":"# OpenTelemetry Hapi Instrumentation for Node.js\n\n[![NPM Published Version][npm-img]][npm-url]\n[![Apache License][license-image]][license-image]\n\nThis module provides automatic instrumentation for the [Hapi Framework](https://hapi.dev)(`@hapi/hapi`)package.\n\nIf total installation size is not constrained, it is recommended to use the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle with [@opentelemetry/sdk-node](https://www.npmjs.com/package/@opentelemetry/sdk-node) for the most seamless instrumentation experience.\n\nCompatible with OpenTelemetry JS API and SDK `1.0+`.\n\n## Status\n\n| Maturity                                           | [Component Owner](../../.github/component_owners.yml) | Compatibility         |\n|----------------------------------------------------|-------------------------------------------------------|-----------------------|\n| [Unmaintained](../../CONTRIBUTING.md#unmaintained) | N/A                                                   | API 1.0+<br/>SDK 1.0+ |\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/instrumentation-hapi\n```\n\n### Supported Versions\n\n- [`@hapi/hapi`](https://www.npmjs.com/package/@hapi/hapi) versions `>=17.0.0 <22`\n\n## Usage\n\nOpenTelemetry Hapi 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 enable a specific instrumentation, pass it to `registerInstrumentations()`.\nThis is commonly done via `NodeSDK` for fully setting up all OpenTelemetry SDK components:\n\n```js\nconst { NodeSDK } = require('@opentelemetry/sdk-node');\nconst { HapiInstrumentation } = require('@opentelemetry/instrumentation-hapi');\n\nconst sdk = new NodeSDK({\n  instrumentations: [\n    new HapiInstrumentation(),\n  ],\n});\nsdk.start();\nprocess.once('beforeExit', async () => { await sdk.shutdown(); });\n```\n\n<!--\nThe dev dependency of `@hapi/podium@4.1.1` is required to force the compatible type declarations. See: https://github.com/hapijs/hapi/issues/4240\n-->\n\n## Hapi Instrumentation Support\n\nThis package provides automatic tracing for hapi server routes and [request lifecycle](https://github.com/hapijs/hapi/blob/master/API.md#request-lifecycle) extensions defined either directly or via a Hapi plugin.\n\n## Semantic Conventions\n\nThis instrumentation creates spans that include HTTP-related data as span attributes.\n\nThe `instrumentation-hapi` versions 0.66.0 and later emit the stable v1.23.0+ semantic conventions.\n\n### Attributes collected\n\nThe following semconv attributes are collected on hapi route spans:\n\n| v1.23.0 semconv       | Notes                                       |\n|-----------------------|---------------------------------------------|\n| `http.request.method` | HTTP request method                         |\n| `http.route`          | Route assigned to handler. Ex: `/users/:id` |\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-contrib/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-hapi\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-hapi.svg\n","publish_time":1793914587327,"_cnpm_publish_time":1793914587327,"dist-tags":{"latest":"0.71.0"}}