Traces
Set up Respan
- Sign up — Create an account at platform.respan.ai
- Create an API key — Generate one on the API keys page
- Add credits or a provider key — Add credits on the Credits page or connect your own provider key on the Integrations page
Use AI
Add the Docs MCP to your AI coding tool to get help building with Respan. No API key needed.
The Respan tracing SDK provides decorators and wrappers to instrument your code. This page covers the detailed features.
Decorators & span types
Use decorators (Python) or wrapper methods (JS/TS) to create spans. Each decorator creates a different span type in the trace tree.
For the full SDK API reference, see the Python SDK or TypeScript SDK.
Class-based workflows
Apply @workflow to a class with method_name to designate the entry point. Use @task on individual methods.
Override span input & output
Control what appears as a span’s input/output in the trace UI using OpenTelemetry attributes:
Use update_current_span(attributes=...) for overriding displayed input/output. Values must be JSON-serializable strings via json.dumps(...).
Integration frameworks
Respan supports 90+ integrations with popular AI frameworks. See the Integrations overview for the full list, or jump to:
Manual ingestion
Use manual ingestion when you have existing log data, custom telemetry pipelines, or OpenTelemetry setups that need to send traces to Respan without using a framework SDK.
OTLP endpoint
If you have an existing OpenTelemetry setup, send traces directly to Respan’s OTLP-compatible endpoint. This works with any OpenTelemetry SDK or collector.
Environment variable configuration
SDK configuration
Python
JS/TS
cURL
Respan automatically parses OTel spans, extracts Gen AI semantic conventions and Respan-specific attributes, and maps them to the Respan data model. For the full OTLP schema and recognized attributes, see the OTLP ingest API reference.
Ingest API
Construct traces by posting spans as JSON. Every span is a JSON object. Spans with the same trace_unique_id are grouped into a single trace. Parent-child relationships are defined via span_parent_id.
Endpoint
Span fields
For the full list, see Span fields reference.