Langfuse traces LLM calls into a self-hosted or cloud observability layer. Its OpenAI wrapper handles base URLs natively, so AIgateway calls show up in Langfuse traces with cost, latency, and token attribution preserved.
langfuse.openai.OpenAI is a drop-in replacement that traces every call. Configure it with AIgateway's base URL + key; Langfuse traces still write to your Langfuse host with full request/response capture.
Standard Langfuse setup — host, public key, secret. Your AIgateway calls appear in the Langfuse UI with model name, cost, tokens, latency.