traceloop-sdk) is the Traceloop.init() wrapper that activates those instrumentations, so this page covers both. The openinference-instrumentation-openllmetry span processor converts OpenLLMetry’s spans to OpenInference semantic conventions before they’re exported to Phoenix.
Install
traceloop-sdk imports httpx without declaring it as a dependency, so install it explicitly.
Setup
Set your API keys as environment variables:Traceloop.init(). The conversion processor must come before the exporting processor:
instrumentation.py
Prefer individual instrumentors to the Traceloop SDK? Install the specific OpenLLMetry instrumentor, such as
opentelemetry-instrumentation-openai, and instrument it against a Phoenix tracer provider that has OpenInferenceSpanProcessor() added before the exporter. The conversion step is the same.Run OpenLLMetry
example.py
Observe
Open theopenllmetry project in Phoenix. The trace contains an openai.chat span with its span kind set to LLM, the prompt and response, the model name, and token usage.

