Skip to content

search_traces

POST
/traces/v2/search
curl --request POST \
--url https://api.siteqwality.com/traces/v2/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "query": { "v": 1, "signal": "logs", "text": "example", "filters": [ "example" ], "range": { "from": "example", "to": "example" }, "tz": "example", "analytics": { "group_by": [ "example" ], "measure": { "op": "count", "field": "example" }, "interval": "example", "limit": 1, "display": "timeseries" } }, "limit": 1, "cursor": "example", "sort": "example" }'
Media type application/json
object
query
required

A log, span or trace query: the explorer URL, a saved view, a widget, an alert rule and an MCP call all carry this. text and filters are AND-combined.

object
v
required
integer format: int32
signal
required

The signal of an [EventQuery].

string
Allowed values: logs spans traces
text

The text grammar (6.5.2).

string
filters

The f grammar (6.5.1), parsed for the signal’s scope.

Array<string>
range
required

A window of T2 tokens (now, now-2h) or instants (ISO 8601, epoch milliseconds), resolved when the query is compiled, so a stored view stays rolling.

object
from
required
string
to
required
string
tz
string | null
analytics
One of:

Group-by analytics over an [EventQuery]: a time series or a top list.

object
group_by

Up to three fields, in the f field syntax (service, @http.route).

Array<string>
measure
object
op
required
string
Allowed values: count sum avg min max p50 p75 p90 p95 p99
field

A numeric field (duration, @db.rows); none for count.

string | null
interval

A T2 bucket interval or auto; absent means auto.

string | null
limit

Groups returned, 1 to 100; absent means 10.

integer | null format: int32
display
string
Allowed values: timeseries toplist
limit
integer format: int32
cursor
string | null
sort
string | null

OK

Media type application/json
One of:
object
data
required
Array<object>
object
trace_id
required
string
span_id
required
string
parent_span_id
required
string
start_time
required
string
duration_ns
required
string
received_at
required
string
name
required
string
kind
required
string
status
required
string
status_message
required
string
service
required
string
env
required
string
version
required
string
host
required
string
flags
required
integer format: int32
scope_name
required
string
scope_version
required
string
attributes_string
required
object
key
additional properties
string
attributes_number
required
object
key
additional properties
number | null format: double
attributes_bool
required
object
key
additional properties
boolean
resource_attributes
required
object
key
additional properties
string
next_cursor
string | null
meta
required
object
from
required
string
to
required
string
clamped_from
string | null
partial
required
boolean
slow_terms
required
Array<string>
Example generated
{
"data": [
{
"trace_id": "example",
"span_id": "example",
"parent_span_id": "example",
"start_time": "example",
"duration_ns": "example",
"received_at": "example",
"name": "example",
"kind": "example",
"status": "example",
"status_message": "example",
"service": "example",
"env": "example",
"version": "example",
"host": "example",
"flags": 1,
"scope_name": "example",
"scope_version": "example",
"attributes_string": {
"additionalProperty": "example"
},
"attributes_number": {
"additionalProperty": 1
},
"attributes_bool": {
"additionalProperty": true
},
"resource_attributes": {
"additionalProperty": "example"
}
}
],
"next_cursor": "example",
"meta": {
"from": "example",
"to": "example",
"clamped_from": "example",
"partial": true,
"slow_terms": [
"example"
]
}
}

Invalid query, data contains QueryError

Signal restricted

Read quota exhausted

Telemetry paused, busy or unavailable

Narrow the query