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

ThomasVitale/openlit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

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

Repository files navigation

Doku Logo

OpenTelemetry-native LLM Application Observability

Documentation | Quickstart | Python SDK

OpenLIT License Downloads GitHub Last Commit GitHub Contributors

Slack X

OpenLIT is an OpenTelemetry-native GenAI and LLM Application Observability tool. It's designed to make the integration process of observability into GenAI projects as easy as pie – literally, with just a single line of code. Whether you're working with popular LLM Libraries such as OpenAI and HuggingFace or leveraging vector databases like ChromaDB, OpenLIT ensures your applications are monitored seamlessly, providing critical insights 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 Interpretability Tool. It refers to a visual, interactive model-understanding and data visualization tool ad a term introduced by Google.

Features

  • OpenTelemetry-native: Native support ensures that integrating OpenLIT into your projects feels more like a natural extension rather than an additional layer of complexity.
  • Granular Usage Insights of your LLM Applications: Assess your LLM's performance and costs with fine-grained control, breaking down metrics by environment (such as staging or production) or application, to optimize for efficiency and scalability.
  • Vendor-Neutral SDKs: In the spirit of OpenTelemetry, OpenLIT's SDKs are agnostic of the backend vendors. This means you can confidently use OpenLIT with various telemetry backends, like Grafana Tempo, without worrying about compatibility issues.

πŸš€ Getting Started

Step 1: Install OpenLIT SDK

pip install openlit

Step 2: Instrument your Application

Integrating the OpenLIT into LLM applications is straightforward. Start monitoring for your LLM Application with just one line of code:

import openlit

openlit.init()

This will Auto instrument you code for collecting LLM Observability data.

Step 2: Send Telemetry to OTLP Backend

By default, OpenLIT directs traces and metrics straight to your console. 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.

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.

Here is how you can send telemetry from OpenLIT to Grafana Cloud

openlit.init(
  otlp_endpoint="https://otlp-gateway-prod-us-east-0.grafana.net/otlp", 
  otlp_headers="Authorization=Basic%20<base64 encoded Instance ID and API Token>"
)

You can also choose to set these values using OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS environment variables

🌱 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 channel 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 the OpenLIT community and maintainers for support, discussions, and updates:

  • 🌟 If you like it, Leave a star on our GitHub
  • 🌍 Join our Slack 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

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 69.0%
  • TypeScript 30.5%
  • Other 0.5%