Skip to content

OpenLIT is an open-source LLM Observability tool built on OpenTelemetry. πŸ“ˆπŸ”₯ Monitor GPU performance, LLM traces with input and output metadata, and metrics like cost, tokens, and user interactions along with complete APM for LLM Apps. πŸ–₯️

License

Notifications You must be signed in to change notification settings

ronchengang/openlit

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OpenLIT Logo

OTel-native Observability and Evals for LLMs & GPUs

Documentation | Quickstart | Python SDK

OpenLIT License Downloads GitHub Last Commit GitHub Contributors

Slack Discord X

Openlit - One click observability, evals for LLMs & GPUs | Product Hunt

OpenLIT Banner

OpenLIT is an OpenTelemetry-native tool designed to help developers gain insights into the performance of their LLM applications in production. It automatically collects LLM input and output metadata, and monitors GPU performance for self-hosted LLMs.

OpenLIT makes integrating observability into GenAI projects effortless with just a single line of code. Whether you're working with popular LLM providers such as OpenAI and HuggingFace, or leveraging vector databases like ChromaDB, OpenLIT ensures your applications are monitored seamlessly, providing critical insights including GPU performance stats for self-hosted LLMs to improve performance and reliability.

This project proudly follows the Semantic Conventions of the OpenTelemetry community, consistently updating to align with the latest standards in observability.

What is LIT?

LIT stands for Learning and Inference Tool, which is a visual and interactive tool designed for understanding AI models and visualizing data. The term LIT was introduced by Google.

⚑ Features

  • Advanced Monitoring of LLM and VectorDB Performance: OpenLIT offers automatic instrumentation that generates traces and metrics, providing insights into the performance and costs of your LLM and VectorDB usage. This helps you analyze how your applications perform in different environments, such as production, enabling you to optimize resource ussage and scale efficiently.
  • Cost Tracking for Custom and Fine-Tuned Models: OpenLIT enables you to tailor cost tracking for specific models by using a custom JSON file. This feature allows for precise budgeting and ensures that cost estimations are perfectly aligned with your project needs.
  • OpenTelemetry-native & vendor-neutral SDKs: OpenLIT is built with native support for OpenTelemetry, making it blend seamlessly with your projects. This vendor-neutral approach reduces barriers to integration, making OpenLIT an intuitive part of your software stack rather than an additional complexity.

πŸš€ Getting Started

flowchart TB;
    subgraph " "
        direction LR;
        subgraph " "
            direction LR;
            OpenLIT_SDK[OpenLIT SDK] -->|Sends Traces & Metrics| OTC[OpenTelemetry Collector];
            OTC -->|Stores Data| ClickHouseDB[ClickHouse];
        end
        subgraph " "
            direction RL;
            OpenLIT_UI[OpenLIT UI] -->|Pulls Data| ClickHouseDB;
        end
    end
Loading

Step 1: Deploy OpenLIT Stack

  1. Git Clone OpenLIT Repository

    git clone [email protected]:openlit/openlit.git
  2. Start Docker Compose

    docker-compose up -d

Step 2: Install OpenLIT SDK

Open your command line or terminal and run:

pip install openlit

Step 3: Initialize OpenLIT in your Application

Integrating OpenLIT into LLM applications is straightforward. Start monitoring for your LLM Application with just two lines of code:

import openlit

openlit.init()

To forward telemetry data to an HTTP OTLP endpoint, such as the OpenTelemetry Collector, set the otlp_endpoint parameter with the desired endpoint. Alternatively, you can configure the endpoint by setting the OTEL_EXPORTER_OTLP_ENDPOINT environment variable as recommended in the OpenTelemetry documentation.

πŸ’‘ Info: If you dont provide otlp_endpoint function argument or set the OTEL_EXPORTER_OTLP_ENDPOINT environment variable, The OpenLIT SDK directs the trace directly to your console, which can be useful during development.

To send telemetry to OpenTelemetry backends requiring authentication, set the otlp_headers parameter with its desired value. Alternatively, you can configure the endpoint by setting the OTEL_EXPORTER_OTLP_HEADERS environment variable as recommended in the OpenTelemetry documentation.

Example


Initialize using Function Arguments

Add the following two lines to your application code:

import openlit

openlit.init(
  otlp_endpoint="http://127.0.0.1:4318", 
)


Initialize using Environment Variables

Add the following two lines to your application code:

import openlit

openlit.init()

Then, configure the your OTLP endpoint using environment variable:

export OTEL_EXPORTER_OTLP_ENDPOINT = "http://127.0.0.1:4318"

Step 4: Visualize and Optimize!

With the LLM Observability data now being collected and sent to OpenLIT, the next step is to visualize and analyze this data to get insights into your LLM application's performance, behavior, and identify areas of improvement.

Just head over to OpenLIT UI at 127.0.0.1:3000 on your browser to start exploring. You can login using the default credentials

🌱 Contributing

Whether it's big or small, we love contributions πŸ’š. Check out our Contribution guide to get started

Unsure where to start? Here are a few ways to get involved:

  • Join our Slack or Discord community to discuss ideas, share feedback, and connect with both our team and the wider OpenLIT community.

Your input helps us grow and improve, and we're here to support you every step of the way.

πŸ’š Community & Support

Connect with OpenLIT community and maintainers for support, discussions, and updates:

  • 🌟 If you like it, Leave a star on our GitHub
  • 🌍 Join our Slack or Discord community for live interactions and questions.
  • 🐞 Report bugs on our GitHub Issues to help us improve OpenLIT.
  • 𝕏 Follow us on X for the latest updates and news.

License

OpenLIT is available under the Apache-2.0 license.

Visualize! Analyze! Optimize!

Join us on this voyage to reshape the future of AI Observability. Share your thoughts, suggest features, and explore contributions. Engage with us on GitHub and be part of OpenLIT's community-led innovation.

About

OpenLIT is an open-source LLM Observability tool built on OpenTelemetry. πŸ“ˆπŸ”₯ Monitor GPU performance, LLM traces with input and output metadata, and metrics like cost, tokens, and user interactions along with complete APM for LLM Apps. πŸ–₯️

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 68.7%
  • TypeScript 30.8%
  • Other 0.5%