- API Reference
- endpoint
- beta
- observability
Beta Observability Spans
Beta Observability Spans
POST /v1/observability/spans/search
Search spans
Search spans
Parameters
from
date-time | nullqueryto
date-time | nullquerypage_size
integerquerycursor
string | nullqueryRequest Example
{}
Request Body
search_expression
string | nullResponses
Successful Response
FeedResultGetSpan
cursor
string | nullnext
string | nullresults
array<GetSpan>GetSpan
agent_description
string* requiredagent_id
string* requiredagent_name
string* requiredagent_version
string* requiredconversation_id
string* requiredcustomer_id
string* requireddata_source_id
string* requiredduration_ns
integer* requiredend_time
date-time* requirederror_type
string* requiredinput_messages
string* requiredoperation_name
string* requiredorganization_id
string* requiredoutput_messages
string* requiredoutput_type
string* requiredparent_span_id
string* requiredprompt_name
string* requiredprovider_name
string* requiredrequest_choice_count
integer* requiredrequest_encoding_formats
array<string>* requiredrequest_frequency_penalty
number | null* requiredrequest_max_tokens
integer* requiredrequest_model
string* requiredrequest_presence_penalty
number | null* requiredrequest_seed
integer* requiredrequest_stop_sequences
array<string>* requiredrequest_temperature
number | null* requiredrequest_top_k
number | null* requiredrequest_top_p
number | null* requiredresource_attributes
map<string>* requiredresponse_finish_reasons
array<string>* requiredresponse_id
string* requiredresponse_model
string* requiredscope_name
string* requiredscope_version
string* requiredservice_account_id
stringDefault Value: ""
service_name
string* requiredspan_attributes
map<string>* requiredspan_id
stringPattern: ^[0-9a-f]{16}$* requiredspan_kind
string* requiredspan_name
string* requiredstart_time
date-time* requiredstatus_code
"Error" | "Ok" | "Unset"* requiredstatus_message
string* requiredsystem_instructions
string* requiredtool_call_arguments
string* requiredtool_call_id
string* requiredtool_call_result
string* requiredtool_definitions
string* requiredtool_name
string* requiredtool_type
string* requiredtrace_id
stringPattern: ^[0-9a-f]{32}$* requiredtrace_state
string* requiredusage_cache_creation_input_tokens
integer* requiredusage_cache_read_input_tokens
integer* requiredusage_input_tokens
integer* requiredusage_output_tokens
integer* requireduser_id
string* requiredworkflow_name
string* requiredworkspace_id
string* requiredPOST /v1/observability/spans/aggregate
Aggregate spans
Aggregate spans
Parameters
from
date-time | nullqueryto
date-time | nullqueryRequest Example
{
"metric": {
"aggregation": "count",
"measure": "ipsum eiusmod"
}
}
Request Body
dimensions
array<string>limit
integerMin: 1Max: 10000Default Value: 1000
MetricDefinition
aggregation
"count" | "count_distinct" | "sum" | "avg" | "min" | "max" | "p50" | "p90" | "p95" | "p99"* requiredmeasure
string* requiredorder_by
array<OrderByClause> | nullOrderByClause
direction
"asc" | "desc"Default Value: "asc"
field
string* requiredsearch_expression
string | nulltime_dimension
TimeDimension | nullTimeDimension
granularity
"auto" | "second" | "minute" | "hour" | "day" | "week" | "month"Responses
Successful Response
AggregationRow
dimensions
map<any>metric_name
string* requiredmetric_value
number | integer | date-time | nulltime_bucket
date-time | nullAggregationMeta
from_timestamp
date-time* requiredgranularity_seconds
integer | nullto_timestamp
date-time* requiredPOST /v1/observability/spans/evaluations/aggregate
Aggregate span evaluations
Aggregate span evaluations
Parameters
from
date-time | nullqueryto
date-time | nullqueryRequest Example
{
"metric": {
"aggregation": "count",
"measure": "ipsum eiusmod"
}
}
Request Body
dimensions
array<string>limit
integerMin: 1Max: 10000Default Value: 1000
MetricDefinition
aggregation
"count" | "count_distinct" | "sum" | "avg" | "min" | "max" | "p50" | "p90" | "p95" | "p99"* requiredmeasure
string* requiredorder_by
array<OrderByClause> | nullOrderByClause
direction
"asc" | "desc"Default Value: "asc"
field
string* requiredsearch_expression
string | nulltime_dimension
TimeDimension | nullTimeDimension
granularity
"auto" | "second" | "minute" | "hour" | "day" | "week" | "month"Responses
Successful Response
AggregationRow
dimensions
map<any>metric_name
string* requiredmetric_value
number | integer | date-time | nulltime_bucket
date-time | nullAggregationMeta
from_timestamp
date-time* requiredgranularity_seconds
integer | nullto_timestamp
date-time* requiredPOST /v1/observability/spans/evaluations/search
Search span evaluations
Search span evaluations
Parameters
from
date-time | nullqueryto
date-time | nullquerypage_size
integerquerycursor
string | nullqueryRequest Example
{}
Request Body
search_expression
string | nullResponses
Successful Response
FeedResultGetSpanEvaluation
cursor
string | nullnext
string | nullresults
array<GetSpanEvaluation>GetSpanEvaluation
conversation_id
string* requiredcustomer_id
string* requiredevaluation_name
string* requiredexplanation
string* requiredmetadata
map<string>* requiredorganization_id
string* requiredresponse_id
string* requiredscore_label
string* requiredscore_value
number* requiredservice_account_id
stringDefault Value: ""
span_id
stringPattern: ^[0-9a-f]{16}$* requiredtimestamp
date-time* requiredtrace_id
stringPattern: ^[0-9a-f]{32}$* requireduser_id
string* requiredworkspace_id
string* requiredPOST /v1/observability/spans/evaluations/search/latest
Search latest span evaluations
Search latest span evaluations
Parameters
from
date-time | nullqueryto
date-time | nullquerypage_size
integerquerycursor
string | nullqueryRequest Example
{}
Request Body
search_expression
string | nullResponses
Successful Response
FeedResultGetSpanEvaluation
cursor
string | nullnext
string | nullresults
array<GetSpanEvaluation>GetSpanEvaluation
conversation_id
string* requiredcustomer_id
string* requiredevaluation_name
string* requiredexplanation
string* requiredmetadata
map<string>* requiredorganization_id
string* requiredresponse_id
string* requiredscore_label
string* requiredscore_value
number* requiredservice_account_id
stringDefault Value: ""
span_id
stringPattern: ^[0-9a-f]{16}$* requiredtimestamp
date-time* requiredtrace_id
stringPattern: ^[0-9a-f]{32}$* requireduser_id
string* requiredworkspace_id
string* requiredPOST /v1/observability/pipeline-results/search
Search pipeline results
Search pipeline results
Parameters
from
date-time | nullqueryto
date-time | nullquerypage_size
integerquerycursor
string | nullqueryRequest Example
{
"pipeline_config_slugs": [
"ipsum eiusmod"
]
}
Request Body
pipeline_config_slugs
array<string>Min Items: 1Max Items: 100* requiredsearch_expression
string | nullResponses
Successful Response
FeedResultGetPipelineResult
cursor
string | nullnext
string | nullresults
array<PipelineResult>PipelineResult
duration_ns
integer* requiredevaluated_at
date-time* requiredjudge_explanations
map<string>* requiredjudge_labels
map<string>* requiredjudge_scores
map<number>* requiredoperation_name
string* requiredspan_id
stringPattern: ^[0-9a-f]{16}$* requiredspan_name
string* requiredtool_name
string* requiredtrace_id
stringPattern: ^[0-9a-f]{32}$* requiredGET /v1/observability/pipelines/{pipeline_id}/results/fields
Get pipeline result field definitions
Get pipeline result field definitions
Parameters
pipeline_id
stringpath* requiredResponses
Successful Response
OtelEnumFieldDefinition
constraints
EnumConstraints | nullEnumConstraints
options
array<string> | nullgroup
string | nulllabel
string* requiredname
string* requiredsource_attribute_key
string | nullRaw OpenTelemetry attribute key this field is projected from, whether a span attribute (e.g. gen_ai.request.model for request_model) or a resource attribute (e.g. service.name for service_name). None when the field is a native OTLP field (like span_name or trace_id) or a nested attribute map (like span_attributes).
supported_aggregations
array<"count" | "count_distinct" | "sum" | "avg" | "min" | "max" | "p50" | "p90" | "p95" | "p99">* requiredsupported_operators
array<"eq" | "neq" | "lt" | "lte" | "gt" | "gte" | "like" | "ilike" | "not_like" | "not_ilike" | "between" | "not_between" | "in" | "not_in" | "exists" | "not_exists" | "regexp" | "not_regexp" | "contains" | "not_contains" | "has" | "hasAny" | "hasAll" | "hasToken">* requiredtype
stringDefault Value: "ENUM"
OtelFloatFieldDefinition
constraints
FloatConstraints | nullFloatConstraints
max
number | nullmin
number | nullgroup
string | nulllabel
string* requiredname
string* requiredsource_attribute_key
string | nullRaw OpenTelemetry attribute key this field is projected from, whether a span attribute (e.g. gen_ai.request.model for request_model) or a resource attribute (e.g. service.name for service_name). None when the field is a native OTLP field (like span_name or trace_id) or a nested attribute map (like span_attributes).
supported_aggregations
array<"count" | "count_distinct" | "sum" | "avg" | "min" | "max" | "p50" | "p90" | "p95" | "p99">* requiredsupported_operators
array<"eq" | "neq" | "lt" | "lte" | "gt" | "gte" | "like" | "ilike" | "not_like" | "not_ilike" | "between" | "not_between" | "in" | "not_in" | "exists" | "not_exists" | "regexp" | "not_regexp" | "contains" | "not_contains" | "has" | "hasAny" | "hasAll" | "hasToken">* requiredtype
stringDefault Value: "FLOAT"
GET /v1/observability/spans/fields
Get span field definitions
Get span field definitions
Responses
Successful Response
OtelFieldDefinition
group
string | nulllabel
string* requiredname
string* requiredsource_attribute_key
string | nullRaw OpenTelemetry attribute key this field is projected from, whether a span attribute (e.g. gen_ai.request.model for request_model) or a resource attribute (e.g. service.name for service_name). None when the field is a native OTLP field (like span_name or trace_id) or a nested attribute map (like span_attributes).
supported_aggregations
array<"count" | "count_distinct" | "sum" | "avg" | "min" | "max" | "p50" | "p90" | "p95" | "p99">* requiredsupported_operators
array<"eq" | "neq" | "lt" | "lte" | "gt" | "gte" | "like" | "ilike" | "not_like" | "not_ilike" | "between" | "not_between" | "in" | "not_in" | "exists" | "not_exists" | "regexp" | "not_regexp" | "contains" | "not_contains" | "has" | "hasAny" | "hasAll" | "hasToken">* requiredtype
"ENUM" | "TEXT" | "INT" | "FLOAT" | "BOOL" | "TIMESTAMP" | "ARRAY" | "MAP"* requiredGET /v1/observability/spans/evaluations/fields
Get span evaluation field definitions
Get span evaluation field definitions
Responses
Successful Response
OtelFieldDefinition
group
string | nulllabel
string* requiredname
string* requiredsource_attribute_key
string | nullRaw OpenTelemetry attribute key this field is projected from, whether a span attribute (e.g. gen_ai.request.model for request_model) or a resource attribute (e.g. service.name for service_name). None when the field is a native OTLP field (like span_name or trace_id) or a nested attribute map (like span_attributes).
supported_aggregations
array<"count" | "count_distinct" | "sum" | "avg" | "min" | "max" | "p50" | "p90" | "p95" | "p99">* requiredsupported_operators
array<"eq" | "neq" | "lt" | "lte" | "gt" | "gte" | "like" | "ilike" | "not_like" | "not_ilike" | "between" | "not_between" | "in" | "not_in" | "exists" | "not_exists" | "regexp" | "not_regexp" | "contains" | "not_contains" | "has" | "hasAny" | "hasAll" | "hasToken">* requiredtype
"ENUM" | "TEXT" | "INT" | "FLOAT" | "BOOL" | "TIMESTAMP" | "ARRAY" | "MAP"* requiredGET /v1/observability/spans/fields/{field_name}/options
Get options for a span field
Get options for a span field
Parameters
field_name
stringpath* requiredfrom
date-time | nullqueryto
date-time | nullqueryResponses
Successful Response
options
array<string> | null* requiredGET /v1/observability/spans/evaluations/fields/{field_name}/options
Get options for a span evaluation field
Get options for a span evaluation field