OpenLIT: OpenTelemetry-native AI Observability and Evaluation Framework

Jul 10, 2025

Introduction

Developers building Generative AI applications often struggle with the “black box” nature of Large Language Models (LLMs), where unpredictable outputs and hidden costs make production deployment risky. OpenLIT is an open-source, OpenTelemetry-native observability framework that eliminates this opacity by providing full-stack monitoring for LLMs, vector databases, and GPUs. With over 2,600 GitHub stars, OpenLIT allows engineers to transition from experimental prompts to production-ready AI features with confidence by tracking every token, latency spike, and model failure in real-time.

What Is OpenLIT?

OpenLIT is an open-source AI engineering platform that provides OpenTelemetry-native observability, GPU monitoring, and evaluation guardrails for Generative AI applications. It is designed to sit between your application and LLM providers, capturing prompts, responses, latency, token usage, and costs without requiring extensive code changes.

Built primarily in TypeScript and licensed under the Apache License 2.0, OpenLIT provides vendor-neutral SDKs for Python, TypeScript, and Go. By adhering to OpenTelemetry semantic conventions, it ensures that AI telemetry data can be exported to any OTLP-compatible backend, preventing vendor lock-in and allowing teams to use their existing observability stacks (such as Grafana, Prometheus, or Jaeger) alongside OpenLIT’s own analytics dashboard.

Why OpenLIT Matters

Traditional observability tools were built for microservices and structured logs, not for the non-deterministic nature of LLMs. The gap OpenLIT fills is the need for a unified layer that understands AI-specific metrics—such as token counts, prompt versioning, and hallucination detection—while remaining compatible with industry-standard telemetry protocols.

For developers, this means no longer having to choose between a proprietary SaaS observability tool and a fragmented set of custom logs. OpenLIT’s traction, evidenced by its growing community and integration with frameworks like CrewAI and Agno, shows a shift toward “instrument once, export anywhere” philosophy in AI engineering. It allows teams to maintain data residency by self-hosting the platform while gaining the deep insights needed to optimize model performance and reduce operational costs.

Investing time in OpenLIT now is critical because as AI agents become more complex (multi-step reasoning, tool use), the ability to trace a single user request across multiple LLM calls and vector database retrievals becomes the only way to debug effectively. OpenLIT provides this trace-level visibility that is essential for moving AI from a demo to a reliable product.

Key Features

OpenLIT provides a comprehensive suite of tools for the entire AI lifecycle, from experimentation to production monitoring.

Observability and Monitoring

  • OpenTelemetry-native SDKs: Vendor-neutral SDKs for Python, TypeScript, and Go that send traces and metrics to any OTLP-compatible tool, ensuring you are never locked into a single provider.
  • Auto-Instrumentation: Integrate with over 50 LLM providers, vector databases, and GPUs with a single line of code, drastically reducing the manual effort required to set up monitoring.
  • Analytics Dashboard: A dedicated UI to monitor AI application health, tracking metrics, costs, and user interactions to provide a clear view of overall efficiency.
  • GPU Monitoring: Full-stack visibility into GPU resource utilization, allowing developers to correlate model latency with hardware performance.
  • Exceptions Monitoring: A specialized dashboard to quickly spot and resolve common exceptions and errors, reducing the Mean Time to Recovery (MTTR).

Evaluation and Guardrails

  • 11 Built-in Evaluation Types: Automated LLM-as-a-Judge evaluations for hallucination, bias, toxicity, safety, instruction following, completeness, conciseness, sensitivity, relevance, coherence, and faithfulness detection.
  • Context-Aware Evaluation: An evaluation engine that treats the provided context as the source of truth to detect hallucinations and ensure factual accuracy.
  • Rule Engine: A conditional logic system (AND/OR) to match runtime trace attributes and dynamically retrieve contexts, prompts, and evaluation configurations.
  • Prompt Management (Prompt Hub): A centralized system to manage and version prompts, ensuring consistency across different environments and applications.
  • Security Scanning: Built-in capabilities to detect potential threats such as profanity, PII leaks, and prompt injection attacks.
  • Cost Tracking: Precise budgeting for custom and fine-tuned models using custom pricing files to avoid unexpected API bills.

How OpenLIT Compares

OpenLIT competes in the crowded LLM observability space against tools like LangSmith and Arize Phoenix. While many tools offer tracing, the primary differentiator for OpenLIT is its strict adherence to the OpenTelemetry (OTel) standard, which allows for complete vendor neutrality.

