Skip to main content

Observability

Instrument your code with OpenTelemetry to capture traces, logs, and metrics for every LLM call, agent step, and tool use.

Observability

Getting Started

LiteLLM provides a unified interface for multiple LLM providers, enabling seamless switching between OpenAI, Anthropic, Cohere, and 100+ other providers. Tracing LiteLLM with Orq.ai gives you comprehensive insights into provider performance, cost optimization, routing decisions, and API reliability across your multi-provider setup.

Prerequisites

Before you begin, ensure you have:
  • An Orq.ai account and API Key
  • LiteLLM installed in the project
  • Python 3.8+
  • API keys for the LLM providers (OpenAI, Anthropic, Cohere, etc.)

Install Dependencies

Configure Orq.ai

Set the following environment variables to connect to the Orq.ai OpenTelemetry collector:

Integrations

litellm.callbacks = ["otel"] only emits spans when running inside LiteLLM Proxy Server. In a standalone Python script it logs a warning and skips OTel initialisation. No spans reach Orq.ai. Choose the setup that matches the environment below.
Run the LiteLLM Proxy Server with the otel callback enabled. The proxy handles all OTel export using the environment variables configured above.
1

Create config.yaml

2

Start the proxy

3

Call the proxy from application code

All LiteLLM calls will be automatically instrumented and exported to Orq.ai through the OTLP exporter. For more details, see Traces.

Examples

Basic Multi-Provider Usage
Cost Optimization with Provider Fallback

View Traces

Head to the Traces tab to view LiteLLM traces in the AI Studio. View Traces

Evaluations & Experiments

Once your agents are running, use Evaluatorq to score outputs across a dataset and Experiments to compare configurations side-by-side.

Run Evaluations with Evaluatorq

Run parallel evaluations across your agents and compare results.

Run Experiments via the API

Compare agent configurations and view results in the AI Studio.