{"_id":"@opentelemetry/instrumentation-nestjs-core@0.72.0","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"dist":{"shasum":"200458ffd415ce133b730a377990e12fdb09703a","tarball":"http://registry-npm.ywwl.com/@opentelemetry/instrumentation-nestjs-core/download/@opentelemetry/instrumentation-nestjs-core-0.72.0.tgz","fileCount":28,"integrity":"sha512-Ece50NY0mEuLueMNvZXbD4t0T2Ln1I94xLjVCsw4YqV8UHX8iN7Qe6Noy1Pk5qC9X4ajLugTrIRhetl44DHAdQ==","signatures":[{"sig":"MEQCIHHPljIiirXiCOaXpFYZyJDLSWObB+EVMjKBjeF4QHb/AiB515zsxD1aDYgRbs3QvWms8q7SeiiHRIdGrnX0I+nDeg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFuSYHIu6tEI1HcKYrKGuFMk4VYXMY/AV9gmIxWsrpovAiEAkRXiyKPu73tDmFOtcnAjp+1AirrUib0Pt9O1a39eUPw="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2finstrumentation-nestjs-core@0.72.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":59587,"size":13874,"noattachment":false,"key":"/@opentelemetry/instrumentation-nestjs-core/-/@opentelemetry/instrumentation-nestjs-core-0.72.0.tgz"},"main":"./dist/index.cjs","name":"@opentelemetry/instrumentation-nestjs-core","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 --timeout 5000 'test/**/*.test.ts'","clean":"rimraf dist build","compile":"tsdown","compile:watch":"tsc -w","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-nestjs-core"},"version":"0.72.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"73e13527-104c-46b6-bd33-becb8deded3f"}},"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-nestjs-core#readme","keywords":["instrumentation","nestjs","nestjs-core","nodejs","opentelemetry","profiling","tracing"],"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-contrib.git","type":"git","directory":"packages/instrumentation-nestjs-core"},"_npmVersion":"lerna/9.0.7/node@v24.22.2+x64 (linux)","description":"OpenTelemetry instrumentation for NestJS server side applications 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/instrumentation":"^0.301.0","@opentelemetry/semantic-conventions":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rxjs":"7.8.2","rxjs-compat":"6.6.7","@nestjs/core":"11.0.10","@nestjs/common":"11.0.10","reflect-metadata":"0.2.2","@opentelemetry/api":"^1.10.0","@nestjs/platform-express":"11.0.10","@opentelemetry/sdk-trace":"^3.0.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-nestjs-core_0.72.0_1793914552492_0.9213732623371326"},"readme":"# OpenTelemetry NestJS 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 [Nest framework][pkg-web-url] module.\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## Installation\n\n```bash\nnpm install --save @opentelemetry/instrumentation-nestjs-core\n```\n\n### Supported Versions\n\n- [`@nestjs/core`](https://www.npmjs.com/package/@nestjs/core) versions `>=4.0.0 <12`\n\n## Usage\n\nOpenTelemetry Nest Instrumentation allows the user to automatically collect trace data from the controller handlers and export them to the backend of choice.\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 { NestInstrumentation } = require('@opentelemetry/instrumentation-nestjs-core');\n\nconst sdk = new NodeSDK({\n  instrumentations: [\n    new NestInstrumentation(),\n  ],\n});\nsdk.start();\nprocess.once('beforeExit', async () => { await sdk.shutdown(); });\n```\n\n## Emitted Spans\n\n| Name                            | `nestjs.type`     | Description                                                                | Included attributes         |\n|---------------------------------|-------------------|----------------------------------------------------------------------------|-----------------------------|\n| `Create Nest App`               | `app_creation`    | Traces the bootup for the Nest App. The `NestFactory(Static).create` call. | `nestjs.module`             |\n| `<ControllerName>.<memberName>` | `request_context` | Traces the whole request context.                                          | `http.*`, `nestjs.callback` |\n| `<memberName>`                  | `handler`         | Traces the work of a specific controller member function.                  | `nestjs.callback`           |\n\n## Semantic Conventions\n\nThis instrumentation creates spans with attributes from the HTTP and NestJS semantic conventions.\n\nThe `instrumentation-nestjs-core` versions 0.66.0 and later emit the stable v1.23.0+ semantic conventions.\n\nAttributes collected:\n\n| Attribute             | Short Description                                                 |\n|-----------------------|-------------------------------------------------------------------|\n| `component`*          | \"@nestjs/core\"                                                    |\n| `nestjs.version`*     | Version of instrumented `@nestjs/core` package                    |\n| `nestjs.type`*        | See [NestType](./src/enums/NestType.ts)                           |\n| `nestjs.module`       | Nest module class name                                            |\n| `nestjs.controller`   | Nest controller class name                                        |\n| `nestjs.callback`     | The function name of the member in the controller                 |\n| `http.route`          | Route assigned to handler. Ex: `/users/:id`                       |\n| `http.request.method` | HTTP method.                                                      |\n| `url.full`            | Full request URL.                                                 |\n\n\\* included in all of the spans.\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-nestjs-core\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-nestjs-core.svg\n[pkg-web-url]: https://nestjs.com/\n","publish_time":1793914552590,"_cnpm_publish_time":1793914552590,"dist-tags":{"latest":"0.72.0"}}