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

1. Get your Credentials

  1. Log into your OpenObserve instance
  2. Navigate to Ingestion:
    • Click Ingestion in the side navigation
    • Select Traces (OpenTelemetry) option
  3. Copy OTLP Configuration:
    • Under the OTLP HTTP section, copy:
      • Ingestion HTTP Endpoint
      • Ingestion Authorization key (the part after Basic)
    • Example endpoint: http://127.0.0.1:5080/api/default
    • Example auth: Authorization=Basic%20<Ingestion Authorization key>

2. Instrument your application

For direct integration into your Python applications:
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
  2. 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. Navigate to Dashboards:
    • Click Dashboards in the side navigation menu
    • Click Import on the top right corner
  3. Import Dashboard:
    • Copy the dashboard JSON provided in the accordion below
    • Paste the dashboard JSON text directly under the Import Dashboard from JSON section
    • Click Import
    • Save the dashboard