Monitor llmman using OpenTelemetry
Shield360 uses OpenTelemetry Auto-Instrumentation to help you monitor LLM applications built using models served by llmman. This includes tracking performance, token usage, and how users interact with the application.
llmman is a local model runner that serves the Ollama API (alongside OpenAI- and Anthropic-compatible ones) on port 17434. There is no dedicated llmman client library: applications talk to it through the Ollama or OpenAI SDKs, so Shield360’s existing Ollama and OpenAI instrumentations pick it up automatically once the client is pointed at http://localhost:17434.
The integration is compatible with
- Ollama Python SDK client
>=0.2.0 - Ollama TypeScript/JavaScript SDK client
>=0.5.0 - OpenAI Python SDK client
>=1.92.0 - OpenAI TypeScript SDK client
>=1.13.0
Get started
Section titled “Get started”Open your command line or terminal and run:
pip install shield360npm install shield360Perfect for existing applications - no code modifications needed:
# Configure via CLI argumentsshield360-instrument \ --service-name my-ai-app \ --environment production \ --otlp-endpoint YOUR_OTEL_ENDPOINT \ python your_app.py# Configure via environment variablesexport OTEL_SERVICE_NAME=my-ai-appexport OTEL_DEPLOYMENT_ENVIRONMENT=productionexport OTEL_EXPORTER_OTLP_ENDPOINT=YOUR_OTEL_ENDPOINT
# Run with zero code changesshield360-instrument python your_app.pyimport shield360
shield360.init(otlp_endpoint="YOUR_OTEL_ENDPOINT")Add the following two lines to your application code:
import shield360
shield360.init()Then, configure the your OTLP endpoint using environment variable:
export OTEL_EXPORTER_OTLP_ENDPOINT=YOUR_OTEL_ENDPOINTimport shield360 from "shield360"
shield360.init({ otlpEndpoint: "YOUR_OTEL_ENDPOINT" })Add the following two lines to your application code:
import shield360 from "shield360"
shield360.init()Then, configure the your OTLP endpoint using environment variable:
export OTEL_EXPORTER_OTLP_ENDPOINT=YOUR_OTEL_ENDPOINTReplace: YOUR_OTEL_ENDPOINT with the URL of your OpenTelemetry backend, such as http://127.0.0.1:4318 if you are using Shield360 and a local OTel Collector.
To send metrics and traces to other Observability tools, refer to the supported destinations.
For more advanced configurations and application use cases, visit the SDK configuration reference or TypeScript SDK reference.
Start the server with llmman serve and pull a model with llmman pull gemma4. Then configure the SDK you already use to talk to http://localhost:17434 instead of Ollama’s default http://localhost:11434. No API key is required; if a client insists on one, any placeholder works.
import ollamaimport shield360
shield360.init(otlp_endpoint="http://127.0.0.1:4318")
client = ollama.Client(host="http://localhost:17434")response = client.chat(model="gemma4", messages=[ {"role": "user", "content": "Why is the sky blue?"},])from openai import OpenAIimport shield360
shield360.init(otlp_endpoint="http://127.0.0.1:4318")
client = OpenAI(base_url="http://localhost:17434/v1", api_key="llmman")response = client.chat.completions.create( model="gemma4", messages=[{"role": "user", "content": "Why is the sky blue?"}],)import Shield360 from "shield360"
Shield360.init({ otlpEndpoint: "http://127.0.0.1:4318" })
async function main() { const { Ollama } = await import("ollama"); const ollama = new Ollama({ host: "http://localhost:17434" }); const response = await ollama.chat({ model: "gemma4", messages: [{ role: "user", content: "Why is the sky blue?" }], });
console.log(response);}
main();import Shield360 from "shield360"
Shield360.init({ otlpEndpoint: "http://127.0.0.1:4318" })
async function main() { const OpenAI = await import("openai").then((e) => e.default); const client = new OpenAI({ baseURL: "http://localhost:17434/v1", apiKey: "llmman" }); const response = await client.chat.completions.create({ model: "gemma4", messages: [{ role: "user", content: "Why is the sky blue?" }], });
console.log(response);}
main();