Skip to navigation

List Span Groups

View as MarkdownOpen in Claude

Path parameters

workspacestringRequired

Query parameters

bystringRequired

Comma-separated span fields to group by, e.g. trace_id or session_id,trace_id.

sortenumOptionalDefaults to -span_count

Sort groups by size or by start time. Use -started_at for the traces or sessions that began most recently, which answers ‘what ran lately’ in one call instead of paging through spans. A group’s time is its earliest matching span, so this orders by when work started and not by when it was last active.

Allowed values:
pageintegerOptional>=1Defaults to 1
Page number.
page_sizeintegerOptional1-1000Defaults to 10
Page size.
filterobjectOptional

Filter spans by the same fields as the span list endpoint, then group matching spans by the comma-separated fields in the by query parameter.

Response

Successful Response
datalist of objects
grouped_bylist of enums
Span fields used to group the matching spans.
Allowed values:
paginationobject or nullOptional
Pagination information.
sortstring or nullOptional
The field on which the results are sorted.
filtermap from strings to any or nullOptional
Filtering information.

Errors

400
Bad Request Error
422
Unprocessable Entity Error