Traces

Rank operations by latency, volume, or inconsistency.

Changed on

Groups spans by (project, service, span name) over a bounded window and returns count, error rate, total/min/max/avg/stddev duration, p50/p95/p99, and two variability ratios per operation. Sorting is what makes it useful:

  • sort_by=total_time (default) — where the wall-clock actually goes.
  • sort_by=p95 / p99 — what users actually feel.
  • sort_by=variability or tail_ratio — operations whose spread is the problem: the ones that take 40ms most of the time and 4s the rest.
  • span_name=payments.charge — the worst this one operation ever got, in max_duration_ms.

Pair the variability sorts with min_count — a ratio computed from three samples is noise, and without a floor it outranks every real signal.

Two bounds are enforced rather than clamped, so a result never claims to cover more than it does: at most 50 projects, and a window no wider than 31 days. Both return 400. Unlike the trace list this report has no early exit — it aggregates every span in the window before it can rank anything.

get/otel/span-stats

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/otel/span-stats
  • Auth: HTTP bearer

Query parameters

project_idinteger

Single project to report on

project_idsstring

Comma-separated project ids, e.g. 4,5,6 (max 50)

start_timestring

Window start (RFC 3339); defaults to 24h before end_time. The window may not exceed 31 days

end_timestring

Window end (RFC 3339); defaults to now

service_namestring

Restrict to one service

span_namestring

Restrict to one operation by exact span name

name_patternstring

Case-insensitive substring match on the span name

kindstring

server | client | internal | producer | consumer

statusstring

ok | error | unset

environment_idinteger

Restrict to one environment

deployment_idinteger

Restrict to one deployment

attributesstring

Comma-separated key=value span attribute filters

min_duration_msnumber double

Ignore spans faster than this

min_countinteger

Drop operations with fewer samples than this

sort_bystring

total_time | p50 | p95 | p99 | max | avg | stddev | count | errors | error_rate | variability | tail_ratio

sort_orderstring

asc | desc (default)

limitinteger

Page size (default 20, max 100)

offsetinteger

Page offset

Response

Per-operation latency statistics

end_timestring date-time required
start_timestring date-time required

The window actually aggregated, echoed back because it is defaulted server-side when the caller omits it.

totalinteger required

Total number of distinct operations matching the filters, for pagination.

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status