Skip to main content

trace_query_results

Creates, updates, deletes, gets or lists a trace_query_results resource.

Overview​

Nametrace_query_results
TypeResource
Idsumologic.tracing.trace_query_results

Fields​

The following fields are returned by SELECT queries:

Details about the given span query.

NameDatatypeDescription
idstringTrace identifier. (example: 00000000000120CB)
root_operation_namestringThe name of the operation given to the root span. (example: retrieveAccount) (wire: rootOperationName)
critical_path_service_breakdown_summaryobject (wire: criticalPathServiceBreakdownSummary)
metricsobjectCalculated trace metrics.
root_resourcestringRoot resource on which the trace was started. Examples: db.query, http.request, rpc.call, container (example: http.request) (wire: rootResource)
root_servicestringRoot service which started the trace. Examples: user-service, authentication-service, payment-service, /shopping-cart (example: user-service) (wire: rootService)
root_statusobject (wire: rootStatus)
started_atstring (date-time)Date and time the trace was started in [ISO 8601 / RFC3339](https:​//tools.ietf.org/html/rfc3339) format. (example: 2019-11-22T09:00:00.000Z) (wire: startedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectquery_id, row_id, regionlimit, tokenGet a list of traces matching a query with the specified id. The response is paginated with a default limit of 100 traces per page.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
query_idstringIdentifier of the executed query. (wire: queryId)
regionstringSumo Logic deployment (au, ca, ch, de, eu, fed, in, jp, kr, us1, us2). Resolved from the SUMOLOGIC_ENVIRONMENT environment variable when it is set (x-stackQL-envVar, the same variable the Terraform provider reads); otherwise defaults to us2. A WHERE region = '...' value always takes precedence. (enum: [au, ca, ch, de, eu, fed, in, jp, kr, us1, us2], default: us2, x-stackQL-envVar: SUMOLOGIC_ENVIRONMENT)
row_idstringIdentifier of the query row. (wire: rowId)
limitinteger (int32)Limit of the number of traces returned in the response.
tokenstringContinuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left.

SELECT examples​

Get a list of traces matching a query with the specified id. The response is paginated with a default limit of 100 traces per page.

SELECT
id,
root_operation_name,
critical_path_service_breakdown_summary,
metrics,
root_resource,
root_service,
root_status,
started_at
FROM sumologic.tracing.trace_query_results
WHERE query_id = '{{ query_id }}' -- required
AND row_id = '{{ row_id }}' -- required
AND region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
AND limit = '{{ limit }}'
AND token = '{{ token }}'
;