@trel-to/sdk
v0.3.0
Published
Trel SDK for Node.js - OpenTelemetry-based observability for trel.to
Downloads
12
Maintainers
Readme
@trel-to/sdk
Trel SDK for Node.js — OpenTelemetry (OTEL) based observability for trel.to. Auto-instruments HTTP, captures traces via OTLP, and sends data to Trel.
Install
npm install @trel-to/sdkUsage
import { init } from '@trel-to/sdk';
init({
apiKey: 'trel_sk_your_api_key',
service: 'my-api',
});Call init() before any other imports. After this, HTTP requests (Express, Fastify, fetch, etc.) are traced and sent to Trel.
OpenTelemetry support: Uses the official @opentelemetry/sdk-node and OTLP HTTP exporter. Compatible with any OTEL instrumentation. Sends traces to Trel's OTLP endpoint (https://ingest.trel.to/v1/traces).
Options
| Option | Required | Default | Description |
| --------- | -------- | -------------------- | -------------------------------- |
| apiKey | Yes | — | Your Trel API key |
| service | No | 'unknown' | Service name for your app |
| endpoint| No | https://ingest.trel.to | Custom ingestion URL |
License
MIT
