Uptrace JSON API

List spans

You can retrieve a list of spans like this:

curl https://api.uptrace.dev/api/v1/tracing/spans?time_gte=2023-07-10T00:00:00Z&time_lt=2023-07-11T00:00:00Z \
   -H 'uptrace-dsn: https://token@api.uptrace.dev/project_id'

Supported query params:

ParamComment
?time_gte=2023-07-10T00:00:00ZRequiredTime greater than or equal to time_gte.
?time_lt=2023-07-11T00:00:00ZRequiredTime lower than time_lt.
?trace_id=17706d68ea23cf9bc8976ca57d22ee31OptionalFilter spans by trace id.
?id=12345OptionalFilter spans by span id.
?parent_id=12345OptionalFilter spans by parent span id.
?limit=10000OptionalLimit number of spans.

Query groups

You can aggregate spans using UQL like this:

curl https://api.uptrace.dev/api/v1/tracing/groups?time_gte=2023-07-10T00:00:00Z&time_lt=2023-07-11T00:00:00Z&query=group%20by%20host.name \
   -H 'uptrace-dsn: https://token@api.uptrace.dev/project_id'

Supported query params:

ParamComment
?time_gte=2023-07-10T00:00:00ZRequiredTime greater than or equal to time_gte.
?time_lt=2023-07-11T00:00:00ZRequiredTime lower than time_lt.
?query=group by host.nameOptionalAggregate spans with the query.
?limit=10000OptionalLimit number of spans.
?search=option1|option2OptionalSearch for spans that contain option1 or option2.
?duration_gte=10000OptionalDuration greater than or equal to N. Microseconds.
?duration_lt=100000OptionalDuration greater than or equal to N. Microseconds.
Last Updated: