Home/Documentation/TypeScript

TypeScript SDK

Instrument Node.js APIs.

Use a framework-native adapter or build on the shared asynchronous Node.js core.

Node.js 20+Packages v0.2.0Production ready
01

Recommended

Use your framework adapter.

Adapters automatically retain normalized route templates, response status, duration, API version and explicit customer context.

02

Language foundation

Build on one event contract.

@apirelio/core owns event creation, route normalization, bounded metadata, retry, backpressure and graceful shutdown.

Terminalbash
npm install @apirelio/core
Custom adaptertypescript
import { ApirelioClient } from '@apirelio/core'

const apirelio = new ApirelioClient({
  apiKey: process.env.APIRELIO_API_KEY!,
  service: 'billing-api',
  environment: 'production',
})

apirelio.capture({
  method: 'POST',
  route: '/api/invoices/:invoice/send',
  status: 202,
  durationMs: 84,
  customer: { id: 'cus_123', plan: 'growth' },
  sdk: 'custom',
  sdkVersion: '0.2.0',
})
Prefer an adapter

Applications using a supported framework should install its dedicated package instead of manually wrapping every request.

03

Off-request transport

Bounded, batched and fail-safe.

Capture only enqueues an in-memory event. Batches are delivered in the background with timeouts and bounded retry; a full queue drops telemetry instead of slowing or breaking the customer API.

Q

Bounded queue

Backpressure protects application memory during an ingestion outage.

R

Selective retry

Network errors, rate limits and server failures retry with delay; invalid events fail fast.

S

Graceful shutdown

Framework lifecycle hooks flush pending events within a fixed timeout.

04

Compatibility

Supported TypeScript matrix.

PackageFrameworkRuntime
@apirelio/expressExpress 4–5Node.js 20+
@apirelio/fastifyFastify 4–5Node.js 20+
@apirelio/nestjsNestJS 10–11Node.js 20+
@apirelio/nuxtNuxt 3–4Node.js 20.19+