Documentation Index
Fetch the complete documentation index at: https://arizeai-433a7140-mikeldking-12899-providers-and-secrets.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Usually these will be traces you’ve previously saved using Save All Traces.
Connect to Phoenix
Before using the Phoenix client, be sure you’ve set the following environment variables:
import os
os.environ["PHOENIX_CLIENT_HEADERS"] = f"api_key=..."
os.environ["PHOENIX_COLLECTOR_ENDPOINT"] = "https://app.phoenix.arize.com"
If you’re self-hosting Phoenix, ignore the client headers and change the collector endpoint to your endpoint.
Importing Traces to an Existing Phoenix Instance
import phoenix as px
# Re-launch the app using trace data
px.launch_app(trace=px.TraceDataset(df))
# Load traces into an existing Phoenix instance from a local file
px.launch_app(trace=px.TraceDataset.load('f7733fda-6ad6-4427-a803-55ad2182b662', directory="/my_saved_traces/"))
Launching a new Phoenix Instance with Saved Traces
You can also launch a temporary version of Phoenix in your local notebook to quickly view the traces. But be warned, this Phoenix instance will only last as long as your notebook environment is running
# Load traces from a dataframe
px.launch_app(trace=px.TraceDataset.load(my_traces))
# Load traces from a local file
px.launch_app(trace=px.TraceDataset.load('f7733fda-6ad6-4427-a803-55ad2182b662', directory="/my_saved_traces/"))