Skip to content

LiteLLM → SigNoz OTel Integration

This page describes the changes needed to send LiteLLM traces, metrics, and logs to SigNoz.

Who does this: MLOps team (they own the LiteLLM deployment in the foundry namespace).


What to Add

Add the following environment variables to the LiteLLM Helm values (under extraEnvVars:):

extraEnvVars:
  # --- existing vars (keep as-is) ---
  - name: DISABLE_SCHEMA_UPDATE
    value: "true"
  - name: SSL_CERT_FILE
    value: /etc/ssl/internal/ca.pem
  - name: REQUESTS_CA_BUNDLE
    value: /etc/ssl/internal/ca.pem
  - name: LITELLM_LOCAL_MODEL_COST_MAP
    value: "True"
  - name: LITELLM_DONT_SHOW_FEEDBACK_BOX
    value: "True"

  # --- ADD THESE (OTel → SigNoz) ---
  - name: OTEL_EXPORTER_OTLP_ENDPOINT
    value: "http://signoz-otel-collector.signoz.svc.cluster.local:4317"
  - name: OTEL_EXPORTER_OTLP_PROTOCOL
    value: "grpc"
  - name: OTEL_SERVICE_NAME
    value: "litellm"
  - name: OTEL_RESOURCE_ATTRIBUTES
    value: "deployment.environment=mod-auh1-dev-ask"
  - name: OTEL_TRACES_EXPORTER
    value: "otlp"
  - name: OTEL_METRICS_EXPORTER
    value: "otlp"
  - name: OTEL_LOGS_EXPORTER
    value: "otlp"

What This Does

Env Var Purpose
OTEL_EXPORTER_OTLP_ENDPOINT Sends all OTel data to SigNoz collector (gRPC port 4317)
OTEL_SERVICE_NAME Identifies LiteLLM as litellm in SigNoz Services tab
OTEL_RESOURCE_ATTRIBUTES Tags all data with the environment name
OTEL_TRACES_EXPORTER Enables distributed traces (per-request spans)
OTEL_METRICS_EXPORTER Enables metrics (latency, throughput, error rates)
OTEL_LOGS_EXPORTER Enables log forwarding

LiteLLM has built-in OTel support — no code changes required, only these env vars.


SigNoz Endpoint

Endpoint Protocol Port Use
signoz-otel-collector.signoz.svc.cluster.local:4317 gRPC 4317 Traces, Metrics, Logs (use this)
signoz-otel-collector.signoz.svc.cluster.local:4318 HTTP 4318 Alternative if gRPC blocked

Note: Use port 4317 (gRPC) with OTEL_EXPORTER_OTLP_PROTOCOL: grpc. Do NOT use port 4318 with the gRPC protocol — they are incompatible.


Verify After Deployment

Once the values are applied and LiteLLM pods restart:

# Check LiteLLM pod is running
kubectl get pods -n foundry -l app.kubernetes.io/name=litellm-helm

# Verify env vars are present
kubectl exec -n foundry deploy/foundry-litellm -- env | grep OTEL

Then in SigNoz UI (https://signoz.ask.mod.auh1.dev.dir):

  • Services tab → litellm should appear within a few minutes of first traffic
  • Traces tab → filter by service.name = litellm
  • Metrics tab → search for litellm_* metrics

Contact

SigNoz is deployed in the signoz namespace on the same cluster. The OTel collector endpoint is internal cluster DNS — no firewall rules needed.