Skip to main content
LangWatch supports tracing Anthropic Claude API calls using the same otelopenai middleware used for OpenAI. Configure the client to point to Anthropic’s API endpoint.

Installation

Usage

Set LANGWATCH_API_KEY and ANTHROPIC_API_KEY environment variables before running.
The defer tp.Shutdown(ctx) call is essential. Without it, traces buffered in memory will be lost when your application exits.