> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sazabi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Respan

> Point the Respan SDK at your Sazabi intake URL to stream auto-instrumented LLM and agent traces into Sazabi.

[All Respan integration capabilities](https://docs.sazabi.com/catalogs/integrations/respan)

## About

Stream Respan LLM traces — LLM calls, agent runs, and tool calls — into Sazabi. The [Respan](https://respan.ai) SDK (`respan-ai` / `@respan/respan`) auto-instruments popular LLM and agent frameworks and sends spans to Sazabi over OTLP. If you already send OpenTelemetry, you can instead point an existing OTLP trace exporter at Sazabi — this source accepts both the Respan SDK's `/api/v2/traces` path and the standard OTLP `/v1/traces` path.

## Prerequisites

* A Python or TypeScript application using LLM or agent frameworks supported by the Respan SDK (OpenAI, Anthropic, Bedrock, Vertex, LangChain, and more).
* Your Sazabi intake URL (shown above).

## Set up in the dashboard

**Step 1**

### Set your Respan base URL

Set `RESPAN_BASE_URL` to your intake URL (shown above) in the app you want to trace. You can also pass it directly to the SDK constructor.

**Step 2**

### Install the Respan SDK

```bash theme={"system"}
# Python
pip install respan-ai

# TypeScript
npm install @respan/respan
```

The Respan SDK auto-instruments supported LLM and agent frameworks (OpenAI, Anthropic, Bedrock, Vertex, LangChain, and more).

**Step 3**

### Initialize the SDK

**Python**

```python theme={"system"}
from respan import Respan

# Send Respan's auto-instrumented spans to Sazabi.
# You can also set RESPAN_BASE_URL in the environment instead of passing base_url.
Respan(base_url="<your intake URL>")

# All supported LLM and agent calls are now auto-traced and exported to Sazabi.
```

**TypeScript**

```typescript theme={"system"}
import { Respan } from "@respan/respan";

// Send Respan's auto-instrumented spans to Sazabi.
// You can also set RESPAN_BASE_URL in the environment instead of passing baseURL.
const respan = new Respan({
  baseURL: "<your intake URL>",
});
await respan.initialize();

// All supported LLM and agent calls are now auto-traced and exported to Sazabi.
```

The SDK sends its auto-instrumented spans to Sazabi over OTLP/HTTP — you do not need a separate OpenTelemetry exporter.

Using an agent framework? Pass the matching instrumentor (for example `Respan({ instrumentations: [...] })`) exactly as you would when exporting to Respan's own backend — only the base URL changes.

> [!WARNING]
>
> Already sending OpenTelemetry directly (or running an OpenTelemetry
> Collector)? Skip the Respan SDK and point your existing OTLP/HTTP trace
> exporter at the same host with the standard `/v1/traces` path (http/json or
> http/protobuf). This source accepts both the Respan SDK's `/api/v2/traces`
> path and the standard OTLP `/v1/traces` path.

**Step 4**

### Redeploy and verify

Redeploy or restart the service so it picks up the new configuration.

**Step 5**

### Hand off the change

Commit these changes on a new branch, push it, and open a pull request. Keep the intake URL and any keys in environment variables or a secret store, and commit only configuration that references them.

## Set up with the CLI

You can also register the Respan log source with the [Sazabi CLI](https://docs.sazabi.com/reference/cli.md) (installed and authenticated — see [CLI reference](https://docs.sazabi.com/reference/cli/log-sources.md)).

Registering the source mints the same intake URL the dashboard shows above (the public key is embedded in its hostname):

```bash theme={"system"}
sazabi log-sources create respan --mode manual
```

The command prints the intake URL for the new source — copy the whole URL and point your sender at it using the configuration shown above. Run `sazabi log-sources get <log-source-id>` at any time to reprint the endpoint, or `sazabi log-sources list` to see every log source in the project.

## Verify

Run an LLM or agent workload. Open the [Intake page](https://docs.sazabi.com/guides/instrument/intake.md) in the Sazabi dashboard and confirm traces from the **Respan** source appear. Records typically arrive within a minute or two of the run.

## Troubleshooting

**No traces appear** — Confirm `RESPAN_BASE_URL` is set in the process environment (or passed directly to the constructor) before calling any instrumented LLM or agent methods. Check for initialization errors logged by the SDK at startup.

**Metrics are not stored** — Sazabi drops any OTLP metrics sent to this endpoint. Use the OpenTelemetry Metrics source for metrics.

## Further reading

> [card] [Intake](https://docs.sazabi.com/guides/instrument/intake.md)
>
> See per-source ingestion volume and health in the Intake page.

> [card] [Instrument](https://docs.sazabi.com/guides/instrument.md)
>
> Learn how to send data to Sazabi.

> [card] [Log sources](https://docs.sazabi.com/catalogs/log-sources.md)
>
> Browse the full log source catalog.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.