{"_id":"@aerograph/otel","_rev":"3-33a22bfcf42b5bb98dc1ebee586f600f","name":"@aerograph/otel","dist-tags":{"latest":"0.3.1"},"versions":{"0.1.0":{"name":"@aerograph/otel","version":"0.1.0","keywords":["ai","agent","opentelemetry","otlp","trace","observability","aerograph"],"license":"Apache-2.0","_id":"@aerograph/otel@0.1.0","maintainers":[{"name":"sgcpu","email":"sian.frcrce.stuco@gmail.com"}],"homepage":"https://github.com/SGcpu/AeroGraph#readme","bugs":{"url":"https://github.com/SGcpu/AeroGraph/issues"},"dist":{"shasum":"f3752806fed5d16d521c7220cab351515c517ceb","tarball":"https://registry.npmjs.org/@aerograph/otel/-/otel-0.1.0.tgz","fileCount":30,"integrity":"sha512-aHVZgfbOq0izdNJMDtGwb+ZFGoh3NMM3u5gMxK61D35BmkXZNUMG+nsKL/1nCXmBQ3JyhyH8Ccd8PVBUIzQEBQ==","signatures":[{"sig":"MEQCIF3Gj4+6208JzGR5udD19BTJwTd3M1Oqhk7tOh6nGWVJAiA4D+YhFC1ZmHi2ku+KnIu0VfP84Hizo/JFIUtnKWvY0w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":182185},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"73ae8bebcf941d8f9abd0649da761cca15d19794","private":false,"scripts":{"dev":"tsc -p tsconfig.json --watch","lint":"eslint .","test":"vitest run","build":"tsc -p tsconfig.json","prebuild":"node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\""},"_npmUser":{"name":"sgcpu","email":"sian.frcrce.stuco@gmail.com"},"repository":{"url":"git+https://github.com/SGcpu/AeroGraph.git","type":"git"},"_npmVersion":"11.5.2","description":"OpenTelemetry bridge for AeroGraph — export/import OTLP traces.","directories":{},"_nodeVersion":"22.17.1","dependencies":{"zod":"^3.23.0","@aerograph/contracts":"0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.9.0","vitest":"^2.1.0","@eslint/js":"^9.9.0","typescript":"^5.6.0","typescript-eslint":"^8.0.0"},"peerDependencies":{"@aerograph/contracts":"^0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/otel_0.1.0_1781117157175_0.9922678097603876","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@aerograph/otel","version":"0.2.0","keywords":["ai","agent","opentelemetry","otlp","trace","observability","aerograph"],"license":"Apache-2.0","_id":"@aerograph/otel@0.2.0","maintainers":[{"name":"sgcpu","email":"sian.frcrce.stuco@gmail.com"}],"homepage":"https://github.com/SGcpu/AeroGraph#readme","bugs":{"url":"https://github.com/SGcpu/AeroGraph/issues"},"dist":{"shasum":"606fab21333499c85c318980e923b04630bc039d","tarball":"https://registry.npmjs.org/@aerograph/otel/-/otel-0.2.0.tgz","fileCount":34,"integrity":"sha512-eZWVafdZ1R6i5SU1mPiUu3aCulk5+ArOjKZXwrBTZGzfL8l43ZmhNIk3qSuUFROV9b1SUVKwq1ZfNgocqI/+GQ==","signatures":[{"sig":"MEQCICCW5NpXDdOXVFxqQHlUqnkwgZXlNvNUx/E4NS5du8S4AiBVoTQAbcQnpemWYsZLW3KAhHlg08qGkQauherGHQ+iLw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":200123},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"9504b907ff5e3c49d3ec8c6e8f47fb2f46d1436f","private":false,"scripts":{"dev":"tsc -p tsconfig.json --watch","lint":"eslint .","test":"vitest run","build":"tsc -p tsconfig.json","prebuild":"node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\""},"_npmUser":{"name":"sgcpu","email":"sian.frcrce.stuco@gmail.com"},"repository":{"url":"git+https://github.com/SGcpu/AeroGraph.git","type":"git"},"_npmVersion":"11.5.2","description":"OpenTelemetry bridge for AeroGraph — export/import OTLP traces.","directories":{},"_nodeVersion":"22.17.1","dependencies":{"zod":"^3.23.0","@aerograph/contracts":"0.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.9.0","vitest":"^2.1.0","@eslint/js":"^9.9.0","typescript":"^5.6.0","typescript-eslint":"^8.0.0"},"peerDependencies":{"@aerograph/contracts":"0.3.0"},"_npmOperationalInternal":{"tmp":"tmp/otel_0.2.0_1782813447092_0.8883584160956768","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@aerograph/otel","version":"0.3.1","private":false,"description":"OpenTelemetry bridge for AeroGraph — export/import OTLP traces.","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/SGcpu/AeroGraph.git"},"bugs":{"url":"https://github.com/SGcpu/AeroGraph/issues"},"homepage":"https://github.com/SGcpu/AeroGraph#readme","publishConfig":{"access":"public"},"keywords":["ai","agent","opentelemetry","otlp","trace","observability","aerograph"],"scripts":{"prebuild":"node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"","build":"tsc -p tsconfig.json","dev":"tsc -p tsconfig.json --watch","test":"vitest run","lint":"eslint ."},"peerDependencies":{"@aerograph/contracts":"0.3.0"},"dependencies":{"@aerograph/contracts":"0.3.0","zod":"^3.23.0"},"devDependencies":{"typescript":"^5.6.0","vitest":"^2.1.0","eslint":"^9.9.0","@eslint/js":"^9.9.0","typescript-eslint":"^8.0.0"},"_id":"@aerograph/otel@0.3.1","gitHead":"1e896ae4a233dca3824970620e6491939e97b2ba","_nodeVersion":"22.17.1","_npmVersion":"11.5.2","dist":{"integrity":"sha512-NEIc2G8O2UaIMJB9zMXudM2ysjHN5Um15FabFdX//FFPb0VIGCjIk/aeWKuKtV7jDtHbkpSoi25i+zlczQcsug==","shasum":"e47e72aa0eeaa4b4caf4efd1af8a31e711c3497e","tarball":"https://registry.npmjs.org/@aerograph/otel/-/otel-0.3.1.tgz","fileCount":34,"unpackedSize":200123,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFjL+LJYlbY4plU/QbnXOvCwCAlKoN0y5dwynFsY4/4kAiBRpthCtcIvUpBP4+ohju4FK98arFM00U5I5x/trn3GNg=="}]},"_npmUser":{"name":"sgcpu","email":"sian.frcrce.stuco@gmail.com"},"directories":{},"maintainers":[{"name":"sgcpu","email":"sian.frcrce.stuco@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/otel_0.3.1_1784833294645_0.4029897874284243"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-10T18:45:57.007Z","modified":"2026-07-23T19:01:34.932Z","0.1.0":"2026-06-10T18:45:57.352Z","0.2.0":"2026-06-30T09:57:27.238Z","0.3.1":"2026-07-23T19:01:34.784Z"},"bugs":{"url":"https://github.com/SGcpu/AeroGraph/issues"},"license":"Apache-2.0","homepage":"https://github.com/SGcpu/AeroGraph#readme","keywords":["ai","agent","opentelemetry","otlp","trace","observability","aerograph"],"repository":{"type":"git","url":"git+https://github.com/SGcpu/AeroGraph.git"},"description":"OpenTelemetry bridge for AeroGraph — export/import OTLP traces.","maintainers":[{"name":"sgcpu","email":"sian.frcrce.stuco@gmail.com"}],"readme":"# @aerograph/otel\r\n\r\nThe bidirectional OpenTelemetry (OTLP) bridge for AeroGraph.\r\n\r\n## Overview\r\n\r\nAeroGraph stores cognitive observability traces using its own canonical append-only models. However, standard observability ecosystems (Jaeger, Datadog) expect W3C OpenTelemetry spans. This package seamlessly translates between the two paradigms with zero information loss.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @aerograph/otel\r\n```\r\n\r\n*(Requires Node.js >= 18.18.0)*\r\n\r\n## Usage: Exporting AeroGraph to OTLP\r\n\r\nConvert an AeroGraph `TraceEvent` natively to an OpenTelemetry `OtlpSpan` format:\r\n\r\n```typescript\r\nimport { exportEventsToOtlp } from \"@aerograph/otel\";\r\nimport { FlightRecorder } from \"@aerograph/sdk\";\r\n\r\n// 1. You have AeroGraph events\r\nconst event = await recorder.prompt({ text: \"Hello OTel\" });\r\n\r\n// 2. Export to OTLP JSON Payload\r\nconst otlpPayload = exportEventsToOtlp([event], { serviceName: \"my-service\" });\r\n\r\n// 3. You can now POST this JSON to Jaeger or the OTel Collector via HTTP\r\n```\r\n\r\n## Usage: Importing OTLP into AeroGraph\r\n\r\nIf you receive external OTLP spans, you can deterministically parse them back into `TraceEvent` objects.\r\n\r\n```typescript\r\nimport { importOtlpToEvents, otlpExportRequestSchema } from \"@aerograph/otel\";\r\n\r\nconst payload = otlpExportRequestSchema.parse(incomingJson);\r\n\r\nconst traceEvents = importOtlpToEvents(payload, {\r\n  defaultActorId: \"otlp-ingest\",\r\n  preserveOriginalIds: true\r\n});\r\n```\r\n\r\n## GenAI Semantic Conventions (v1.1.0)\r\n\r\nWhen exporting AeroGraph canonical telemetry (introduced in schema v1.1.0) to OTLP, the bridge automatically translates the standard metrics to [OpenTelemetry GenAI Semantic Conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/):\r\n- `model.name` $\\rightarrow$ `gen_ai.request.model`\r\n- `model.provider` $\\rightarrow$ `gen_ai.system`\r\n- `usage.inputTokens` $\\rightarrow$ `gen_ai.usage.input_tokens`\r\n- `usage.outputTokens` $\\rightarrow$ `gen_ai.usage.output_tokens`\r\n\r\nThis guarantees deterministic, lossless mapping between canonical events and OTLP spans.\r\n\r\n## License\r\nApache-2.0\r\n","readmeFilename":"README.md"}