Overview
The Trasys SDK is a drop-in Node.js observability library built on OpenTelemetry — auto-instrumenting HTTP, databases, AI calls, background jobs, and logs.
Trasys SDK
The Trasys SDK is a drop-in observability library for Node.js. It instruments your application automatically and sends traces, metrics, and logs to the Trasys platform — without requiring you to write instrumentation code for every library you use.
What gets tracked
| Category | What gets captured |
|---|---|
| HTTP | Every inbound request — latency, status code, route, user, session |
| Databases | Queries from pg, Prisma, Drizzle, Mongoose, MongoDB, Sequelize |
| AI | Every LLM call — model, tokens, cost, prompt/response, streaming |
| Background jobs | BullMQ job processing, duration, failures |
| Outbound requests | Fetch and Axios calls with distributed trace propagation |
| gRPC | Trace context propagated across gRPC service calls |
| Logs | Structured logs correlated to the active trace and session |
| Metrics | Custom counters, gauges, and histograms |
| Health checks | Periodic checks with alerting on failure |
How it works
The SDK wraps the OpenTelemetry SDK and handles all the plumbing — provider setup, exporters, context propagation, batch flushing — so you only interact with a single sdk object.
Your app → Trasys SDK → OpenTelemetry pipeline → Trasys ingest → DashboardInstrumented libraries report spans automatically. You add the SDK initializer once, mount the middleware once, and the rest is automatic.
Quick start
npm install @trasys/sdkRequirements
- Node.js
>=18.0.0 - npm
>=9.0.0
The SDK also runs on Bun, with one limitation: outbound HTTP spans are not available due to how Bun exposes its native fetch implementation. Everything else — middleware, AI wrappers, database instrumentation, logging — works normally.
Next steps
Trasys Developer Docs
Everything you need to integrate with, query, and extend Trasys: the SDK, the Public API, Pulse synthetic monitoring, webhooks, and TQL, its query language.
Installation & Setup
Install the Trasys SDK with npm and create a dedicated initializer file that must be required before any other library so instrumentation patches load first.

