http://localhost:8080/v1, so Arize AX captures PrismML calls via the openinference-instrumentation-openai package — the same instrumentor that covers OpenAI’s hosted API.
Prerequisites
- Python 3.9+
- An Arize AX account (sign up)
- PrismML’s OpenAI-compatible server running locally at
http://localhost:8080
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.
Install
Configure credentials
not-needed.
Setup tracing
Run PrismML
Expected output
Verify in Arize AX
- Open your Arize AX space and select project
prismml-tracing-example. - You should see a new trace within ~30 seconds containing a
ChatCompletionLLM span with the prompt, response, and token usage attached. - If no traces appear, see Troubleshooting.
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.
Troubleshooting
- No traces in Arize AX. Confirm
ARIZE_SPACE_IDandARIZE_API_KEYare set in the same shell that runsexample.py. Enable OpenTelemetry debug logs withexport OTEL_LOG_LEVEL=debugand re-run. Connection refusedorConnectErrortolocalhost:8080. The PrismML server is not running or is listening on a different port. Start it with PrismML’s server instructions.- Model not found. The server exposes the model it loaded. Use the model name returned by
GET http://localhost:8080/v1/models, or usebonsaias shown in this guide. - PrismML spans missing but other spans present.
OpenAIInstrumentor().instrument(...)must run before anyimport openai. Make sureinstrumentation.pyis the first import in your entry point.