Ollama (tracing)
Ollama (tracing)
Ollama lets you run large language models locally. respan-instrumentation-ollama instruments the official Ollama Python client and emits chat, generation, and embedding spans into the Respan tracing pipeline.
Set up Respan
- Sign up - Create an account at platform.respan.ai
- Create an API key - Generate one on the API keys page
Use Respan Gateway
See Ollama gateway setup to route Ollama model calls through the Respan gateway.
Example projects
Setup
Configuration
OllamaInstrumentor() does not require additional arguments. It patches the official Ollama Client and AsyncClient chat, generate, embed, and embeddings methods.
Attributes
Attach customer identifiers, thread IDs, workflow names, and metadata to Ollama calls with propagate_attributes.