Relevant Source Files
src/spans/getSpans.tsfor the exact filter names and query behavior
Search Spans
getSpans returns spans in insertion order, most recently inserted first, which is not always the order in which they started. To page by start time, call GET /v1/projects/{project_identifier}/spans with sort=start_time, or use get_spans(sort="start_time") in the Python client (Phoenix server 20.16.0 or newer).
Filtering by Attributes
Use theattributes parameter to filter spans by OpenInference attribute key-value pairs. Multiple entries are ANDed together. The JS type of the value determines how the stored attribute is matched: a number matches a stored integer or float, a boolean matches a stored boolean, and a string matches a stored string.
Infinity, NaN) throw a RangeError. Requires Phoenix server ≥ 14.9.0.
Root Span Queries
UseparentId: null to limit results to root spans only.
Span Maintenance
Adding Notes
UseaddSpanNote to attach a free-text note to a span. Multiple notes can be added to the same span — they are independent entries, each with its own timestamp.
Deleting Spans
deleteSpan accepts either the OpenTelemetry span_id or Phoenix’s global span ID.
For span-level annotations (labels, scores, evaluations), see Span Annotations and Document Annotations.
Source Map
src/spans/getSpans.tssrc/spans/addSpanNote.tssrc/spans/deleteSpan.tssrc/spans/getSpanAnnotations.tssrc/types/spans.ts

