- Export vLLM server spans over OTLP with
--otlp-traces-endpoint. - Trace your application calls to vLLM’s OpenAI-compatible server with
openinference-instrumentation-openai.
Use both paths when possible. vLLM’s server-side OTLP spans show inference-server timing and request metadata. OpenInference OpenAI instrumentation captures the client-side prompt, response, token, model, and latency metadata for calls made through the OpenAI-compatible API.
Prerequisites
- Python 3.9+
- A running vLLM server
- An Arize AX account (sign up)
- Your Arize AX Space ID and API Key
Launch Arize AX
- Sign in to your Arize AX account.
- From Space Settings, copy your Space ID and API Key. You will set them as
ARIZE_SPACE_IDandARIZE_API_KEYbelow.
Option 1: export vLLM server spans over OTLP
vLLM defaults to OTLP/gRPC. Arize’s direct HTTP endpoint uses OTLP/HTTP with protobuf encoding, so set the exporter protocol before starting vLLM:Option 2: trace OpenAI-compatible client calls
Install the client-side packages:openai:
Verify in Arize
- Open your Arize AX space and select project
vllm-tracing-examplefor client-side spans. - If you also enabled vLLM server OTLP export directly, select project
vllm-serverif you setOTEL_RESOURCE_ATTRIBUTESas shown above. - You should see spans within ~30 seconds.
Check from the skill, CLI, or SDK
Confirm spans are actually reaching your Arize AX project. Use whichever fits your workflow — the skill and CLI work for any framework; the SDK check is shown for each language.- Arize skill (agent)
- AX CLI
- SDK
Install the Arize Skills plugin and let your coding agent check for you:Then prompt your agent:
Use the arize-trace skill to export and analyze recent traces from my project. Confirm spans are arriving, and summarize any errors or latency issues.
What Arize captures
- OpenInference client spans: prompt, response, model, token usage, latency, errors, and tool call metadata supported by the OpenAI instrumentor.
- vLLM server spans: server-side inference and request-processing spans emitted by vLLM’s OpenTelemetry support.
Troubleshooting
- No client-side LLM spans. Make sure
OpenAIInstrumentor().instrument(...)runs before your OpenAI client sends requests. - No vLLM server spans. Confirm
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf,--otlp-traces-endpointpoints to Arize’s OTLP/HTTP traces endpoint, and your OTLP headers containspace_idandapi_key. - Server spans appear in the default project. Confirm
OTEL_RESOURCE_ATTRIBUTESincludesopeninference.project.name=vllm-server, or add the project name with an OpenTelemetry Collector resource processor. - Server spans lack prompt or response text. Use the OpenInference OpenAI client path as well; vLLM’s server export may not include the same application-level input and output detail.