Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
project | String | Yes | Project name to query |
filters | List[EventFilter] | Yes | Filters to apply |
limit | Integer | No | Max results per page (default: 1000, max: 7500) |
page | Integer | No | Page number (default: 1) |
date_range | Object | No | Date range with $gte and $lte ISO 8601 strings |
EventFilter Fields
| Field | Type | Description |
|---|---|---|
field | String | Field to filter on (e.g., event_type, session_id, metadata.cost) |
value | String | Value to match |
operator | Operator | One of: is_, is_not, contains, not_contains, greater_than |
type | Type | Data type: string, number, boolean, id |
Setup
Query Model Events
Retrieve all LLM model events from your project:Query Events in a Session
Get all events belonging to a specific trace/session:Query Sessions
Get session-level data (root events only):Filter by Evaluator Score
Query events that have a specific evaluator score:Filter by User Feedback
Query events with specific user feedback:Filter by Metadata
Query events by custom metadata fields:Filter by Date Range
Query events within a specific time period:Available Filter Operators
| Operator | Python | Description |
|---|---|---|
| Equals | Operator.is_ | Exact match |
| Not equals | Operator.is_not | Exclude matches |
| Contains | Operator.contains | Substring match |
| Not contains | Operator.not_contains | Exclude substring |
| Greater than | Operator.greater_than | Numeric comparison |
Common Filterable Fields
| Field | Description |
|---|---|
event_type | session, model, tool, or chain |
event_name | Name of the event/span |
session_id | Session/trace ID |
metrics.<name> | Evaluator scores |
feedback.<name> | User feedback values |
metadata.<name> | Custom metadata |
user_properties.<name> | User properties |
Session events include aggregated metadata like
num_events, cost, total_tokens. See Session Aggregations for details.Export Timeouts and Retries
Export operations (export(), export_async(), get_by_session_id()) use a default read timeout of 5 minutes to handle large result sets. If you’re exporting very large datasets or working over constrained networks, you can override this with an environment variable:
export_async() method automatically retries on transient HTTP errors (502, 503, 504), matching the behavior of export().
