v1

latestOpenAPI 3.1.02026-07-1320186461.3 KB

Get Trace Logs Api

Fetches trace logs and returns them as a paginated response.

post/api/parea/v1/get_trace_logs

Request body

pageinteger

Page number starting from 1

page_sizeinteger

Number of items per page

filter_fieldstring nullable

Field to filter on. If you want to filter by a score, you need to follow this format: 'score:{score_name}'. If you want to filter by annotation, you need to follow this format: 'annotation:{annotation_type}:{annotation_id}'.

filter_keystring nullable

Filter by key when filtering on a map

filter_operator'equals' | 'not_equals' | 'like' | 'greater_than_or_equal' | 'less_than_or_equal' | 'greater_than' | 'less_than' | 'is_null' | 'exists' | 'in' | 'between'
filter_valuestring nullable

Filter value

project_namestring required

Filter by project name

time_range'na' | '1h' | '3h' | '6h' | '24h' | '7d' | '1m' | '3m' | '6m' | '1y'
statusstring nullable

Filter by status: success, error

Example request

{
  "filter_field": "trace_name",
  "filter_operator": "like",
  "filter_value": "llm"
}

Response

Successful Response

totalinteger required
pageinteger required
total_pagesinteger required
page_sizeinteger required

Example response

{
  "results": [
    {
      "depth": 0,
      "end_timestamp": "2024-05-30 13:48:35",
      "execution_order": 0,
      "inputs": {
        "x": "Golang",
        "y": "Fiber"
      },
      "metadata": {
        "purpose": "testing"
      },
      "output": "Some logged output",
      "parent_trace_id": "<<SAME_UUID>>",
      "project_name": "default",
      "root_trace_id": "<<SAME_UUID>>",
      "start_timestamp": "2024-05-30 13:48:34",
      "status": "success",
      "trace_id": "<<UUID>>",
      "trace_name": "test"
    }
  ]
}