Hi, is there any way to view all traces within a session? Currently in the UI can only see 50 traces in a session.
Yes, Phoenix's Sessions UI displays a paginated list of traces within a session, but by default only shows a limited number (e.g., 50) at a time. You can view all traces in a session by navigating through the pagination controls in the session details view. There is no documented way to increase the per-page limit beyond the UI's default, but all traces are accessible via pagination. For programmatic access, you can use the Python client to retrieve all spans for a session and analyze them as a dataframe using session.get_spans_dataframe() after filtering by session ID if needed. If you need to export or analyze all traces at once, use the Python API to pull the full set of traces for the session, as the UI is currently limited by pagination and does not support changing the page size directly. Would you like more detail or a code example for programmatic access?Sources:
- https://arize-ai.slack.com/archives/C04R3GXC8HK/p1724789781.231059
- https://arize-ai.slack.com/archives/C04R3GXC8HK/p1726632533.889129
馃挕聽Hint: Mention RunLLM in the thread for followups.
To programmatically retrieve all traces within a session, use the Phoenix Python client and filter spans by the session ID. Here鈥檚 an example: LBKSimport phoenix as px from phoenix.trace.dsl import SpanQueryLBKS# Replace with your actual session ID session_id = "your-session-id"LBKS# Create a query to filter spans by session.id query = SpanQuery().where(f"session.id == '{session_id}'")LBKS# Retrieve all spans for the session as a DataFrame client = px.Client() spans_df = client.query_spans(query)LBKSprint(spans_df)LBKSThis will return a DataFrame containing all traces (spans) associated with the specified session ID, regardless of UI pagination limits. You can then analyze or export this data as needed.Sources:
- Extract Data from Spans
- Phoenix Python Client API
馃挕聽Hint: Mention RunLLM in the thread for followups.
