Skip to main content

Trace Search

Search for traces and explore span attributes using the TraceQL search API.


Search traces

Endpoint: GET https://euw1-01.t.xscalerlabs.com/api/search

Parameters

ParameterRequiredDescription
qNoTraceQL query string
tagsNoSpace-separated key=value pairs (simple search without TraceQL)
minDurationNoMinimum trace duration, e.g. 500ms, 1s
maxDurationNoMaximum trace duration
limitNoMaximum number of traces to return. Default: 20.
startNoRange start — Unix timestamp (seconds)
endNoRange end — Unix timestamp (seconds)

Examples

Find slow traces

curl "https://euw1-01.t.xscalerlabs.com/api/search" \
-H "Authorization: Bearer <token>" \
-H "X-Scope-OrgID: <tenant-id>" \
--data-urlencode 'q={ duration > 1s }' \
--data-urlencode 'limit=20'

Find error traces from a service

curl "https://euw1-01.t.xscalerlabs.com/api/search" \
-H "Authorization: Bearer <token>" \
-H "X-Scope-OrgID: <tenant-id>" \
--data-urlencode 'q={ resource.service.name = "api" && status = error }' \
--data-urlencode 'start=1716300000' \
--data-urlencode 'end=1716303600'

Simple tag search (no TraceQL)

curl "https://euw1-01.t.xscalerlabs.com/api/search" \
-H "Authorization: Bearer <token>" \
-H "X-Scope-OrgID: <tenant-id>" \
--data-urlencode 'tags=service.name=api http.status_code=500'

Fetch a trace by ID

Endpoint: GET https://euw1-01.t.xscalerlabs.com/api/traces/<traceID>

curl "https://euw1-01.t.xscalerlabs.com/api/traces/abc123def456" \
-H "Authorization: Bearer <token>" \
-H "X-Scope-OrgID: <tenant-id>"

Returns the full trace in OTLP JSON format with all spans and their attributes.


Tag names

Endpoint: GET https://euw1-01.t.xscalerlabs.com/api/search/tags

Returns all indexed span and resource attribute names.

curl "https://euw1-01.t.xscalerlabs.com/api/search/tags" \
-H "Authorization: Bearer <token>" \
-H "X-Scope-OrgID: <tenant-id>"

Response:

{
"tagNames": [
"http.method",
"http.route",
"http.status_code",
"db.system",
"service.name"
]
}

Tag values

Endpoint: GET https://euw1-01.t.xscalerlabs.com/api/search/tag/<tag>/values

Returns all observed values for a given tag — useful for building search UIs or auto-completing queries.

curl "https://euw1-01.t.xscalerlabs.com/api/search/tag/service.name/values" \
-H "Authorization: Bearer <token>" \
-H "X-Scope-OrgID: <tenant-id>"

Response:

{
"tagValues": ["api", "worker", "payment-service", "notification-service"]
}