Set up Respan
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
Use AI
Add the Docs MCP to your AI coding tool to get help building with Respan. No API key needed.
How to setup
Pass fields to spans usingrespan_span_attributes (Respan OTel), withTrace metadata (OpenAI Agents SDK), or experimental_telemetry (Vercel AI SDK). Here’s a quick example:
- Respan (OTel)
- OpenAI Agents SDK (JS)
- Vercel AI SDK
| Framework | Method | Supported params |
|---|---|---|
| Respan (OTel) | respan_span_attributes(...) | All parameters |
| OpenAI Agents SDK | withTrace("...", fn, { metadata }) | metadata only (JS/TS) |
| Vercel AI SDK | experimental_telemetry.metadata | customer_identifier, metadata, custom pricing |
Key fields
customer_identifier
string — Unique user or customer ID. Applies to all spans in the trace. Use this to track per-user metrics, set budgets, and apply rate limits.
- Respan (OTel)
- OpenAI Agents SDK (JS)
- Vercel AI SDK
metadata
object — Custom key-value pairs for tagging, analytics, and filtering. Metadata appears as custom properties on the trace and its spans.
- Respan (OTel)
- OpenAI Agents SDK (JS)
- Vercel AI SDK
trace_group_identifier
string — Groups related traces together, even across different sessions or systems. Useful for complex workflows that span multiple traces.

trace_group_identifier to multiple workflows:
thread_identifier
string — Conversation thread identifier. All spans with the same thread_identifier are grouped into the same thread.
group_identifier
string — Group identifier for related spans/logs. Use this to batch related requests together for analysis.
Other fields
Beyond the key fields above, every span also supports all span fields:| Category | Fields |
|---|---|
| Trace hierarchy | trace_unique_id, span_unique_id, span_parent_id, span_name, span_workflow_name, span_path |
| Content | input, output, model, log_type |
| Metrics | latency, cost, usage, start_time, timestamp |
| Identity | custom_identifier, environment, provider_id |