Skip to main content
Ollama exposes an OpenAI-compatible API, so applications using the OpenAI Go SDK can call local Ollama models. Phoenix traces these calls with the OpenAI Go instrumentation.

Install

Setup

Configure an OTLP/HTTP exporter pointed at Phoenix. Create tracing.go:

Run Ollama

Start Ollama locally and pull a model, for example ollama pull llama3.2:1b. The OpenAI client requires an API key value, which a local Ollama server ignores:

Observe

Phoenix receives an LLM span for the Ollama-backed completion, including the model name and messages.

Resources