Export Traces

Export to Notebook

See our data API guide for function and argument level information.

After logging data to Arize, if you want to retrieve that data to use in code for evaluation, you can visit the LLM Tracing tab to see your traces and use the export button to get your export code.

Boilerplate code after export
# this will be prefilled by the export command. 
# Note: This uses a different API Key than the one above.
ARIZE_API_KEY = ''

# import statements required for getting your spans
import os
os.environ['ARIZE_API_KEY'] = ARIZE_API_KEY
from datetime import datetime
from arize.exporter import ArizeExportClient 
from arize.utils.types import Environments

# Exporting your dataset into a dataframe
client = ArizeExportClient()
primary_df = client.export_model_to_df(
    space_id='', # this will be prefilled by export
    model_id='', # this will be prefilled by export
    environment=Environments.TRACING, 
    start_time=datetime.fromisoformat(''), # this will be prefilled by export 
    end_time=datetime.fromisoformat(''), # this will be prefilled by export
)

Export to CSV

Users can download data directly as a CSV file from the Tracing page by selecting "Export to CSV" from the export dropdown menu. Please note that the CSV export is designed to capture only a sample of the data, specifically the top 1,000 rows currently displayed on the page. Before exporting, users can customize the output by selecting their desired columns using the table column selector.

Last updated

Copyright © 2023 Arize AI, Inc