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

# Observability

> Trace Phaseo requests with Langfuse, LangSmith, OpenTelemetry, and similar tools.

Most observability tools sit above the model client. Keep your tracing setup the same, then point the underlying OpenAI-compatible or Anthropic-compatible client at Phaseo.

## Langfuse with OpenAI SDK

```bash theme={null}
pip install langfuse openai
```

```python theme={null}
import os
from langfuse.openai import openai

client = openai.OpenAI(
    api_key=os.environ["PHASEO_API_KEY"],
    base_url="https://api.phaseo.ai/v1",
)

response = client.responses.create(
    model="openai/gpt-5-nano",
    input="Reply with only: ok",
)
```

## LangSmith with LangChain

Use the [LangChain](./langchain.mdx) setup and enable LangSmith through the usual LangChain environment variables:

```bash theme={null}
export LANGSMITH_TRACING=true
export LANGSMITH_API_KEY="your_langsmith_key"
export PHASEO_API_KEY="your_phaseo_key"
```

## OpenTelemetry

If your framework emits OpenTelemetry spans, Phaseo does not require a special exporter. Add useful request context yourself:

* model id
* endpoint, such as `responses` or `chat.completions`
* Phaseo request id from response metadata or logs
* selected provider when response metadata is enabled

## Notes

* Do not send Phaseo API keys to observability tools as attributes.
* If the observability library wraps the OpenAI SDK, configure the wrapped client with `base_url: "https://api.phaseo.ai/v1"`.
* For LangChain traces, pair the tracing callback with the Phaseo `ChatOpenAI` configuration.

## Related

* [OpenAI SDK](./openai-sdk.mdx)
* [LangChain](./langchain.mdx)
* [Activity](../../api-reference/endpoint/activity.mdx)
