Registry /
llm-agents / llama-index-callbacks-arize-phoenix
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
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.fixUpdate 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.fixReplace `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`.fixRun `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.
fixRun `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.
fixUpgrade 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.
fixUse `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