Quickstart
Overview
respan is the recommended way to use Respan. It provides a single Respan() class that initializes tracing, captures LLM calls, and exposes decorators for structured spans.
Version: 3.0.0 | Python: >=3.9, <4.0
Quick start
With auto_instrument=True, Respan auto-traces any installed LLM SDK (OpenAI, Anthropic, LangChain, vector DBs, and more) — no instrumentor imports required.
That’s it — the call above appears in your Respan dashboard.
Explicit instrumentation (optional)
Prefer to pin a specific instrumentation plugin (for finer control or to avoid auto-discovering a library you don’t want traced)? Pass it via instrumentations:
You can combine auto_instrument=True with explicit plugins — plugins take precedence.
See Respan() for every constructor parameter, environment variables, and more examples.
Public exports
Everything you need is available from respan:
Next steps
- Respan() — constructor parameters and configuration examples
- propagate_attributes() — attach user/thread/metadata to all spans
- log_batch_results() — log OpenAI Batch API results
- Instrumentation Protocol — build your own plugin