Hey all, been seeing this issue for a while when trying to access a particular project I created. I logged an issue and believe it is being worked on but in the meantime is there a way to download the traces via the UI or code? I have traces that have already been logged into the project that I need access to.
Yes, you can download the traces via the Phoenix UI or programmatically using code.Via the UI:
1. Export Traces: You can export traces directly from the Phoenix UI. Navigate to the project and use the export options available in the UI to download the traces. You can export specific clusters or all clusters of embeddings as a single dataframe.Programmatically:
1. Using Python Code: You can use the Phoenix Python API to download the traces. Here is an example of how to do this: LBKSimport phoenix as pxLBKS# Initialize the Phoenix client client = px.Client()LBKS# Get the spans dataframe spans_df = client.get_spans_dataframe()LBKS# Save the dataframe to a file spans_df.to_csv('traces.csv', index=False)LBKSThis code will retrieve the spans from your Phoenix session and save them to a CSV file.Would you like more detail on any specific part?Sources:
- Export Your Data
- Save and Load Traces
馃挕聽Hint: Mention RunLLM in the thread for followups.
I believe you are using LlamaTrace IIRC?
馃憤
Can you try following these instructions to download your traces? https://docs.arize.com/phoenix/tracing/how-to-tracing/save-and-load-traces
Yeah I am running into 502 errors using both get_trace_dataset and get_spans_dataframe using the exact same credentials I was using to write traces, so looking at it now
I should have mentioned, you'll need to pass in a dictionary of headers into phoenix.Client via the headers parameter during initialization.
Not sure if that is the cause of the 502. Can you share the error message?
Here's an example using environment variables instead of the headers parameter. https://docs.arize.com/phoenix/hosted-phoenix#using-the-client-sdk-downloading-data-and-uploading-datasets
these were set as env variables
I see. And you have https://app.phoenix.arize.com set for PHOENIX_COLLECTOR_ENDPOINT?
Yeah correct, the exact same credentials that I have been using to successfully write traces to phoenix
