{"id":23975,"library":"llama-index-callbacks-arize-phoenix","title":"LlamaIndex Callbacks Arize Phoenix Integration","description":"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.","status":"active","version":"0.7.0","language":"python","source_language":"en","source_url":"https://github.com/run-llama/llama_index","tags":["llama-index","arize-phoenix","observability","tracing","llm","callbacks"],"install":[{"cmd":"pip install llama-index-callbacks-arize-phoenix","lang":"bash","label":"Install from PyPI"},{"cmd":"pip install 'llama-index-callbacks-arize-phoenix>=0.7'","lang":"bash","label":"Install with version pin"}],"dependencies":[{"reason":"Provides LlamaIndex base classes and callback infrastructure","package":"llama-index-core","optional":false},{"reason":"Provides the OpenInference instrumentation layer for LlamaIndex","package":"openinference-instrumentation-llama-index","optional":false},{"reason":"Required for Phoenix client and OTLP export; must be installed separately","package":"arize-phoenix","optional":true}],"imports":[{"note":"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.","wrong":"from llama_index.callbacks.arize_phoenix_callback_handler import ArizePhoenixHandler","symbol":"ArizePhoenixHandler","correct":"from llama_index.callbacks.arize_phoenix import arize_phoenix_callback_handler"}],"quickstart":{"code":"import os\n\nimport llama_index\nfrom llama_index.callbacks.arize_phoenix import arize_phoenix_callback_handler\n\n# Configure Phoenix endpoint (default http://localhost:6006/v1/traces)\nos.environ['PHOENIX_COLLECTOR_ENDPOINT'] = os.environ.get('PHOENIX_COLLECTOR_ENDPOINT', 'http://localhost:6006')\nos.environ['PHOENIX_OTLP_AUTH_HEADER'] = os.environ.get('PHOENIX_OTLP_AUTH_HEADER', '')\n\nhandler = arize_phoenix_callback_handler()\nllama_index.core.global_handler = handler\n\n# Now all LlamaIndex operations will be traced\nfrom llama_index.core import VectorStoreIndex, SimpleDirectoryReader\ndocuments = SimpleDirectoryReader('data').load_data()\nindex = VectorStoreIndex.from_documents(documents)\nquery_engine = index.as_query_engine()\nresponse = query_engine.query('What is the capital of France?')\nprint(response)\n","lang":"python","description":"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)."},"warnings":[{"fix":"Update import to `from llama_index.callbacks.arize_phoenix import arize_phoenix_callback_handler` and call `arize_phoenix_callback_handler()` instead of `ArizePhoenixHandler(...)`.","message":"In 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.","severity":"breaking","affected_versions":"<0.7.0"},{"fix":"Replace `llama_index.core.global_handler = handler` with `from llama_index.core.settings import Settings; Settings.callback_manager.add_handler(handler)`.","message":"Setting `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.","severity":"deprecated","affected_versions":"llama-index-core >=0.10"},{"fix":"Run `pip install arize-phoenix` in addition to the integration package.","message":"Forgetting 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`.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install arize-phoenix`.","cause":"The `arize-phoenix` package is not installed.","error":"ModuleNotFoundError: No module named 'arize'"},{"fix":"Upgrade to version 0.7.0 with `pip install --upgrade llama-index-callbacks-arize-phoenix` and use the correct import path.","cause":"Using an out-of-date version of the integration (<0.7.0) where the package was named differently, or the package is not installed.","error":"AttributeError: module 'llama_index.callbacks' has no attribute 'arize_phoenix'"},{"fix":"Use `handler = arize_phoenix_callback_handler()` (with parentheses).","cause":"Trying to use `arixe_phoenix_callback_handler` as a class instead of calling the function.","error":"TypeError: 'str' object is not callable"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}