docs: update LlamaIndex observability code to use current Arize Phoenix API#680
Open
octo-patch wants to merge 1 commit into
Open
docs: update LlamaIndex observability code to use current Arize Phoenix API#680octo-patch wants to merge 1 commit into
octo-patch wants to merge 1 commit into
Conversation
…ix API (fixes huggingface#617) The old LlamaTrace endpoint (llamatrace.com) has migrated to app.phoenix.arize.com and the authentication approach changed, causing 401 errors for users following the Unit 2.2 course material. Replace the deprecated llama-index-callbacks-arize-phoenix callback approach with the current openinference-instrumentation-llama-index + arize-phoenix-otel package, which uses the OpenTelemetry-based LlamaIndexInstrumentor and the updated endpoint. Co-Authored-By: Octopus <liyuan851277048@icloud.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #617
Problem
The Unit 2.2 (LlamaIndex components) observability section used the old
llamatrace.comendpoint and the deprecatedllama-index-callbacks-arize-phoenixcallback package. The LlamaTrace service has since migrated toapp.phoenix.arize.com, and the old authentication method no longer works, causing 401 errors for all users who try to run the tracing code.Solution
Replace the deprecated callback-based approach with the current OpenTelemetry-based instrumentation:
llama-index-callbacks-arize-phoenix→openinference-instrumentation-llama-index arize-phoenix-otelhttps://llamatrace.com/v1/traces→https://app.phoenix.arize.com/v1/traceshttps://llamatrace.com/login→https://app.phoenix.arize.comset_global_handler("arize_phoenix", ...)→LlamaIndexInstrumentor().instrument(...)via OpenTelemetryThe new approach uses
phoenix.otel.register+LlamaIndexInstrumentor, which is the officially recommended method in the current Arize Phoenix docs.Testing
Code example verified against the Arize-ai/phoenix tracing tutorial and current Phoenix documentation.