Trasys
Node.js SDK

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

CategoryWhat gets captured
HTTPEvery inbound request — latency, status code, route, user, session
DatabasesQueries from pg, Prisma, Drizzle, Mongoose, MongoDB, Sequelize
AIEvery LLM call — model, tokens, cost, prompt/response, streaming
Background jobsBullMQ job processing, duration, failures
Outbound requestsFetch and Axios calls with distributed trace propagation
gRPCTrace context propagated across gRPC service calls
LogsStructured logs correlated to the active trace and session
MetricsCustom counters, gauges, and histograms
Health checksPeriodic 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  →  Dashboard

Instrumented libraries report spans automatically. You add the SDK initializer once, mount the middleware once, and the rest is automatic.

Quick start

npm install @trasys/sdk

Requirements

  • 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

On this page