Explore traces

The Trace Explorer is where you search, filter, and inspect every trace flowing through your AI applications. It's available in Studio at Observability → Traces.

Before you can explore traces, your application needs to be instrumented. See Send traces for setup instructions.

What traces contain

What traces contain

Every trace is a tree of spans. Each span represents one operation in the execution chain.

FieldDescription
Trace IDUnique identifier for the full execution chain
SpansIndividual operations: LLM calls, tool calls, workflow steps
DurationTime taken for each span and the total trace
Token countsInput and output tokens per LLM call
StatusSuccess or error, with error messages when applicable
SourceWhich product generated the trace (SDK, Workflows, Vibe Code, Vibe Work)
TagsCustom tags from SDK usage, plus automatic metadata such as model name

Click any trace in the list to open the span tree. Expand individual spans to inspect inputs, outputs, latency, and token usage at each step.

Search and filter

Search and filter

Explorer accepts a search expression language: write conditions on trace fields and combine them with AND, OR, and NOT.

Operators

Operators

CategoryOperatorsExample
Comparison=, !=, <, <=, >, >=duration_ns > 5000000000
Pattern matchingLIKE, ILIKE, NOT LIKEservice_name LIKE '%agent%'
SubstringCONTAINS, NOT CONTAINSservice_name CONTAINS 'sdk'
RegexREGEXP, NOT REGEXPservice_name REGEXP '^my-'
RangeBETWEEN ... AND ...duration_ns BETWEEN 1000000 AND 5000000000
ListIN (...), NOT IN (...)status_code IN ('Error', 'Ok')
Null checkEXISTS, NOT EXISTSerror_message EXISTS
BooleanAND, OR, NOT, ()status_code = 'Error' AND duration_ns > 1000000
Available fields

Available fields

FieldTypeDescription
service_namestringName of the service that produced the trace
status_codestringTrace status: Ok or Error
duration_nsnumberTotal trace duration in nanoseconds
error_messagestringError message if the trace failed
start_timetimestampWhen the trace started (ISO 8601)
models_usedarrayModels called within the trace
span_attributes['key']map valueAny span attribute, using bracket syntax
Span attribute queries

Span attribute queries

Use bracket syntax to filter on any OpenTelemetry span attribute:

span_attributes['gen_ai.request.model'] CONTAINS 'mistral-large'
span_attributes['gen_ai.operation.name'] = 'chat'
span_attributes['custom.tag'] EXISTS
Array fields

Array fields

For array fields like models_used:

FunctionExample
CONTAINSmodels_used CONTAINS 'mistral-medium-latest'
has(field, value)has(models_used, 'mistral-medium-latest')
hasany(field, [values])hasany(models_used, ['mistral-large-latest', 'mistral-small-latest'])
hasall(field, [values])hasall(models_used, ['mistral-large-latest', 'mistral-small-latest'])
Common examples

Common examples

# All failed traces from a specific service
service_name = 'my-agent' AND status_code = 'Error'

# Traces slower than 5 seconds
duration_ns > 5000000000

# Traces using a specific model
span_attributes['gen_ai.request.model'] CONTAINS 'mistral-large'
Query traces programmatically

Query traces programmatically

All trace data is accessible via the REST API. The endpoints are documented in the API reference:

  • Traces: search traces, get a single trace, list fields and field options.
  • Spans: list spans for a trace, query span evaluations.
Access

Access

Reading traces requires an Enterprise organization and one of the following roles:

RoleAccess
Org AdminAll traces across all workspaces
Workspace AdminAll traces in their workspace
Observability ViewerAll traces in their workspace (read-only)

A Workspace Admin or Org Admin can assign the Observability Viewer role to grant read-only access without admin privileges.

FAQ

FAQ