Skip to main content

OpenLIT

OpenLIT auto-instruments supported LLM providers, vector databases, MCP tools and GPU metrics from one init call.

You will need:

  • OODLE_INSTANCE: your Oodle instance ID (ap1, us1)
  • OODLE_API_KEY: an Oodle API key (ap1, us1)
  • OTLP_ENDPOINT: your OTLP collector domain, shown on the tile

Open the OpenLIT tile on the ap1, us1 page to get these filled in for you, or let an agent do the setup with /oodle-onboarding set up the llm_observability_openlit integration.

Python

Install

Install the OpenLIT SDK:

pip install openlit

Instrument

Initialize OpenLIT in your application. This single call auto-instruments supported LLM providers, vector databases, MCP tools, and GPU metrics:

import openlit

openlit.init(
service_name="my-llm-app",
otlp_endpoint="https://<OTLP_ENDPOINT>",
otlp_headers={
"X-API-KEY": "<OODLE_API_KEY>",
"X-OODLE-INSTANCE": "<OODLE_INSTANCE>",
},
capture_message_content=True,
)

# Import your LLM SDK after openlit.init so it gets patched.
import openai

TypeScript / JavaScript

Install

Install the OpenLIT SDK:

npm install openlit

Instrument

Initialize OpenLIT in your application. This single call auto-instruments supported LLM providers, vector databases, MCP tools, and GPU metrics:

const Openlit = require('openlit').default;

Openlit.init({
applicationName: 'my-llm-app',
otlpEndpoint: 'https://<OTLP_ENDPOINT>',
otlpHeaders: {
'X-API-KEY': '<OODLE_API_KEY>',
'X-OODLE-INSTANCE': '<OODLE_INSTANCE>',
},
captureMessageContent: true,
});

// Require your LLM SDK after Openlit.init: auto-instrumentation
// patches modules as they load, so requiring it first yields no spans.
const OpenAI = require('openai');

Verify

Run your application, then open ap1, us1. Spans carry gen_ai.* attributes: the model, token counts, and the prompt and response content. Click a trace for the Transcript, the waterfall, and the cost breakdown.

If nothing arrives, check that the exporter can reach https://<OTLP_ENDPOINT> and that the instance and key are set: the OTLP gateway answers 401 without them.


Support

If you need assistance or have any questions, please reach out to us through: