Skip to main content

Use the spans module to search project spans and perform span-level maintenance such as deleting spans or adding notes.

Search Spans#

Filtering by Attributes#

Use the attributes 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.

Non-finite number values (Infinity, NaN) throw a RangeError. Requires Phoenix server ≥ 14.9.0.

Root Span Queries#

Use parentId: null to limit results to root spans only.

Span Maintenance#

Adding Notes#

Use addSpanNote 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.