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:
Param | Comment | |
---|---|---|
?time_gte=2023-07-10T00:00:00Z | Required | Time greater than or equal to time_gte . |
?time_lt=2023-07-11T00:00:00Z | Required | Time lower than time_lt . |
?trace_id=17706d68ea23cf9bc8976ca57d22ee31 | Optional | Filter spans by trace id. |
?id=12345 | Optional | Filter spans by span id. |
?parent_id=12345 | Optional | Filter spans by parent span id. |
?limit=10000 | Optional | Limit 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:
Param | Comment | |
---|---|---|
?time_gte=2023-07-10T00:00:00Z | Required | Time greater than or equal to time_gte . |
?time_lt=2023-07-11T00:00:00Z | Required | Time lower than time_lt . |
?query=group by host.name | Optional | Aggregate spans with the query. |
?limit=10000 | Optional | Limit number of spans. |
?search=option1|option2 | Optional | Search for spans that contain option1 or option2 . |
?duration_gte=10000 | Optional | Duration greater than or equal to N. Microseconds. |
?duration_lt=100000 | Optional | Duration greater than or equal to N. Microseconds. |