To send OpenTelemetry metrics and traces generated by OpenLIT from your LLM Application to OpenObserve, Follow the below steps.

1

Get your OpenObserve Credentials

  1. Log into your OpenObserve instance.
  2. Click Ingestion in the side navigation and select Traces (OpenTelemetry) option.
  3. Under the OTLP HTTP section, Copy the Ingestion HTTP Endpoint and the Ingestion Authorization key (After Basic)
2

Add the following two lines to your application code:

import openlit

openlit.init(
  otlp_endpoint="YOUR_OPENOBSERVE_HTTP_ENDPOINT", 
  otlp_headers="YOUR_OPENOBSERVE_AUTH_HEADER"
)

Replace:

  1. YOUR_OPENOBSERVE_HTTP_ENDPOINT with the Ingestion HTTP Endpoint value you copied in Step 1.
  • Example - http://127.0.0.1:5080/api/default
  1. YOUR_OPENOBSERVE_AUTH_HEADER with the Ingestion Authorization key value you copied in Step 1.
  • Example - Authorization=Basic%20<Ingestion Authorization key>

Refer to the OpenLIT Python SDK repository for more advanced configurations and use cases.

3

Import the pre-built Dashboard

  1. Log into your OpenObserve Instance.
  2. Click Dashboards in the side navgivation menu.
  3. Click Import on the top right corner.
  4. Copy the dashboard JSON provided in the accordion named Dashboard below.
  5. Paste the dashboard JSON text directly under the Import Dashboard from JSON section
  6. Click Import.
  7. Save the dashboard.