{"_id":"@ciphercross-private/nestjs-datadog","name":"@ciphercross-private/nestjs-datadog","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@ciphercross-private/nestjs-datadog","version":"1.0.0","description":"NestJS module for Datadog tracing, logging and monitoring","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.build.json","dev":"tsc -w -p tsconfig.build.json","test":"jest","test:watch":"jest --watch","test:cov":"jest --coverage","lint":"eslint \"src/**/*.ts\"","lint:fix":"eslint \"src/**/*.ts\" --fix","prepublishOnly":"npm run build && npm test"},"exports":{".":{"require":"./dist/index.js","types":"./dist/index.d.ts"},"./monitoring":{"require":"./dist/controllers/monitoring.controller.js","types":"./dist/controllers/monitoring.controller.d.ts"}},"peerDependenciesMeta":{"@nestjs/swagger":{"optional":true}},"keywords":["nestjs","datadog","dd-trace","logging","monitoring","tracing","apm","observability"],"author":{"name":"CipherCross"},"license":"MIT","peerDependencies":{"@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/config":"^3.0.0 || ^4.0.0","@nestjs/swagger":"^7.3.1 || ^11.0.0","rxjs":"^7.8.0"},"dependencies":{"dd-trace":"^3.58.0","winston":"^3.11.0"},"devDependencies":{"@nestjs/common":"^11.1.6","@nestjs/config":"^4.0.2","@nestjs/core":"^11.1.6","@nestjs/swagger":"^11.2.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","eslint":"^8.0.0","jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.0.0"},"engines":{"node":">=18.0.0"},"publishConfig":{"access":"restricted"},"repository":{"type":"git","url":"git+https://github.com/CipherCross/datadog-module.git"},"bugs":{"url":"https://github.com/CipherCross/datadog-module/issues"},"homepage":"https://github.com/CipherCross/datadog-module#readme","typesVersions":{"*":{"*":["dist/index.d.ts"]}},"sideEffects":false,"_id":"@ciphercross-private/nestjs-datadog@1.0.0","gitHead":"7de5b760429cc38c2ce13ab6e804b5c9c52df458","_nodeVersion":"22.0.0","_npmVersion":"10.5.1","dist":{"integrity":"sha512-ipIpkt/ExPICX6nditOmaFippu7QfBU+Jv/SW/BYVdfOAYZho8dRIXq7Pb5/AN8I6abLOaD21ldlw9idPc/Ldg==","shasum":"d57e5c2bfa685ffe6edd9cbac4ba50330032371b","tarball":"https://registry.npmjs.org/@ciphercross-private/nestjs-datadog/-/nestjs-datadog-1.0.0.tgz","fileCount":78,"unpackedSize":164675,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAbNAU0+1SnFf1uSfBTFNkApJeoIYJ+Mxu7TcMPZbvDEAiEAyZJI/e7+e/Ynq3c0WjDROWvMUDhl9uNR+tt626OfNfM="}]},"_npmUser":{"name":"viktoriia.scherba","email":"viktoriia.scherba@ciphercross.com"},"directories":{},"maintainers":[{"name":"mykyta-ciphercross","email":"mykyta.shevchenko@ciphercross.com"},{"name":"viktoriia.scherba","email":"viktoriia.scherba@ciphercross.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nestjs-datadog_1.0.0_1756385975833_0.15936805006125354"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-28T12:59:35.433Z","1.0.0":"2025-08-28T12:59:36.023Z","modified":"2025-08-28T12:59:36.988Z"},"maintainers":[{"name":"mykyta-ciphercross","email":"mykyta.shevchenko@ciphercross.com"},{"name":"viktoriia.scherba","email":"viktoriia.scherba@ciphercross.com"}],"description":"NestJS module for Datadog tracing, logging and monitoring","homepage":"https://github.com/CipherCross/datadog-module#readme","keywords":["nestjs","datadog","dd-trace","logging","monitoring","tracing","apm","observability"],"repository":{"type":"git","url":"git+https://github.com/CipherCross/datadog-module.git"},"author":{"name":"CipherCross"},"bugs":{"url":"https://github.com/CipherCross/datadog-module/issues"},"license":"MIT","readme":"# @ciphercross/nestjs-datadog\n\nNestJS module for Datadog logging, tracing, and monitoring.  \nProvides structured logging, distributed tracing, health checks, and metrics collection out of the box.\n\n## ✨ Features\n\n- 🚀 Structured JSON logging (Winston)\n- 🔍 Distributed tracing (Datadog APM)\n- 📊 Health checks & Kubernetes probes\n- 📈 Metrics collection\n- 🎯 Easy-to-use decorators for tracing & logging\n- 📝 Optional Swagger support for monitoring endpoints\n\n## 📦 Installation\n\n```bash\nnpm install @ciphercross/nestjs-datadog\n```\n\n## 🚀 Quick Start\n\n### 1. Import the Module\n\n```ts\nimport { Module } from \"@nestjs/common\";\nimport { DatadogModule } from \"@ciphercross/nestjs-datadog\";\n\n@Module({\n  imports: [DatadogModule.register({ serviceName: \"my-app\" })],\n})\nexport class AppModule {}\n```\n\n### 2. Use the Services\n\n```ts\nimport { Injectable } from \"@nestjs/common\";\nimport {\n  DatadogLoggerService,\n  DatadogTracingService,\n} from \"@ciphercross/nestjs-datadog\";\n\n@Injectable()\nexport class UserService {\n  constructor(\n    private readonly logger: DatadogLoggerService,\n    private readonly tracing: DatadogTracingService\n  ) {}\n\n  async createUser(user: any) {\n    this.logger.log(\"User created\", \"USER_SERVICE\");\n    return this.tracing.trace(\"user.create\", async () => user);\n  }\n}\n```\n\n### 3. (Optional) Monitoring Endpoints\n\nIf you need `/monitoring/health` and `/monitoring/metrics`, import:\n\n```ts\nimport { DatadogMonitoringController } from \"@ciphercross/nestjs-datadog/monitoring\";\n```\n\n## ⚙️ Configuration (env variables)\n\n| Variable                     | Description                                | Default          | Required? |\n| ---------------------------- | ------------------------------------------ | ---------------- | --------- |\n| `DD_API_KEY`                 | Datadog **API key**                        | —                | **Yes**\\* |\n| `DD_SERVICE`                 | Service name                               | `nestjs-app`     | No        |\n| `DD_VERSION`                 | Service version                            | `1.0.0`          | No        |\n| `DD_ENV`                     | Environment                                | `development`    | No        |\n| `DD_TRACE_ENABLED`           | Enable APM tracing                         | `false`          | No        |\n| `DD_PROFILING_ENABLED`       | Enable profiling                           | `false`          | No        |\n| `DD_LOGS_ENABLED`            | Enable library logging outputs             | `false`          | No        |\n| `DD_LOG_LEVEL`               | Library logger level                       | `info`           | No        |\n| `DD_METRICS_ENABLED`         | Enable metrics (if you wire a collector)   | `false`          | No        |\n| `DD_SITE`                    | Datadog site realm                         | `datadoghq.com`  | No        |\n| `DD_APP_KEY`                 | Datadog **App key** (for REST API calls)   | — (fallback API) | No        |\n| `DD_LOG_INJECTION`           | Inject trace/span IDs into logs            | `true`           | No        |\n| `DD_RUNTIME_METRICS_ENABLED` | Collect runtime metrics from tracer        | `true`           | No        |\n| `DD_ENABLE_DISK_MONITORING`  | Enable disk health checks (monitoring svc) | `false`          | No        |\n| `DD_DISK_PATH`               | Disk path to monitor                       | `/`              | No        |\n| `DD_DISK_THRESHOLD`          | Disk usage threshold (%)                   | `90`             | No        |\n\n## 📚 Advanced Usage\n\nSee [docs/advanced.md](./docs/advanced.md) for:\n\n- Logging examples\n- Tracing examples\n- Health & metrics\n- Decorators (`@Trace`, `@Log`)\n- Interceptors\n\n## 🐳 Docker\n\nExample Datadog Agent setup in [docs/docker.md](./docs/docker.md).\n","readmeFilename":"README.md","_rev":"1-5c54cbee94422f48b0aa7ce3685e17ef"}