Customize 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(...).
You can also update spans after they’ve been logged via the Update Span API.