v1

latestOpenAPI 3.0.02026-08-064311,0881.3 MB
spanAnalytics

Run a span analytics query asynchronously.

Execute a span analytics query and get the id to fetch its status and results. Use the Span Query Status endpoint to check a query status. When the query has been completed, use the Span Query Result endpoint to get the result of the asynchronous query.

post/v1/tracing/spanquery

Request body

timeZonestring

Time zone for the query time ranges. Follow the format in the IANA Time Zone Database.

Example request

{
  "queryRows": [
    {
      "rowId": "A"
    }
  ],
  "timeRange": {
    "type": "BeginBoundedTimeRange",
    "from": {
      "type": "RelativeTimeRangeBoundary",
      "relativeTime": "-15m"
    }
  },
  "timeZone": "America/Los_Angeles"
}

Response

Query execution result.

queryIdstring required

Id of the created query

hasErrorsboolean

Indicates whether there was an error while executing the query.

Example response

{
  "queryRows": [
    {
      "rowId": "A",
      "errors": [
        {
          "code": "spanquery:query_validation_error",
          "message": "Query A was invalid",
          "details": "[1.78] failure: '(' expected but ')' found."
        }
      ],
      "isAggregation": true,
      "executedQuery": "_index=_trace_spans traceId=00000000002317A9"
    }
  ],
  "hasErrors": true,
  "timeRange": {
    "type": "BeginBoundedTimeRange",
    "from": {
      "type": "RelativeTimeRangeBoundary",
      "relativeTime": "-15m"
    }
  }
}