Skip to content

Traces reference

POST https://traces.siteqwality.com/v1/traces
Authorization: Bearer <api-key>
Content-Type: application/x-protobuf | application/json

Body: standard OTLP ExportTraceServiceRequest. Most OTel SDK exporters handle the format for you.

SiteQwality renders standard OTel semantic-convention attributes natively. Stick to the standard names where possible:

AttributeDescription
http.methodGET, POST, …
http.urlFull URL including query.
http.targetPath + query (e.g. /api/users?id=123).
http.hostHost header.
http.status_codeNumeric.
http.user_agentUA string.
http.request_content_lengthBytes.
http.response_content_lengthBytes.
AttributeDescription
db.systempostgresql, mysql, redis, mongodb.
db.statementThe SQL/query (consider scrubbing PII).
db.operationSELECT, INSERT, UPDATE.
db.nameDatabase name.
db.userConnection user.
AttributeDescription
messaging.systemkafka, sqs, rabbitmq.
messaging.destinationTopic / queue.
messaging.operationsend, receive, process.

These should be set once on the OTel SDK init (Resource.create({...})) and apply to every span:

AttributeDescription
service.nameRequired. Logical service name.
service.versionApp version.
service.instance.idPod / VM identity.
deployment.environmentprod, staging.
host.nameHostname.
cloud.regionus-east-1.
FieldDescription
trace_id32-char hex; identifies the trace.
span_id16-char hex; identifies the span.
parent_span_idEmpty for root spans.
operation_nameSpan name.
service_nameFrom resource attributes.
span_kindserver, client, producer, consumer, internal.
start_time, end_timeRFC 3339.
duration_msComputed.
status_codeOK or ERROR.
status_messageOptional error message.
attributesAll custom + standard span attributes.
resource_attributesAll resource attributes.
events[]Timestamped log-like events.
links[]Cross-trace span references.
ParamDescription
start_time, end_timeRFC 3339 window.
service_nameExact match.
operation_nameExact match.
min_duration_ms, max_duration_msRange filter.
statusok or error.
searchFree-text across span attributes.
tagsURL-encoded JSON object of span-attribute filters. See tag filters.
limit (default 50, max 200), offsetPagination.
sort_field, sort_orderOrder.

Response:

{
"total": 1234,
"traces": [
{
"trace_id": "...",
"root_service": "api",
"root_operation": "POST /checkout",
"services": ["api", "billing", "db"],
"span_count": 14,
"duration_ms": 482.3,
"error_count": 0,
"start_time": "..."
}
]
}

tags filters on span attributes. It takes a single URL-encoded JSON object, not repeated key=value pairs:

Terminal window
curl -G https://api.siteqwality.com/traces/search \
-H "Authorization: Bearer $SITEQWALITY_API_KEY" \
--data-urlencode 'tags={"http.method":"GET","peer.service":"payments-db"}'

In the dashboard this is the Tag Filters input on the Trace Explorer: type http.method:GET and press Enter to add a filter pill.

Semantics, all of which matter:

  • Multiple keys are ANDed. Every pair must match.
  • Exact, case-sensitive string equality. No wildcards, no negation, no ranges.
  • Values must be JSON strings. {"http.status_code": 200} filters nothing; write {"http.status_code": "200"}.
  • Malformed JSON is ignored rather than rejected. A typo returns unfiltered results instead of an error, so if a filter appears to do nothing, check the JSON first.
  • Span attributes only. Resource attributes, including service.name, are not reachable this way. Use the dedicated service_name parameter for those.

tags is accepted by both GET /traces/search and GET /traces/timeline.

GET /traces/timeline returns, per bucket: time, total, error, and the trace-duration percentiles p50_ms, p95_ms and p99_ms. The dashboard charts these as Latency percentiles.

Read them precisely:

  • They measure whole-trace duration (earliest span start to latest span end), not individual span duration.
  • A trace is attributed to the bucket containing its earliest span start.
  • A trace counts as errored if any span in it has an error status.
  • They are approximate. The underlying quantile is sampled, which is right for charts and wrong for contractual reporting.
  • Empty buckets return zeros, so a flat zero line means no traces, not fast traces.

Bucket width is derived from the time range and cannot be overridden.

MethodPathPurpose
GET/traces/servicesDistinct services seen in window.
GET/traces/operationsDistinct operations (optionally filtered by service).
GET/traces/timelineBucketed counts (total + errors) for charting.
GET/traces/{trace_id}Full span tree.
GET/traces/{trace_id}/logsLogs tagged with this trace_id. span_id filter, limit default 100 / max 500. See correlating logs.
GET/traces/service-mapNodes + edges for the dependency graph.