Skip to content
GitHubLog inStart free
cetra is not released yet. These docs describe the development version.

List traces

GET
/api/v1/projects/{project}/traces
curl --request GET \
--url 'http://localhost:8080/api/v1/projects/example/traces?sort=start_time&order=asc&limit=50' \
--cookie cetra_session=<cetra_session>

Evaluation, playground and assistant traces (environment = cetra-eval, environment = cetra-playground or environment = cetra-assistant) and experiment traces are excluded unless include_eval or include_experiments is set.

project
required
string

Project UUID, URL-encoded org-slug/project-slug, or current.

filter
string

Filter DSL expression over the traces view (spec 05).

search
string

Full-text search (spec 05 § Full-text search). At most 1,024 bytes (D-G-39).

from

RFC 3339 timestamp or epoch milliseconds.

string

Inclusive range start. RFC 3339 or epoch milliseconds.

to

RFC 3339 timestamp or epoch milliseconds.

string

Exclusive range end. RFC 3339 or epoch milliseconds.

sort

Sort key for trace lists.

Spec 09 § Observability data.

string
Allowed values: start_time duration cost_total total_tokens

Sort key. Defaults to start time.

order

Sort direction. Default is descending.

Spec 09 § Conventions.

string
Allowed values: asc desc

Sort direction. Defaults to descending.

limit

Page size. Default 50, accepted range 1–1000.

Spec 09 § Conventions.

integer format: int32
default: 50 >= 1 <= 1000

Maximum number of items to return (1–1000, default 50).

cursor
string

Opaque cursor from a previous page.

include_eval
boolean

Include traces from the reserved environments (cetra-eval, cetra-playground, cetra-assistant). Default false. Spec 05 § Default exclusions.

include_experiments
boolean

Include experiment traces. Default false. Spec 05 § Default exclusions.

One page of traces.

Media typeapplication/json

One page of results. next_cursor is null when there is no next page.

object
data
required

Items in this page.

Array<object>

One row of the trace list.

Spec 01 § Trace and spec 09 § Observability data.

object
cache_read_tokens

Sum of cache-read tokens. Omitted when every span omitted the field.

integer format: int64
cache_write_tokens

Sum of cache-write tokens. Omitted when every span omitted the field.

integer format: int64
cost_total

Sum of span costs, USD. Omitted when every span omitted the field.

number format: double
duration_ns
required

end_time - start_time, nanoseconds.

integer format: int64
end_time
required

Latest span end, nanoseconds since the Unix epoch. JSON is RFC 3339.

string format: date-time
environment

Deployment environment.

string
error_count
required

Number of spans with status error.

integer format: int64
has_root
required

Whether a span with no parent is present.

boolean
input_preview

Root input preview, or the first llm span’s.

string
input_tokens

Sum of span input tokens. Omitted when every span omitted the field.

integer format: int64
llm_count
required

Number of llm spans.

integer format: int64
metadata
required

Root metadata, filled with keys from later spans when absent.

object
key
additional properties
string
models
required

Sorted distinct model names.

Array<string>
name
required

Root span name, or the earliest span’s name when there is no root.

string
output_preview

Root output preview, or the first llm span’s.

string
output_tokens

Sum of span output tokens. Omitted when every span omitted the field.

integer format: int64
prompts

Distinct name@version of the prompt versions that this trace’s spans link (D-V-15). Omitted when no span links a prompt version.

Array<string>
reasoning_tokens

Sum of reasoning tokens. Omitted when every span omitted the field.

integer format: int64
release

Release.

string
root_span_id

Span id of the root. Omitted when the trace has no root.

string
/^[0-9a-fA-F]{16}$/
scores
required

Latest score of each name attached to this trace.

Array<object>

The latest score of one name on a trace or session row.

Spec 09 § Response shapes.

object
name
required

Score name.

string
score_id
required

Score id.

string format: uuid
source
required

Who wrote the score.

string
Allowed values: api sdk human end_user llm_judge check webhook issue
value
required

Score value.

One of:

A finite number.

object
data_type
required
string
Allowed values: numeric
value
required

A finite number.

number format: double
session_id

Session id.

string
span_count
required

Number of spans.

integer format: int64
start_time
required

Earliest span start, nanoseconds since the Unix epoch. JSON is RFC 3339.

string format: date-time
status
required

error when any span errored, otherwise the root’s status, otherwise unset.

string
Allowed values: unset ok error
tags
required

Sorted distinct tags of every span.

Array<string>
total_tokens

Sum of total tokens. Omitted when every span omitted the field.

integer format: int64
trace_id
required

Trace id.

string
/^[0-9a-fA-F]{32}$/
user_id

End-user id.

string
next_cursor
required

Opaque cursor for the next page, or null when this is the last page.

string | null

Example

{
"data": [
{
"scores": [
{
"source": "api",
"value": {
"data_type": "numeric"
}
}
],
"status": "unset"
}
]
}

The request is malformed or a filter is invalid.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

No credentials, or the credentials are invalid.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

The credentials do not allow this operation, or the organization’s plan does not include it (code plan_required).

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

The resource does not exist.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

The query took longer than its time limit, needed more memory or temporary disk space than allowed, a filter deletion matched more than 100,000 traces, or the owner cannot be that user (code owner_not_allowed).

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

Too many requests.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

The server is busy or a dependency is unavailable. Retry later.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}