For the complete documentation index, see llms.txt. Markdown versions are available by appending .md to documentation URLs.

LiteLLM Observability & Monitoring with OpenTelemetry

SigNoz Cloud - This page applies to SigNoz Cloud editions.
Self-Host - This page applies to self-hosted SigNoz editions.

What is LiteLLM Observability?

LiteLLM observability with OpenTelemetry captures traces, logs, and metrics from the LiteLLM SDK and Proxy Server. This guide shows you how to instrument LiteLLM and send telemetry to SigNoz. In SigNoz, you see model performance, request and response details, latency, error rates, and usage trends.

In SigNoz, you can correlate traces, logs, and metrics on dashboards and set alerts on LiteLLM data.

LiteLLM v1.105.0 and later include a signoz callback. You configure it with two environment variables or in the LiteLLM Admin UI. The callback sends traces only. To also send logs and metrics, use the OpenTelemetry steps in this guide.

Prerequisites

  • A SigNoz Cloud account with an active ingestion key
  • Internet access to send telemetry data to SigNoz Cloud
  • LiteLLM SDK or Proxy integration
  • LiteLLM v1.105.0 or later, if you use the signoz callback
  • For Python: pip. A Python virtual environment is optional.

Instrument LiteLLM with OpenTelemetry

You can monitor LiteLLM in two ways. The LiteLLM SDK runs inside your Python application. The LiteLLM Proxy Server is a separate gateway that routes LLM requests for your applications.

For more information about SDK instrumentation, see the LiteLLM OpenTelemetry integration docs.

Use no-code auto-instrumentation for a quick setup. You do not change your application code.

Step 1: Install these packages in your Python environment.

pip install \
  opentelemetry-api \
  opentelemetry-distro \
  opentelemetry-exporter-otlp \
  httpx \
  opentelemetry-instrumentation-httpx \
  litellm

Step 2: Install the automatic instrumentation libraries:

opentelemetry-bootstrap --action=install

Step 3: Instrument your LiteLLM SDK application

Set litellm.callbacks = ["otel"] to turn on LiteLLM SDK instrumentation. Set it before your first LiteLLM call:

from litellm import litellm
 
litellm.callbacks = ["otel"]

LiteLLM then sends traces, logs, and metrics for all SDK calls in your application.

Step 4: Run an example

from litellm import completion, litellm
 
litellm.callbacks = ["otel"]
 
response = completion(
  model="openai/gpt-4o",
  messages=[{ "content": "What is SigNoz","role": "user"}]
)
 
print(response)

LiteLLM supports many model providers. This example uses OpenAI. Before you run it, set the OPENAI_API_KEY environment variable.

Step 5: Run your application with auto-instrumentation

OTEL_RESOURCE_ATTRIBUTES="service.name=<service_name>" \
OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.<region>.signoz.cloud:443" \
OTEL_EXPORTER_OTLP_HEADERS="signoz-ingestion-key=<your-ingestion-key>" \
OTEL_EXPORTER_OTLP_PROTOCOL=grpc \
OTEL_TRACES_EXPORTER=otlp \
OTEL_METRICS_EXPORTER=otlp \
OTEL_LOGS_EXPORTER=otlp \
OTEL_PYTHON_LOG_CORRELATION=true \
OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true \
OTEL_PYTHON_DISABLED_INSTRUMENTATIONS=openai \
opentelemetry-instrument <your_run_command>

OTEL_PYTHON_DISABLED_INSTRUMENTATIONS=openai turns off the OpenAI instrumentor. This prevents conflicts with the built-in LiteLLM instrumentation.

Verify these values:

  • <service_name>: The name of your service.
  • <region>: Your SigNoz Cloud region.
  • <your-ingestion-key>: Your SigNoz ingestion key.
  • <your_run_command>: The command that starts your application, for example python main.py.

View LiteLLM Traces, Logs, and Metrics in SigNoz

After you finish the setup, your LiteLLM application sends traces, logs, and metrics to SigNoz.

To see LiteLLM traces, open Traces in SigNoz:

LiteLLM Trace View
LiteLLM SDK Trace View

Click a trace to see its spans, with their events and attributes.

LiteLLM Detailed Trace View
LiteLLM SDK Detailed Trace View

To see LiteLLM logs, open Logs in SigNoz. To see the logs for one trace, click Related Logs in the trace view:

Related logs
Related logs button
LiteLLM Logs View
LiteLLM SDK Logs View

Click a log to see its attributes:

LiteLLM Detailed Log View
LiteLLM SDK Detailed Logs View

To see LiteLLM metrics, open Metrics in SigNoz:

LiteLLM Metrics View
LiteLLM SDK Metrics View

Click a metric to see its attributes:

LiteLLM Detailed Metrics View
LiteLLM SDK Detailed Metrics View

LiteLLM SDK Observability Dashboard

The LiteLLM SDK Dashboard template has charts for LLM usage. Its page shows how to import the template.

LiteLLM SDK Dashboard
LiteLLM SDK Dashboard Template

Troubleshooting

No traces in SigNoz with the signoz callback

  1. Make sure that you set SIGNOZ_INGESTION_ENDPOINT in the environment of the proxy or the SDK app. If it is missing, LiteLLM logs SIGNOZ_INGESTION_ENDPOINT not found in environment variables.
  2. Make sure that the callbacks list does not also contain otel. Remove one of the two callbacks.
  3. In an SDK app, make sure that no other code sets a global OpenTelemetry tracer provider, for example opentelemetry-instrument. If one exists, use the OpenTelemetry steps instead of the signoz callback.
  4. If the logs show Failed to export batch code: 401, make sure that the ingestion key is correct and has no quotes around it.

These guides cover the model providers behind LiteLLM and the apps in front of it:

Browse all LLM observability integrations to instrument the rest of your stack.

Is this page helpful

Last updated—October 13, 2026

Edit on GitHub