Feature OpenLIT LangSmith Arize Phoenix
OpenTelemetry Native Yes (Full) Partial / Proprietary Yes (OpenInference)
Licensing Apache 2.0 Proprietary Apache 2.0
Self-Hosting Yes Paid Tier Yes
GPU Monitoring Yes No No
Prompt Management Yes Yes Limited

The tradeoff is that while LangSmith provides a more polished, integrated experience for those already deep in the LangChain ecosystem, OpenLIT is the superior choice for teams that prioritize open standards and infrastructure flexibility. Arize Phoenix is a strong open-source alternative, but OpenLIT’s inclusion of GPU monitoring and a more robust prompt management system (Prompt Hub) makes it more comprehensive for full-stack AI engineering.

For teams that cannot afford vendor lock-in or have strict data residency requirements, OpenLIT’s Apache 2.0 license and self-hosting capabilities make it the most sustainable long-term architectural choice.

Getting Started: Installation

OpenLIT can be deployed as a full platform or used as a lightweight SDK to send data to existing tools.

Deploying the OpenLIT Platform

The fastest way to get the full dashboard and analytics is via Docker Compose:

git clone https://github.com/openlit/openlit.git
cd openlit
docker-compose up -d

Once deployed, the dashboard is accessible at http://127.0.0.1:3000 with default credentials (username: user@openlit.io, password: openlituser).

Installing the SDKs

Depending on your language, install the appropriate SDK:

Python

pip install openlit

TypeScript/JavaScript

npm install @openlit/sdk

Go

OpenLIT provides a Go SDK for high-performance AI services.

Prerequisites

Ensure you have Docker and Docker Compose installed for the platform deployment. For SDKs, Python 3.8+ or Node.js 16+ is recommended.

How to Use OpenLIT

The core value of OpenLIT is its “one line of code” integration. Once the SDK is installed, you simply initialize it at the start of your application.

OpenLIT automatically intercepts calls to supported LLM providers (like OpenAI, Anthropic, and others) and vector databases. It captures the input prompt, the output response, and the metadata associated with the call, such as token usage and latency.

If you are using a self-hosted OpenLIT instance, the SDK will send the telemetry data to your instance. If you are using an external OTLP receiver (like Grafana Cloud), you can configure the endpoint via environment variables.

Code Examples

Below are examples of how to integrate OpenLIT into your AI application.

Basic Python Integration

This is the simplest possible setup to start monitoring your LLM calls.

import openlit

# Initialize OpenLIT
openlit.init()

# Your existing LLM call (e.g., using OpenAI)
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
  model="gpt-4o",
  messages=[{"role": "user", "content": "Hello, OpenLIT!"}]
)
# OpenLIT automatically captures this call

The openlit.init() call intercepts the lauch of the LLM provider’s SDK, wrapping the call and capturing the telemetry data without requiring you to change your existing business logic.

Advanced Configuration for External Backends

If you are sending data to a specific OTLP endpoint, such as Grafana Cloud, you can specify the endpoint during initialization.

import openlit

# Initialize OpenLIT with a custom OTLP endpoint
openlit.init(otlp_endpoint="https://otlp-gateway-region.grafana.net/otlp")

# Your AI application logic

This allows you to unify your AI observability with your rest of your infrastructure monitoring in a single pane of glass.

Advanced Configuration

OpenLIT allows for deep customization of how telemetry is captured and sampled. You can configure the telemetry destination and service identification through environment variables, which is the standard OpenTelemetry way of managing configuration.

For production environments, it is recommended to use the following environment variables to identify your service and environment:

# Identify your service and environment
export OTEL_SERVICE_NAME="ai-agent-service"
export OTEL_DEPLOYMENT_ENVIRONMENT="production"

# Configure the OTLP endpoint
export OTEL_EXPORTER_OTLP_ENDPOINT="http://your-openlit-host:4318"
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Basic <your-base64-credentials>"

Additionally, you can provide custom pricing files to the OpenLIT platform to accurately track costs for fine-tuned models or locally hosted models (like those running on vLLM or Ollama) that have different cost structures than the standard API providers.

Real-World Use Cases

