Skip to content

Traces API

GET /api/v1/project/{project_id}/otel/traces

Query traces with pagination and filters.

ParameterTypeDescription
pagenumberPage number (default: 1)
limitnumberItems per page (default: 50)
order_bystringSort field (e.g., start_time:desc)
session_idstringFilter by session ID
user_idstringFilter by user ID
environmentstring or arrayFilter by environment
from_timestampstringFilter from timestamp (ISO 8601)
to_timestampstringFilter to timestamp (ISO 8601)
filtersJSONAdvanced filters (see below)
include_nongenaibooleanInclude non‑GenAI traces (default: false)
{
"data": [
{
"trace_id": "abc123def456",
"trace_name": "agent.run",
"start_time": "2025-01-26T10:12:34Z",
"end_time": "2025-01-26T10:12:36Z",
"duration_ms": 1890,
"session_id": "session-789",
"user_id": "user-123",
"environment": "development",
"span_count": 5,
"total_tokens": 350,
"total_cost": 0.018
}
],
"meta": {
"page": 1,
"limit": 50,
"total_items": 127,
"total_pages": 3
}
}
Terminal window
# List recent traces
curl "http://localhost:5388/api/v1/project/default/otel/traces?page=1&limit=20"
# Filter by session
curl "http://localhost:5388/api/v1/project/default/otel/traces?session_id=session-789"
# Filter by environment
curl "http://localhost:5388/api/v1/project/default/otel/traces?environment=development"
GET /api/v1/project/{project_id}/otel/traces/{trace_id}

Get a single trace with nested spans.

Optional query params:

  • include_raw_span=true to include the raw OTLP span JSON
GET /api/v1/project/{project_id}/otel/traces/{trace_id}/messages

Get normalized messages (SideML format) for a trace.

DELETE /api/v1/project/{project_id}/otel/traces/{trace_id}

Delete a trace and all associated data.

GET /api/v1/project/{project_id}/otel/traces/filter-options

Get available filter values for building UI dropdowns.

Pass a JSON array in the filters query param:

[{"key": "environment", "op": "eq", "value": "production"}]
OperatorDescriptionValue Type
eqEqualsstring/number
neNot equalsstring/number
containsContains substringstring
starts_withStarts withstring
inIn listarray
gt, lt, gte, lteNumeric comparisonnumber
is_nullAttribute not presentnull
is_not_nullAttribute presentnull