Uptrace JSON API

Uptrace Cloud provides the following API free of charge as long as you use it occasionally to read a small fraction of the ingested data, for example, a few requests per hour to read data for the last 1 hour is fine.

If you need more than that, please contact support to discuss your use case.

Authentication

To use the API below, you will need a project id (<project_id>) and an authentication token (<token>).

You can create an authentication token on your user profile page. The token will have the same permissions as the user, .i.e. you should be able to access the same projects.

List spans

You can retrieve a list of spans like this:

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

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/<project_id>/groups?time_gte=2023-07-10T00:00:00Z&time_lt=2023-07-11T00:00:00Z&query=group%20by%20host_name \
   -H 'Authorization: Bearer <token>'

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: