{"_id":"@atlas-parthenon/sdk-nodejs","name":"@atlas-parthenon/sdk-nodejs","dist-tags":{"alpha":"0.1.0-alpha.1","latest":"0.1.0-alpha.1"},"versions":{"0.1.0-alpha.1":{"name":"@atlas-parthenon/sdk-nodejs","version":"0.1.0-alpha.1","description":"Atlas Node.js SDK for authenticated batched telemetry ingest.","keywords":["atlas","observability","telemetry","nextjs","nodejs"],"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"repository":{"type":"git","url":"git+https://github.com/atlas-parthenon/atlas.git","directory":"sdks/nodejs"},"homepage":"https://github.com/atlas-parthenon/atlas/tree/main/sdks/nodejs#readme","bugs":{"url":"https://github.com/atlas-parthenon/atlas/issues"},"publishConfig":{"access":"public"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"build":"node ../../scripts/build-sdk-package.mjs","test":"tsx --test src/client.test.ts","typecheck":"tsc -p tsconfig.json --noEmit"},"_id":"@atlas-parthenon/sdk-nodejs@0.1.0-alpha.1","_integrity":"sha512-ZIfekKOCYnJslrVRXoYJzaJjVfgKtJuSOsmJpgG1szUF386M2JbQx/TiUi82hpsVJQcmugcDETiygaoAoG6sXw==","_resolved":"/var/folders/f5/b7lb90c96512pw1fb3hbh1g00000gn/T/atlas-sdk-release-jd4DMf/atlas-parthenon-sdk-nodejs-0.1.0-alpha.1.tgz","_from":"file:/var/folders/f5/b7lb90c96512pw1fb3hbh1g00000gn/T/atlas-sdk-release-jd4DMf/atlas-parthenon-sdk-nodejs-0.1.0-alpha.1.tgz","_nodeVersion":"25.8.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-ZIfekKOCYnJslrVRXoYJzaJjVfgKtJuSOsmJpgG1szUF386M2JbQx/TiUi82hpsVJQcmugcDETiygaoAoG6sXw==","shasum":"172f280ee9b2e69a2ecf3934e4a8b8bb39099fcd","tarball":"https://registry.npmjs.org/@atlas-parthenon/sdk-nodejs/-/sdk-nodejs-0.1.0-alpha.1.tgz","fileCount":23,"unpackedSize":32909,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIH6eWfpHVd57cwjatV7zLKLPzwKPcUqRO9qeXH5/99G5AiBqwHDybkXIoILlJSeBy/uMEJsnc5AHOQq8waQs/QuqRg=="}]},"_npmUser":{"name":"amsheehan","email":"alex.m.sheehan@gmail.com"},"directories":{},"maintainers":[{"name":"amsheehan","email":"alex.m.sheehan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk-nodejs_0.1.0-alpha.1_1776528640825_0.9002110090680977"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-18T16:10:40.731Z","0.1.0-alpha.1":"2026-04-18T16:10:41.042Z","modified":"2026-04-18T16:10:41.301Z"},"maintainers":[{"name":"amsheehan","email":"alex.m.sheehan@gmail.com"}],"description":"Atlas Node.js SDK for authenticated batched telemetry ingest.","homepage":"https://github.com/atlas-parthenon/atlas/tree/main/sdks/nodejs#readme","keywords":["atlas","observability","telemetry","nextjs","nodejs"],"repository":{"type":"git","url":"git+https://github.com/atlas-parthenon/atlas.git","directory":"sdks/nodejs"},"bugs":{"url":"https://github.com/atlas-parthenon/atlas/issues"},"readme":"# @atlas-parthenon/sdk-nodejs\n\nNode.js SDK for sending Atlas telemetry through installation-authenticated,\nbatched ingest.\n\n## Install\n\n```sh\npnpm add @atlas-parthenon/sdk-nodejs\n```\n\n## Usage\n\n```ts\nimport { AtlasNodeClient } from \"@atlas-parthenon/sdk-nodejs\";\n\nconst atlas = new AtlasNodeClient({\n  baseUrl: process.env.ATLAS_INGEST_BASE_URL ?? \"http://localhost:3000\",\n  installationId: process.env.ATLAS_INSTALLATION_ID!,\n  installationSecret: process.env.ATLAS_INSTALLATION_SECRET!,\n  serviceName: \"checkout-api\",\n  deploymentEnvironment: process.env.NODE_ENV\n});\n\natlas.captureLog({\n  severityText: \"info\",\n  bodyText: \"checkout request started\",\n  eventAttrs: {\n    cartId: \"cart_123\"\n  }\n});\n\ntry {\n  throw new Error(\"payment gateway timeout\");\n} catch (error) {\n  atlas.captureException(error, {\n    operationName: \"POST /checkout\",\n    httpRoute: \"/checkout\",\n    httpMethod: \"POST\",\n    eventAttrs: {\n      provider: \"stripe\"\n    }\n  });\n}\n\nawait atlas.flush();\nawait atlas.shutdown();\n```\n\n## Runtime Contract\n\n- The SDK uses the global Node.js `fetch` implementation and requires Node 18+.\n- Customer apps authenticate with `installationId` plus `installationSecret`.\n- The SDK exchanges those credentials for a short-lived ingest lease at\n  `/api/ingest/session`.\n- Events are buffered in memory, grouped into ordered batches, gzip-compressed by\n  default, and sent to the lease-provided ingest URL.\n- Each batch carries `sequence`, `prevBatchHash`, and `batchHash` so retries are\n  idempotent and the server can validate the receipt chain.\n- `captureException` serializes `Error` objects into Atlas exception fields and\n  sends them through the same batched transport.\n- In Next.js, use this package in Node-based route handlers, server actions,\n  cron jobs, and background work. Do not use it in the Edge runtime.\n\n## Environment Variables\n\n- `ATLAS_INGEST_BASE_URL`: Atlas app origin, for example `https://atlas.example.com`\n- `ATLAS_INSTALLATION_ID`: installation public id created in the Atlas dashboard\n- `ATLAS_INSTALLATION_SECRET`: reveal-once machine secret for that installation\n\nAtlas maintainers should read `apps/web/lib/ingest/README.md` and\n`docs/sdk-ingest-v2.md` in the repository before changing the transport\ncontract.\n","readmeFilename":"README.md","_rev":"1-f23575201157fad1ec6a8b67374c6d8d"}