OpenLIT provides immediate value in several common AI engineering scenarios:

  • Debugging Complex AI Agents: When a multi-step agent fails, OpenLIT’s trace-level visibility allows you to see exactly which tool call or LLM step failed, identifying if the problem was a prompt issue, a tool output, or a model hallucination.
  • Cost Optimization: By tracking token usage across different models and users, teams can identify the most expensive prompts and optimize them to reduce costs without sacrificing quality.
  • Production Guardrails: Using the built-in evaluation types, teams can set up automated checks for toxicity and PII leaks, ensuring that the AI application remains safe and compliant in production.
  • Hardware Performance Correlation: For teams hosting their own models, OpenLIT’s GPU monitoring allows them to correlate a spike in latency with GPU memory pressure or utilization, distinguishing between model-related and infrastructure-related performance issues.

Contributing to OpenLIT

OpenLIT is an open-source project that welcomes contributions from the community. You can contribute by reporting bugs, suggesting new features, or contributing code through the standard GitHub flow.

The project maintains a CONTRIBUTING.md file that outlines the guidelines for forking the repository, creating feature branches, and submitting pull requests. Developers are encouraged to report issues via GitHub Issues to help the project grow.

To get started, you can find “good first issues” on GitHub to help you integrate new LLM providers or add new evaluation metrics.

Community and Support

OpenLIT provides several official channels for the community to gather and support each other:

  • GitHub Discussions: The primary place for architectural questions and feature requests.
  • Slack Community: A dedicated Slack channel for real-time support and developer discussions.
  • Official Documentation: A comprehensive guide available at docs.openlit.io.
  • GitHub Repository: The source of truth for the source code and source of truth for the latest updates.

Conclusion

OpenLIT is the right choice for teams that want to professionalize their AI observability without sacrificing control. By building on the OpenTelemetry standard, it provides a vendor-neutral foundation that allows you to monitor everything from the GPU to the prompt, and from the cost to the hallucination. It is particularly well-suited for teams with strict data residency requirements or those who prefer self-hosting their infrastructure.

While proprietary tools may offer a slightly more integrated “out-of-the-box” experience, the long-term architectural benefit of using an OTel-native tool prevents the costly and costly re-instrumentation of your application as the AI observability landscape evolves.

Star the repo, try the quickstart, and join the community to start building more reliable AI applications.

What is OpenLIT and what problem does it solve?

OpenLIT is an open-source, OpenTelemetry-native observability framework for AI applications. It solves the “black box” problem of LLMs by providing full-stack monitoring for prompts, responses, token usage, and GPU utilization, allowing developers to debug and optimize AI agents and RAG pipelines.

How do I install OpenLIT?

You can install the OpenLIT SDK via pip for Python (pip install openlit) or npm for TypeScript (npm install @openlit/sdk). To deploy the full analytics dashboard, you can use Docker Compose by cloning the repository and running docker-compose up -d.

How does OpenLIT compare to LangSmith?

The primary difference is that OpenLIT is fully open-source (Apache 2.0) and OpenTelemetry-native, meaning it can export data to any OTLP-compatible backend. LangSmith is a proprietary tool with tighter integration into the LangChain ecosystem but potentially higher vendor lock-in.

Can I use OpenLIT for monitoring local LLMs like Ollama?

Yes, OpenLIT can monitor local LLMs. By using custom pricing files and the OpenTelemetry protocol, you can track the performance and latency of locally hosted models, though you not need to pay for API tokens.

Is OpenLIT free to use?

OpenLIT is licensed under the Apache License 2.0, which means it is free to use, self-host, and modify for both personal and commercial projects.

Does OpenLIT support GPU monitoring?

Yes, OpenLIT provides dedicated GPU monitoring capabilities, allowing developers to correlate hardware resource utilization with model performance and latency spikes.

Does OpenLIT provide automated evaluations?

Yes, OpenLIT includes 11 built-in evaluation types, including hallucination and toxicity detection, using an LLM-as-a-Judge approach to automate the quality assurance of AI outputs.

Can I export OpenLIT data to Grafana?

Yes, because OpenLIT is OpenTelemetry-native, you can send traces and metrics directly to any OTLP receiver, including Grafana Cloud, Prometheus, and Jaeger.

What languages does OpenLIT support?

OpenLIT supports Python, TypeScript, and Go through its dedicated SDKs.

What is the OpenLIT Prompt Hub?

The OpenLIT Prompt Hub is a centralized system for managing and versioning prompts, ensuring that the same prompt version is used across different environments and others of the AI application.