Skip to main content
OpenLIT is an open-source, OpenTelemetry-native observability package that auto-instruments 20+ LLM providers, frameworks, and vector databases. If your application already uses OpenLIT, the openinference-instrumentation-openlit span processor converts OpenLIT’s spans to OpenInference semantic conventions, so they display in Phoenix with span kinds, inputs, outputs, and token counts.

Install

This example traces a LangGraph agent that calls OpenAI:

Setup

Set your API keys as environment variables:
Register Phoenix, add the OpenInference span processor ahead of the Phoenix exporter, then initialize OpenLIT:
Processor ordering matters. register() installs a default exporter-backed processor. Adding OpenInferenceSpanProcessor() replaces that default, and the BatchSpanProcessor you add after it exports the converted spans to Phoenix.

Run OpenLIT

This email composer agent has three LangGraph nodes, each backed by an OpenAI call: generate an outline, write the email, and rewrite it if it doesn’t match the requested tone.

Observe

Open the openlit project in Phoenix. Each OpenAI call that OpenLIT captures appears as an LLM span with the prompt, response, model name, and token usage, converted to OpenInference by the span processor.

Resources