{"_id":"@allstak/nestjs","_rev":"8-954ea8d3ebfa32ebb40c59817e3545bb","name":"@allstak/nestjs","dist-tags":{"beta":"0.2.0","latest":"0.2.2"},"versions":{"0.1.0-beta.1":{"name":"@allstak/nestjs","version":"0.1.0-beta.1","license":"MIT","_id":"@allstak/nestjs@0.1.0-beta.1","maintainers":[{"name":"allstak-","email":"hello@allstak.sa"}],"homepage":"https://allstak.sa","bugs":{"url":"https://github.com/allstak-io/allstak-nestjs/issues"},"dist":{"shasum":"1a732c3f3ac2a7b6e274c08a3cc196ee315fdcc2","tarball":"https://registry.npmjs.org/@allstak/nestjs/-/nestjs-0.1.0-beta.1.tgz","fileCount":9,"integrity":"sha512-why0hI0ltlHrF08H7+/GR/dJ8srmEBMxb73IFOMxKFIpm6RrwdxmdmwFXc2XLC8/h/pVQjdfQdt2hwXQF/nFXw==","signatures":[{"sig":"MEYCIQD/vtLbOUupEdaCtuBNIF4q4NMU4A2fUzKX8/hTAurPZAIhAJN7rChHt9CgXhzUzzVX2PS7oP18Shy0D02oMF9ivotE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60851},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"95a1cd2e84eaff9eff17c7e3e1958b4e976b2fcf","scripts":{"test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts --sourcemap","pack:dry":"npm pack --dry-run"},"_npmUser":{"name":"allstak-","email":"hello@allstak.sa"},"repository":{"url":"git+https://github.com/allstak-io/allstak-nestjs.git","type":"git"},"_npmVersion":"10.9.3","description":"Internal experimental AllStak NestJS SDK preview. Runtime work exists, but public Stable certification and wizard automation are not complete.","directories":{},"_nodeVersion":"22.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rxjs":"^7.8.2","tsup":"^8.0.0","vitest":"^1.6.1","express":"^5.2.1","typescript":"^5.3.0","@nestjs/core":"^11.1.19","@nestjs/common":"^11.1.19","@types/express":"^5.0.6","@nestjs/testing":"^11.1.19","reflect-metadata":"^0.2.2","@nestjs/platform-express":"^11.1.19"},"peerDependencies":{"@nestjs/core":">=9.0.0","@nestjs/common":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs_0.1.0-beta.1_1778477491212_0.892864337165423","host":"s3://npm-registry-packages-npm-production"}},"0.1.0-beta.3":{"name":"@allstak/nestjs","version":"0.1.0-beta.3","license":"MIT","_id":"@allstak/nestjs@0.1.0-beta.3","maintainers":[{"name":"allstak-","email":"hello@allstak.sa"}],"homepage":"https://allstak.sa","bugs":{"url":"https://github.com/allstak-io/allstak-nestjs/issues"},"dist":{"shasum":"c23ed7d92abc8ec6e2c196e837a21e2b56e7b350","tarball":"https://registry.npmjs.org/@allstak/nestjs/-/nestjs-0.1.0-beta.3.tgz","fileCount":10,"integrity":"sha512-vkfxSzaGFR9X5V0SwE38jN++3PPUtqwB03E6RuGNteINVbgT18wDpye+u3Nu3XPL5LSvQCHGjPW3nqd38jN2bg==","signatures":[{"sig":"MEUCIQD4SJQZluXdQSVlxdsX7qmbw65gdBBoiVHS7KZupEaXxQIgYiSG/hsEZjaFiBzfT2P8sxxvKM+hYMDwy/IUKALPvbQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":104000},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"1f91eca5f46e9fcda749c3b80bb9b747f7311f32","scripts":{"test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts --sourcemap","pack:dry":"npm pack --dry-run"},"_npmUser":{"name":"allstak-","email":"hello@allstak.sa"},"repository":{"url":"git+https://github.com/allstak-io/allstak-nestjs.git","type":"git"},"_npmVersion":"10.9.3","description":"AllStak SDK for NestJS (beta). Global interceptor + exception filter with redaction, beforeSend, and forRootAsync for ConfigService.","directories":{},"_nodeVersion":"22.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rxjs":"^7.8.2","tsup":"^8.0.0","vitest":"^1.6.1","express":"^5.2.1","typescript":"^5.3.0","@nestjs/core":"^11.1.19","@nestjs/common":"^11.1.19","@types/express":"^5.0.6","@nestjs/testing":"^11.1.19","reflect-metadata":"^0.2.2","@nestjs/platform-express":"^11.1.19"},"peerDependencies":{"@nestjs/core":">=9.0.0","@nestjs/common":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs_0.1.0-beta.3_1779125467910_0.16137878669186323","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@allstak/nestjs","version":"0.1.0","license":"MIT","_id":"@allstak/nestjs@0.1.0","maintainers":[{"name":"allstak-","email":"hello@allstak.sa"}],"homepage":"https://allstak.sa","bugs":{"url":"https://github.com/AllStak/allstak-nestjs/issues"},"dist":{"shasum":"98c9d30d29ecd8a74af26465b6fc3fb907b4c9a7","tarball":"https://registry.npmjs.org/@allstak/nestjs/-/nestjs-0.1.0.tgz","fileCount":10,"integrity":"sha512-x9pB+CL5v/LOv8jbHiFDlG6UBSHEe5jcE1S0CnXovW+7V1BuOKLF7pmNMk2SBWho4XZCN2HmrS1jDZ9Cc1ny8g==","signatures":[{"sig":"MEYCIQCM44jgE8TfT3p4QTXtIV4aGdfACEwsKVMIFdPacLVdZgIhAPoPs9qObHOTD/G1cHP3wy2kJBFLty1ZmIxbN78tlmnr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@allstak%2fnestjs@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":560964},"main":"./dist/index.js","_from":"file:/home/runner/work/allstak-nestjs/allstak-nestjs/pack/allstak-nestjs-0.1.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts --sourcemap","pack:dry":"npm pack --dry-run"},"_npmUser":{"name":"allstak-","email":"hello@allstak.sa"},"_resolved":"/home/runner/work/allstak-nestjs/allstak-nestjs/pack/allstak-nestjs-0.1.0.tgz","_integrity":"sha512-x9pB+CL5v/LOv8jbHiFDlG6UBSHEe5jcE1S0CnXovW+7V1BuOKLF7pmNMk2SBWho4XZCN2HmrS1jDZ9Cc1ny8g==","repository":{"url":"git+https://github.com/AllStak/allstak-nestjs.git","type":"git"},"_npmVersion":"10.8.2","description":"AllStak SDK for NestJS (beta). Global interceptor + exception filter with redaction, beforeSend, and forRootAsync for ConfigService.","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rxjs":"^7.8.2","tsup":"^8.0.0","vitest":"^1.6.1","express":"^5.2.1","typescript":"^5.3.0","@nestjs/core":"^11.1.19","@nestjs/common":"^11.1.19","@types/express":"^5.0.6","@nestjs/testing":"^11.1.19","reflect-metadata":"^0.2.2","@nestjs/platform-express":"^11.1.19"},"peerDependencies":{"@nestjs/core":">=9.0.0","@nestjs/common":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs_0.1.0_1780080658289_0.5388493463859778","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@allstak/nestjs","version":"0.2.0","license":"MIT","_id":"@allstak/nestjs@0.2.0","maintainers":[{"name":"allstak-","email":"hello@allstak.sa"}],"homepage":"https://allstak.sa","bugs":{"url":"https://github.com/AllStak/allstak-nestjs/issues"},"dist":{"shasum":"6653a32138045f12182cc84cdddbaa17feaaf958","tarball":"https://registry.npmjs.org/@allstak/nestjs/-/nestjs-0.2.0.tgz","fileCount":10,"integrity":"sha512-mnno6JzQ2B9fxVggf6yBP9sS5v6CDnOrjuG1GH4AuFEzk0GPHyPChI/6aD3FvuU1NSBc0RBE6SWxm+2HZdjZ7g==","signatures":[{"sig":"MEYCIQDQo/amCPxTQ8/3muXOKXA1iVcrB+pds2KShUhFNwHF5gIhAPG0dchJVTMcmqF9+likAgo/3A/T3jg2i7D48R5qTcZT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@allstak%2fnestjs@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":716633},"main":"./dist/index.js","_from":"file:/home/runner/work/allstak-nestjs/allstak-nestjs/pack/allstak-nestjs-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts --sourcemap","pack:dry":"npm pack --dry-run"},"_npmUser":{"name":"allstak-","email":"hello@allstak.sa"},"_resolved":"/home/runner/work/allstak-nestjs/allstak-nestjs/pack/allstak-nestjs-0.2.0.tgz","_integrity":"sha512-mnno6JzQ2B9fxVggf6yBP9sS5v6CDnOrjuG1GH4AuFEzk0GPHyPChI/6aD3FvuU1NSBc0RBE6SWxm+2HZdjZ7g==","repository":{"url":"git+https://github.com/AllStak/allstak-nestjs.git","type":"git"},"_npmVersion":"10.8.2","description":"AllStak SDK for NestJS (beta). Global interceptor + exception filter with redaction, beforeSend, and forRootAsync for ConfigService.","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rxjs":"^7.8.2","tsup":"^8.0.0","vitest":"^1.6.1","express":"^5.2.1","typescript":"^5.3.0","@nestjs/core":"^11.1.19","@nestjs/common":"^11.1.19","@types/express":"^5.0.6","@nestjs/testing":"^11.1.19","reflect-metadata":"^0.2.2","@nestjs/platform-express":"^11.1.19"},"peerDependencies":{"@nestjs/core":">=9.0.0","@nestjs/common":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs_0.2.0_1780099354282_0.9776843898344045","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@allstak/nestjs","version":"0.2.1","license":"MIT","_id":"@allstak/nestjs@0.2.1","maintainers":[{"name":"allstak-","email":"hello@allstak.sa"}],"homepage":"https://allstak.sa","bugs":{"url":"https://github.com/AllStak/allstak-nestjs/issues"},"dist":{"shasum":"e6d5013c591770a84c43968020844e9af73dfffa","tarball":"https://registry.npmjs.org/@allstak/nestjs/-/nestjs-0.2.1.tgz","fileCount":10,"integrity":"sha512-Ft3K3JY9AbRePTX+gMgUML4/BnzO9oZWj/ZvCE5xacaDPDKo13YWWNgVjOgGPzdJKg0tXJ6hRc0iE+M1ZmydEA==","signatures":[{"sig":"MEUCIDRxp9furolJ70iimvWHIo0sRHaRTGKHXKU4jDGda2E3AiEA+jo+Ej5rV0oP+ipqtn1AWNdU1tBydecsYVmV7EhijrU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@allstak%2fnestjs@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":716633},"main":"./dist/index.js","_from":"file:/home/runner/work/allstak-nestjs/allstak-nestjs/pack/allstak-nestjs-0.2.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts --sourcemap","pack:dry":"npm pack --dry-run"},"_npmUser":{"name":"allstak-","email":"hello@allstak.sa"},"_resolved":"/home/runner/work/allstak-nestjs/allstak-nestjs/pack/allstak-nestjs-0.2.1.tgz","_integrity":"sha512-Ft3K3JY9AbRePTX+gMgUML4/BnzO9oZWj/ZvCE5xacaDPDKo13YWWNgVjOgGPzdJKg0tXJ6hRc0iE+M1ZmydEA==","repository":{"url":"git+https://github.com/AllStak/allstak-nestjs.git","type":"git"},"_npmVersion":"10.8.2","description":"AllStak SDK for NestJS (beta). Global interceptor + exception filter with redaction, beforeSend, and forRootAsync for ConfigService.","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rxjs":"^7.8.2","tsup":"^8.0.0","vitest":"^1.6.1","express":"^5.2.1","typescript":"^5.3.0","@nestjs/core":"^11.1.19","@nestjs/common":"^11.1.19","@types/express":"^5.0.6","@nestjs/testing":"^11.1.19","reflect-metadata":"^0.2.2","@nestjs/platform-express":"^11.1.19"},"peerDependencies":{"@nestjs/core":">=9.0.0","@nestjs/common":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs_0.2.1_1780196101821_0.13946860518813664","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@allstak/nestjs","version":"0.2.2","description":"AllStak SDK for NestJS (beta). Global interceptor + exception filter with redaction, beforeSend, and forRootAsync for ConfigService.","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"repository":{"type":"git","url":"git+https://github.com/AllStak/allstak-nestjs.git"},"homepage":"https://allstak.sa","bugs":{"url":"https://github.com/AllStak/allstak-nestjs/issues"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --sourcemap","test":"vitest run","pack:dry":"npm pack --dry-run"},"peerDependencies":{"@nestjs/common":">=9.0.0","@nestjs/core":">=9.0.0"},"devDependencies":{"@nestjs/common":"^11.1.19","@nestjs/core":"^11.1.19","@nestjs/platform-express":"^11.1.19","@nestjs/testing":"^11.1.19","@types/express":"^5.0.6","express":"^5.2.1","reflect-metadata":"^0.2.2","rxjs":"^7.8.2","tsup":"^8.0.0","typescript":"^5.3.0","vitest":"^1.6.1"},"engines":{"node":">=20"},"license":"MIT","_id":"@allstak/nestjs@0.2.2","_integrity":"sha512-oZ/Gh496WjL/VKSX+xyyMGoyLZNSIP57LxfuW6MpNCM0mFAFNa+M4pqe0PtHsnInrQ5Z6vgjHbMUcHB1ULxNDQ==","_resolved":"/home/runner/work/allstak-nestjs/allstak-nestjs/pack/allstak-nestjs-0.2.2.tgz","_from":"file:/home/runner/work/allstak-nestjs/allstak-nestjs/pack/allstak-nestjs-0.2.2.tgz","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-oZ/Gh496WjL/VKSX+xyyMGoyLZNSIP57LxfuW6MpNCM0mFAFNa+M4pqe0PtHsnInrQ5Z6vgjHbMUcHB1ULxNDQ==","shasum":"64ad433a53e5d61f43408fbfd96dec71d07a619f","tarball":"https://registry.npmjs.org/@allstak/nestjs/-/nestjs-0.2.2.tgz","fileCount":10,"unpackedSize":718840,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@allstak%2fnestjs@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIC3Uti105lCbA6HNlu4LSMWD46KKa3qtKpofkte7KDwgAiBQNUYrtN3XHJpRbneHrxAprIiPSLovfRNUJR4rBD+MQQ=="}]},"_npmUser":{"name":"allstak-","email":"hello@allstak.sa"},"directories":{},"maintainers":[{"name":"allstak-","email":"hello@allstak.sa"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nestjs_0.2.2_1780754877440_0.30646183683485995"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-11T05:31:31.100Z","modified":"2026-06-06T14:07:57.850Z","0.1.0-beta.1":"2026-05-11T05:31:31.368Z","0.1.0-beta.3":"2026-05-18T17:31:08.076Z","0.1.0":"2026-05-29T18:50:58.455Z","0.2.0":"2026-05-30T00:02:34.462Z","0.2.1":"2026-05-31T02:55:01.994Z","0.2.2":"2026-06-06T14:07:57.571Z"},"bugs":{"url":"https://github.com/AllStak/allstak-nestjs/issues"},"license":"MIT","homepage":"https://allstak.sa","repository":{"type":"git","url":"git+https://github.com/AllStak/allstak-nestjs.git"},"description":"AllStak SDK for NestJS (beta). Global interceptor + exception filter with redaction, beforeSend, and forRootAsync for ConfigService.","maintainers":[{"name":"allstak-","email":"hello@allstak.sa"}],"readme":"# @allstak/nestjs\n\nAllStak SDK for NestJS. Adds a global interceptor and exception filter for request telemetry, errors, spans, and trace propagation.\n\n## Install\n\n```bash\nnpm install @allstak/nestjs\n```\n\nPeer dependencies:\n\n```bash\nnpm install @nestjs/common @nestjs/core reflect-metadata rxjs\n```\n\n## Setup\n\n```ts\nimport { Module } from '@nestjs/common';\nimport { AllStakModule } from '@allstak/nestjs';\n\n@Module({\n  imports: [\n    AllStakModule.forRoot({\n      apiKey: process.env.ALLSTAK_API_KEY,\n      environment: process.env.NODE_ENV ?? 'production',\n      release: process.env.ALLSTAK_RELEASE,\n      serviceName: 'api',\n      captureRequestHeaders: true,\n    }),\n  ],\n})\nexport class AppModule {}\n```\n\n## Async config\n\n```ts\nAllStakModule.forRootAsync({\n  useFactory: () => ({\n    apiKey: process.env.ALLSTAK_API_KEY,\n    environment: process.env.NODE_ENV ?? 'production',\n    release: process.env.ALLSTAK_RELEASE,\n    serviceName: 'api',\n  }),\n});\n```\n\n## What is captured\n\n- Inbound HTTP request telemetry.\n- Outbound HTTP request telemetry (global `fetch`, plus optional `@nestjs/axios`).\n- Unhandled exceptions with stack traces.\n- Process-level fatal errors (uncaught exceptions / unhandled rejections) that escape the request pipeline.\n- Database queries (opt-in Prisma / TypeORM instrumentation) with the active trace.\n- Server + client spans for each request and downstream call.\n- W3C `traceparent` + `baggage` propagation on inbound responses AND outbound calls.\n\n## Configuration\n\n| Option | Description |\n| --- | --- |\n| `apiKey` | Project API key. |\n| `dsn` | Alias for `apiKey`. |\n| `environment` | Deployment environment. |\n| `release` | App version or commit SHA. |\n| `serviceName` | Logical service name. |\n| `captureRequestHeaders` | Capture redacted inbound headers. Default: `false`. |\n| `beforeSend` | Optional hook to modify or drop outbound telemetry. |\n| `enableAutoSessionTracking` | Open one release-health session per process on startup and close it on shutdown. Default: `true`. |\n| `platform` | Platform tag on the session start payload. Default: `node`. |\n| `userId` | User id attached to the session start payload when known at init. |\n| `enableOfflineQueue` | Persist undeliverable telemetry to a bounded filesystem spool and replay it on the next init. Default: `true`. |\n| `offlineQueueDir` | Spool directory. Default: `<os.tmpdir()>/allstak-nestjs-spool`. |\n| `enableOutboundHttp` | Instrument outbound HTTP (global `fetch`): inject trace headers on egress and emit outbound spans/requests. Default: `true`. |\n| `enableGlobalErrorHandlers` | Install `process.on('uncaughtException'/'unhandledRejection')` so fatal errors that escape the request pipeline are captured at `fatal` level and the session is marked crashed. Default: `true`. |\n| `enableDbInstrumentation` | Gate the opt-in `instrumentPrisma()` / `instrumentDataSource()` ORM query instrumentation. Default: `true`. |\n\n## Release health\n\n`AllStakModule.forRoot(...)` opens a single release-health session per process\non module init (`/ingest/v1/sessions/start`) and closes it on graceful shutdown\n(`/ingest/v1/sessions/end`) with the final status (`ok` / `errored` / `crashed`).\nSessions are never sampled and the whole path is fail-open. Call\n`app.enableShutdownHooks()` so the closing event fires. Set\n`enableAutoSessionTracking: false` to opt out.\n\n## Offline queue\n\nWhen telemetry cannot be delivered (network outage, retry exhausted, or the\nprocess shuts down with events still buffered) the SDK persists the\n**already-redacted** wire body to a bounded filesystem spool\n(`<os.tmpdir()>/allstak-nestjs-spool` by default) instead of dropping it. On the\nnext init it asynchronously drains the spool and re-sends each entry through the\nnormal transport, removing it only once accepted (2xx) or permanently\nundeliverable (a 4xx other than 429). The spool is bounded by count, total\nbytes, and max age, evicting the oldest entries first. Session lifecycle calls\n(`/sessions/start`, `/sessions/end`) are live-only and never persisted. If the\nspool directory is not writable (read-only FS, serverless, edge runtime with no\n`fs`) the SDK degrades silently to in-memory — it never throws or blocks init.\nSet `enableOfflineQueue: false` to opt out, or `offlineQueueDir` to point at a\ndurable path.\n\n## Outbound HTTP tracing\n\nDistributed traces only stay connected if egress carries the trace context. The\nSDK wraps the global `fetch` so every outbound call made while handling a request\nbecomes a **child span of that request's trace**: it injects W3C `traceparent` +\n`baggage` (continuing the inbound trace id and sampled flag) and emits a\n`http.client` span plus an outbound HTTP request row. The SDK's own ingest host\nis always skipped, and the wrapper is fully fail-open — an instrumentation error\nnever breaks the caller's request. Set `enableOutboundHttp: false` to opt out.\n\nFor `@nestjs/axios` (an optional/peer integration the SDK never hard-depends on),\ninstrument the `HttpService` once after the module is registered:\n\n```ts\nimport { Injectable, OnModuleInit } from '@nestjs/common';\nimport { HttpService } from '@nestjs/axios';\nimport { instrumentHttpService } from '@allstak/nestjs';\n\n@Injectable()\nexport class HttpTracing implements OnModuleInit {\n  constructor(private readonly http: HttpService) {}\n  onModuleInit(): void {\n    instrumentHttpService(this.http); // axios requests now propagate the trace\n  }\n}\n```\n\n## Global error handlers\n\nThe interceptor and exception filter only see errors that flow through the\nNestJS request pipeline. A truly unhandled error thrown off that path — in a\ntimer, an event-emitter callback, or a forgotten `await` — would otherwise\nterminate the process with nothing captured. On module init the SDK installs\n`process.on('uncaughtException')` and `process.on('unhandledRejection')` so such\na failure is captured at `fatal` level, the release-health session is marked\n`crashed`, and buffered telemetry is flushed before exit.\n\nNode's existing behaviour is preserved: for an uncaught exception the SDK\nre-emits out-of-band **only** when it is the sole listener (so Node's default\ncrash-and-exit still applies); when your app has its own `uncaughtException`\nlistener the SDK does not force an exit — your handler owns that decision.\nUnhandled rejections are captured without changing the process's rejection mode.\nThe whole path is fail-open. Set `enableGlobalErrorHandlers: false` to opt out.\n\n## Database queries (Prisma / TypeORM)\n\nOpt-in ORM instrumentation emits a `/ingest/v1/db` row for every query —\nnormalized SQL (literal values stripped to `?`, so no parameter values leave the\nprocess), duration, status, and the **active request trace/span ids** so a query\nmade while handling a request becomes a child of that request's trace. Prisma\nand TypeORM are optional/peer integrations the SDK never hard-depends on; you\npass your client / data-source in once, mirroring `instrumentHttpService()`.\n\n```ts\n// Prisma — $extends returns a NEW client, so assign it back.\nimport { instrumentPrisma } from '@allstak/nestjs';\nprisma = instrumentPrisma(prisma);\n\n// TypeORM — attaches a query logger to your DataSource.\nimport { instrumentDataSource } from '@allstak/nestjs';\ninstrumentDataSource(dataSource);\n```\n\nBoth helpers are idempotent and fail-open. Set `enableDbInstrumentation: false`\nto make them no-ops.\n\n## Privacy\n\nSensitive header and metadata keys are redacted before telemetry is sent. Add `redactKeys` for application-specific fields.\n\n## Troubleshooting\n\n- No request events: confirm `AllStakModule.forRoot(...)` is imported by your root module.\n- No errors: confirm no custom exception filter is swallowing exceptions before global filters run.\n- Missing correlation: preserve incoming `traceparent`, `baggage`, and `x-request-id` headers at your proxy.\n\n## Contributing and Support\n\n- Report bugs with the GitHub bug report template: https://github.com/AllStak/allstak-nestjs/issues/new/choose\n- Open pull requests using the checklist in [CONTRIBUTING.md](CONTRIBUTING.md).\n- Report security vulnerabilities privately through [SECURITY.md](SECURITY.md).\n\n## License\n\nMIT\n","readmeFilename":"README.md"}