openlit.mdx 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. ---
  2. title: '🔭 OpenLIT'
  3. description: 'OpenTelemetry-native Observability and Evals for LLMs & GPUs'
  4. ---
  5. Embedchain now supports integration with [OpenLIT](https://github.com/openlit/openlit).
  6. ## Getting Started
  7. ### 1. Set environment variables
  8. ```bash
  9. # Setting environment variable for OpenTelemetry destination and authetication.
  10. export OTEL_EXPORTER_OTLP_ENDPOINT = "YOUR_OTEL_ENDPOINT"
  11. export OTEL_EXPORTER_OTLP_HEADERS = "YOUR_OTEL_ENDPOINT_AUTH"
  12. ```
  13. ### 2. Install the OpenLIT SDK
  14. Open your terminal and run:
  15. ```shell
  16. pip install openlit
  17. ```
  18. ### 3. Setup Your Application for Monitoring
  19. Now create an app using Embedchain and initialize OpenTelemetry monitoring
  20. ```python
  21. from embedchain import App
  22. import OpenLIT
  23. # Initialize OpenLIT Auto Instrumentation for monitoring.
  24. openlit.init()
  25. # Initialize EmbedChain application.
  26. app = App()
  27. # Add data to your app
  28. app.add("https://en.wikipedia.org/wiki/Elon_Musk")
  29. # Query your app
  30. app.query("How many companies did Elon found?")
  31. ```
  32. ### 4. Visualize
  33. Once you've set up data collection with OpenLIT, you can visualize and analyze this information to better understand your application's performance:
  34. - **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.
  35. - **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).