From abb9af66a6ae680dd61e81298368682aa6e7553a Mon Sep 17 00:00:00 2001 From: patcher9 Date: Fri, 14 Jun 2024 11:36:04 +0530 Subject: [PATCH] [Docs]: Add Integration for OpenLIT (OpenTelemetry-native LLM Application O11y) (#1377) --- docs/integration/openlit.mdx | 50 ++++++++++++++++++++++++++++++++++++ docs/mint.json | 3 ++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 docs/integration/openlit.mdx diff --git a/docs/integration/openlit.mdx b/docs/integration/openlit.mdx new file mode 100644 index 00000000..4145b41f --- /dev/null +++ b/docs/integration/openlit.mdx @@ -0,0 +1,50 @@ +--- +title: ':telescope: OpenLIT' +description: 'OpenTelemetry-native LLM application observabiliy and evaluations' +--- + +Embedchain now supports integration with [OpenLIT](https://github.com/openlit/openlit). + +## Getting Started + +### 1. Set environment variables +```bash +# Setting environment variable for OpenTelemetry destination and authetication. +export OTEL_EXPORTER_OTLP_ENDPOINT = "YOUR_OTEL_ENDPOINT" +export OTEL_EXPORTER_OTLP_HEADERS = "YOUR_OTEL_ENDPOINT_AUTH" +``` + +### 2. Install the OpenLIT SDK +Open your terminal and run: + +```shell +pip install openlit +``` + +### 3. Setup Your Application for Monitoring +Now create an app using Embedchain and initialize OpenTelemetry monitoring + +```python +from embedchain import App +import OpenLIT + +# Initialize OpenLIT Auto Instrumentation for monitoring. +openlit.init() + +# Initialize EmbedChain application. +app = App() + +# Add data to your app +app.add("https://en.wikipedia.org/wiki/Elon_Musk") + +# Query your app +app.query("How many companies did Elon found?") +``` + +### 4. Visualize + +Once you've set up data collection with OpenLIT, you can visualize and analyze this information to better understand your application's performance: + +- **Using OpenLIT UI:** Connect to OpenLIT's UI to start exploring performance metrics. Visit the OpenLIT [Quickstart Guide](https://docs.openlit.io/latest/quickstart) for step-by-step details. + +- **Integrate with existing Observability Tools:** If you use tools like Grafana or DataDog, you can integrate the data collected by OpenLIT. For instructions on setting up these connections, check the OpenLIT [Connections Guide](https://docs.openlit.io/latest/connections/intro). \ No newline at end of file diff --git a/docs/mint.json b/docs/mint.json index 300e5129..02eecd96 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -69,7 +69,8 @@ "pages": [ "integration/langsmith", "integration/chainlit", - "integration/streamlit-mistral" + "integration/streamlit-mistral", + "integration/openlit" ] } ]