Registry / llm-agents / llama-index-callbacks-arize-phoenix

llama-index-callbacks-arize-phoenix

JSON →
library0.7.0pypypi✓ verified 84d ago

Integration package for connecting LlamaIndex with Arize Phoenix OpenInference tracing. Provides a callback handler that sends trace data to Phoenix for observability and debugging of LLM applications. Current version 0.7.0, requires Python >=3.10 and <3.14. Release cadence is irregular, tied to LlamaIndex ecosystem updates.

pip install llama-index-callbacks-arize-phoenix
INSTALL
IMPORT
SIG · LLAMA-INDEX-CALLBA
L
llama-index-callbacks-arize-phoenix
llm-agentspythonv0.7.0
Install
17.9s avg
Import
5794ms
Disk
254MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.7.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 21.05s
py 3.11
✓ —
✓ 18.55s
py 3.12
✓ —
✓ 15.7s
py 3.13
✓ —
✓ 16.15s
py 3.9
1/2 runs
1/2 runs
254MB installed
● package 254MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ArizePhoenixHandler
from llama_index.callbacks.arize_phoenix import arize_phoenix_callback_handler
from llama_index.callbacks.arize_phoenix_callback_handler import ArizePhoenixHandler
The correct import path is under llama_index.callbacks.arize_phoenix; the class name in older versions was ArizePhoenixHandler, but in 0.7.0 the recommended pattern is to use the function arize_phoenix_callback_handler() which returns a handler instance.

Initialize the Arize Phoenix callback handler, set it as the global LlamaIndex handler, and run a simple query. Requires Phoenix collector running (e.g., `python -m phoenix.server.main serve` or a Phoenix instance).

import os import llama_index from llama_index.callbacks.arize_phoenix import arize_phoenix_callback_handler # Configure Phoenix endpoint (default http://localhost:6006/v1/traces) os.environ['PHOENIX_COLLECTOR_ENDPOINT'] = os.environ.get('PHOENIX_COLLECTOR_ENDPOINT', 'http://localhost:6006') os.environ['PHOENIX_OTLP_AUTH_HEADER'] = os.environ.get('PHOENIX_OTLP_AUTH_HEADER', '') handler = arize_phoenix_callback_handler() llama_index.core.global_handler = handler # Now all LlamaIndex operations will be traced from llama_index.core import VectorStoreIndex, SimpleDirectoryReader documents = SimpleDirectoryReader('data').load_data() index = VectorStoreIndex.from_documents(documents) query_engine = index.as_query_engine() response = query_engine.query('What is the capital of France?') print(response)
Debug
Known issues
breakingIn version 0.7.0, the main API changed: use `arixe_phoenix_callback_handler()` function instead of instantiating `ArizePhoenixHandler` directly. The old import path `from llama_index.callbacks.arize_phoenix_callback_handler import ArizePhoenixHandler` is removed.
fix
Update import to `from llama_index.callbacks.arize_phoenix import arize_phoenix_callback_handler` and call `arize_phoenix_callback_handler()` instead of `ArizePhoenixHandler(...)`.
affects: <0.7.0
deprecatedSetting `global_handler` via `llama_index.core.global_handler` is deprecated in recent LlamaIndex versions (>=0.10). Use `llama_index.core.settings.Settings.callback_manager.add_handler(handler)` instead.
fix
Replace `llama_index.core.global_handler = handler` with `from llama_index.core.settings import Settings; Settings.callback_manager.add_handler(handler)`.
affects: llama-index-core >=0.10
gotchaForgetting to install `arize-phoenix` separately. The package has a conditional dependency on `arize-phoenix` that is not installed automatically. You must `pip install arize-phoenix`.
fix
Run `pip install arize-phoenix` in addition to the integration package.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'arize'
The `arize-phoenix` package is not installed.
fix
Run `pip install arize-phoenix`.
AttributeError: module 'llama_index.callbacks' has no attribute 'arize_phoenix'
Using an out-of-date version of the integration (<0.7.0) where the package was named differently, or the package is not installed.
fix
Upgrade to version 0.7.0 with `pip install --upgrade llama-index-callbacks-arize-phoenix` and use the correct import path.
TypeError: 'str' object is not callable
Trying to use `arixe_phoenix_callback_handler` as a class instead of calling the function.
fix
Use `handler = arize_phoenix_callback_handler()` (with parentheses).
Upgrade
Version history
0.7.0latest on PyPI · released Mar 12, 2026
Audit
Dependencies
llama-index-corerequiredProvides LlamaIndex base classes and callback infrastructure
openinference-instrumentation-llama-indexrequiredProvides the OpenInference instrumentation layer for LlamaIndex
arize-phoenixoptionalRequired for Phoenix client and OTLP export; must be installed separately
Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources