litellm/integrations/levo/README.md
This integration enables sending LLM observability data to Levo AI using OpenTelemetry (OTLP) protocol.
The Levo integration extends LiteLLM's OpenTelemetry support to automatically send traces to Levo's collector endpoint with proper authentication and routing headers.
x-levo-organization-id and x-levo-workspace-id for routingcallbacks: ["levo"] in your LiteLLM configuv add opentelemetry-api opentelemetry-sdk opentelemetry-exporter-otlp-proto-http opentelemetry-exporter-otlp-proto-grpc
Add to your litellm_config.yaml:
litellm_settings:
callbacks: ["levo"]
export LEVOAI_API_KEY="<your-levo-api-key>"
export LEVOAI_ORG_ID="<your-levo-org-id>"
export LEVOAI_WORKSPACE_ID="<your-workspace-id>"
export LEVOAI_COLLECTOR_URL="<your-levo-collector-url>"
litellm --config config.yaml
All LLM requests will now automatically be sent to Levo!
| Variable | Description |
|---|---|
LEVOAI_API_KEY | Your Levo API key for authentication |
LEVOAI_ORG_ID | Your Levo organization ID for routing |
LEVOAI_WORKSPACE_ID | Your Levo workspace ID for routing |
LEVOAI_COLLECTOR_URL | Full collector endpoint URL from Levo support |
| Variable | Description | Default |
|---|---|---|
LEVOAI_ENV_NAME | Environment name for tagging traces | None |
Important: The LEVOAI_COLLECTOR_URL is used exactly as provided. No path manipulation is performed.
OpenTelemetry classget_levo_config()Authorization: Bearer {LEVOAI_API_KEY}x-levo-organization-id: {LEVOAI_ORG_ID}x-levo-workspace-id: {LEVOAI_WORKSPACE_ID}litellm/integrations/levo/
├── __init__.py # Exports LevoLogger
├── levo.py # LevoLogger implementation
└── README.md # This file
OpenTelemetry, handles Levo-specific configurationlevo.py)See the test files in tests/test_litellm/integrations/levo/:
test_levo.py: Unit tests for configurationtest_levo_integration.py: Integration tests for callback registrationThe integration validates all required environment variables at initialization:
LEVOAI_API_KEY: Raises ValueError with clear messageLEVOAI_ORG_ID: Raises ValueError with clear messageLEVOAI_WORKSPACE_ID: Raises ValueError with clear messageLEVOAI_COLLECTOR_URL: Raises ValueError with clear messageThe Levo callback is registered in:
litellm/litellm_core_utils/custom_logger_registry.py: Maps "levo" to LevoLoggerlitellm/litellm_core_utils/litellm_logging.py: Instantiates LevoLogger when callbacks: ["levo"] is usedlitellm/__init__.py: Added to _custom_logger_compatible_callbacks_literalFor detailed documentation, see:
For issues or questions: