Available via: OpenTelemetry auto-instrumentation (Python). This is not a Zespan SDK wrapper — see Send traces from any OTel-instrumented app for how the underlying endpoint works.
opentelemetry-instrumentation-ollama package patches the official Ollama Python client to emit OTel spans for every call — point the exporter at Zespan and traces show up with no code changes to your Ollama calls themselves.
Installation
Setup
Example
Any call through the Ollama client —chat(), generate(), embeddings() — is traced automatically after .instrument() runs. No wrapping, no per-call changes.
What gets captured
By default this instrumentation logs prompts, completions, and token counts as span attributes, mapped through the standard OpenTelemetry GenAI semantic conventions Zespan reads. SetTRACELOOP_TRACE_CONTENT=false to disable prompt/completion capture if you only want metadata (latency, tokens, model) — useful if your local models handle sensitive content you don’t want persisted.
