respan

Unified entry point for Respan tracing in TypeScript.

@respan/respan is the main package for Respan tracing. It provides the Respan class that initializes OpenTelemetry, manages instrumentations, and exposes decorators for structured traces.

Install

$npm install @respan/respan @respan/respan-sdk @respan/tracing

Quick start

1import { Respan } from "@respan/respan";
2import { OpenAIInstrumentor } from "@respan/instrumentation-openai";
3
4const respan = new Respan({
5 apiKey: process.env.RESPAN_API_KEY,
6 instrumentations: [new OpenAIInstrumentor()],
7});
8await respan.initialize();

Configuration

ParameterTypeDefaultDescription
apiKeystringRESPAN_API_KEY env varRespan API key
baseURLstringhttps://api.respan.aiAPI base URL
appNamestring"default"Application name for traces
instrumentationsInstrumentation[][]Plugin instrumentations to activate
traceContentbooleantrueCapture input/output content
logLevelstring"error"Log level (debug, info, warn, error)