respan-sdk

Core types, constants, and utilities for the Respan TypeScript SDK.

@respan/respan-sdk provides shared types, span attribute constants, and utilities used across all Respan TypeScript packages.

Install

$npm install @respan/respan-sdk

Key exports

  • RespanSpanAttributes — Enum of all span attribute keys
  • RESPAN_SPAN_ATTRIBUTES_MAP — Maps parameter names to OTEL attribute paths
  • RespanLogType — Log type enum (chat, workflow, task, tool, agent, etc.)
  • resolveTracingIngestEndpoint() — Resolves the traces API endpoint
  • fetchWithRetry() — HTTP fetch with exponential backoff
  • RespanPayloadSchema — Zod schema for payload validation