@trasys/sdk
v0.1.2
Published
AI observability and autonomous incident response SDK for Node.js — built on OpenTelemetry
Maintainers
Readme
s## Runtime Compatibility
| Feature | Node.js | Bun | Deno |
| --------------------------------------------- | ---------------- | ----------------------------- | ----------------------------- |
| HTTP spans (Express / Fastify / Hono) | ✅ | ✅ | ✅ |
| HTTP histograms (http.server.duration) | ✅ auto via OTel | ✅ manual via framework hooks | ✅ manual via framework hooks |
| Outbound HTTP spans (fetch, http.request) | ✅ | ⚠️ limited | ⚠️ limited |
| AI provider instrumentation | ✅ | ✅ | ✅ |
| Database instrumentation | ✅ | ✅ | ✅ |
| Logs & metrics | ✅ | ✅ | ✅ |
Bun
On Bun, @opentelemetry/instrumentation-http cannot patch the HTTP layer because Bun's server bypasses Node.js http.Server. The SDK detects this automatically and records http.server.duration and http.server.requests.total from framework response hooks (Fastify onResponse, Hono middleware).
Outbound HTTP spans (for fetch / http.request calls made inside your handlers) are not available on Bun because OTel's patch never fires there.
No configuration is needed — the SDK logs a notice at startup when Bun is detected:
[@trasys/sdk] Bun runtime detected. HTTP histograms collected via framework hooks. Outbound HTTP spans not available on Bun.You can also check the runtime programmatically:
import { RUNTIME, IS_BUN } from "@trasys/sdk";
console.log(RUNTIME); // "bun" | "node" | "deno"