Decorators (@workflow, @task)
Decorators (@workflow, @task)
Use decorators to create structured, nested traces that show how your app flows.
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.