{"name":"@opentelemetry/instrumentation-nestjs-core","version":"0.64.0","keywords":["instrumentation","nestjs","nestjs-core","nodejs","opentelemetry","profiling","tracing"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/instrumentation-nestjs-core@0.64.0","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"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-nestjs-core#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"dist":{"shasum":"a57387dbaaa2f122caf39a43fc4e57b71595a400","tarball":"http://registry-npm.ywwl.com/@opentelemetry/instrumentation-nestjs-core/download/@opentelemetry/instrumentation-nestjs-core-0.64.0.tgz","fileCount":24,"integrity":"sha512-PW1ArxryMwF8/IXq1nzlQs7tmr/fWd1tf71AHevZT3Fm0hW7jRX9JEfYgIAcKDvmbqcJEr5K1224NEimrRPbuQ==","signatures":[{"sig":"MEQCIEhjqkKdK6jVzM23FMujt1Umj6FuAXrJo8iRA22vU/NnAiAkTDYzt9M55i4ehh+KCDN+Lbs5v+LVCYDV5TMIL2E3+Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2finstrumentation-nestjs-core@0.64.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":52640,"size":13855,"noattachment":false,"key":"/@opentelemetry/instrumentation-nestjs-core/-/@opentelemetry/instrumentation-nestjs-core-0.64.0.tgz"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":"^18.19.0 || >=20.6.0"},"gitHead":"15ef7506553f631ea4181391e0c5725a56f0d082","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","test":"npm run test-required-node-version && nyc --no-clean mocha --timeout 5000 'test/**/*.test.ts' || echo 'Node version is not supported for testing'","clean":"rimraf build/*","compile":"tsc -p .","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","test-required-node-version":"node -e \"process.exit(parseInt(process.versions.node.split('.')[0], 10) >= 15 ? 0 : 1)\""},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:73e13527-104c-46b6-bd33-becb8deded3f"}},"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.14.1+x64 (linux)","description":"OpenTelemetry instrumentation for NestJS server side applications framework","directories":{},"_nodeVersion":"24.14.1","dependencies":{"@opentelemetry/instrumentation":"^0.218.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.3.0","@nestjs/platform-express":"11.0.10","@opentelemetry/sdk-trace-base":"^2.0.0","@opentelemetry/sdk-trace-node":"^2.0.0","@opentelemetry/context-async-hooks":"^2.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/instrumentation-nestjs-core_0.64.0_1778668264902_0.8814187295859865","host":"s3://npm-registry-packages-npm-production"},"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":1778668265027,"_cnpm_publish_time":1778668265027,"dist-tags":{"latest":"0.72.0"}}