Tracing quickstart

Get your first trace in Respan in 5 minutes.

Tracing captures every step of your AI app end-to-end (LLM calls, tool invocations, retrieval steps, and agent loops) so you can debug failures, track cost and latency, and review actual prompts and outputs. Respan auto-instruments 25+ frameworks through the SDK and visualizes each request as a nested trace tree on the platform.

Respan trace tree visualization showing nested LLM calls, tool invocations, and agent steps.

Setup

1. Get your Respan API key

Create an account on Respan, then generate a key on the API keys page.

$export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"

Environment management: create separate API keys for test and production instead of toggling an env parameter. Cleaner separation, better security.


2. Instrument your app

Wire the Respan SDK into your project. Pick the path that fits your workflow.

The fastest way. The Respan CLI hands off to your coding agent (Claude Code, Cursor, Codex, and others), which detects your project language, installs the SDK, and instruments your code.

$npx @respan/cli setup

It also creates a Respan API key for you and prints an export RESPAN_API_KEY=<key> command to run in your shell if one isn’t already set.


3. View traces

Once instrumented, your app logs traces to Respan for every AI call. Open the dashboard to see them.

Or try it live without installing anything.


Next steps

You’re tracing your app. Here’s what else Respan tracing gives you.

What tracing provides

Examples