Query Traces
Querying traces allows you to focus your analysis on specific system behaviors. Start by defining your goals, such as identifying performance bottlenecks or isolating spans that contain errors.
Construct Queries
To start querying your traces, click on the filter bar. You can type, select, or use Alyx to help you craft filters that express your question clearly.Query Syntax Details
Query Syntax Details
General Syntax
- Format:
"dimension name" = 'value' - Enclose the dimension in double quotes (
") and the value in single quotes (').
Examples:
- Equals:
"dimension_name" = 'value' - Not Equals:
"dimension_name" != 'value' - Contains:
"dimension_name" contains 'substring' - Null:
"attributes.input.value" = nullor"attributes.input.value" is null - IN:
"dimension_name" IN ('value_1', 'value_2') - AND/OR Support: Combine multiple conditions using
ANDorOR.
Operators:
=: Equals!=: Not equals<: Less than>: Greater thanIN: Includes
Functions:
- Contains: Use
containsto check if a string column contains a substring
✨ You can use AI Search to automatically generate query filters!Example**:** “Filter for LLM spans”
Multi-Span Filters
For advanced filtering, you can create multiple span queries and define relationships between them. This is useful when you need to find traces based on complex patterns, such as traces where an LLM call follows a retrieval operation, or traces that contain certain spans but exclude others.
- Define your first Span Query using the standard query syntax
- Click Add Span Query to create additional queries (up to 5 total)
- Each query is labeled automatically (A, B, C, D, E)
- Use the Find Traces Matching field to define relationships using operators
Multi-Span Filter Operators
Multi-Span Filter Operators
Operators
Combine span queries using these operators:AND- Traces containing at least one span matching A and one matching B- Example:
A AND Bfinds traces with both LLM calls and errors
- Example:
OR- Traces containing at least one span matching A or one matching B- Example:
A OR Bfinds traces using either OpenAI or Anthropic
- Example:
NOT- Traces that do not contain spans matching the query- Example:
NOT Afinds traces without errors
- Example:
->(Indirectly Calls) - Spans matching A start before spans matching B (temporal ordering)- Example:
A -> Bfinds traces where retrieval happens before LLM generation
- Example:
=>(Directly Calls) - Spans matching A are the direct parent of spans matching B (hierarchical relationship)- Example:
A => Bfinds traces where an agent directly calls a tool
- Example:
Complex Queries
You can combine operators with parentheses for sophisticated filtering logic:(A AND B) OR C- Traces where (A and B both occur) or (C occurs)A AND NOT(B -> C)- Traces containing A but without the pattern where B precedes C(A => B) AND (B -> C)- Traces where A directly calls B, and B starts before C
Saved Filters
When you find yourself using the same filters repeatedly — for example, to track specific spans or error types — you can save them. Saved filters act like shortcuts to your go-to queries, so you can eliminate the need to recreate complex filter queries repeatedly. To save a filter for future use:- Configure your desired filter using the query filter syntax
- Click the Save button in the filter interface
- Choose one of the following options:
- Add a new saved filter view: Create a completely new saved filter with a custom name
- Update an existing filter: Modify an existing saved filter with your current configuration
- You can save and pin up to 7 filters at a time for quick access. (Note: Filters cannot currently be deleted from the pinned view)
Time Filters
Time filters let you focus analysis on the period that matters. The Time Selector makes it quick to define that window. Choose from presets, use the calendar picker, or type a custom range directly.
- Typing Custom Range: You can define exact time windows by typing directly into the selector. Supported formats:
- Dates:
4/1or2025-04-01 - Date and time:
4/1 3:00 AMor2025-04-01 15:00 - Ranges:
4/1 - 4/6or4/1 3:00 AM - 4/6 5:00 PM
- Dates:
- Relative Time Shortcuts: For rolling time windows, use shorthand notation in the selector.
15m,15min,15minutes→ last 15 minutes1 h,1 hr,1 hour,1 hours→ last hour10d,10day,10days→ last 10 days
- Time Zone Support: You can set your preferred timezone, and the selection persists across sessions to ensure data is always shown in your local context.
Export Traces
It can be helpful to export the trace data from Arize for a variety of reasons. Common use cases include:- Testing out evaluations with a subset of the data
- Create a dataset of few-shot examples programmatically
- Augment trace data with metadata programmatically
- Fine-tune a smaller model with production traces from Arize

- Export to Notebook
- Export as CSV
