trace_queries
Creates, updates, deletes, gets or lists a trace_queries resource.
Overview​
| Name | trace_queries |
| Type | Resource |
| Id | sumologic.tracing.trace_queries |
Fields​
The following fields are returned by SELECT queries:
- get
Status of the given trace search query.
| Name | Datatype | Description |
|---|---|---|
query_rows | array | A list of trace queries. (wire: queryRows) |
status | string | Status of the query. Possible values: Processing, Finished, Error, Canceled. (pattern: <code>^(Processing|Finished|Error|Canceled)$</code>, example: Processing, x-pattern-message: Should be either Processing, Finished, Error, Canceled.) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | query_id, region | Get a status of a trace query with the given id. When the query has been completed, use the Trace Query Result endpoint to get the result of the asynchronous query. | |
create | insert | region, query_rows, time_range | Execute a trace search query and get the id to fetch its status and results. Use the Trace Query Status endpoint to check a query status. When the query has been completed, use the Trace Query Result endpoint to get the result of the asynchronous query. | |
delete | delete | query_id, region | Cancel a currently processed trace search query with the given id. |
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.
| Name | Datatype | Description |
|---|---|---|
query_id | string | Identifier of the query to cancel. (wire: queryId) |
region | string | Sumo 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) |
SELECT examples​
- get
Get a status of a trace query with the given id. When the query has been completed, use the Trace Query Result endpoint to get the result of the asynchronous query.
SELECT
query_rows,
status
FROM sumologic.tracing.trace_queries
WHERE query_id = '{{ query_id }}' -- required
AND region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
;
INSERT examples​
- create
- Manifest
Execute a trace search query and get the id to fetch its status and results. Use the Trace Query Status endpoint to check a query status. When the query has been completed, use the Trace Query Result endpoint to get the result of the asynchronous query.
INSERT INTO sumologic.tracing.trace_queries (
query_rows,
time_range,
region
)
SELECT
'{{ query_rows }}' /* required */,
'{{ time_range }}' /* required */,
'{{ region }}'
RETURNING
query_id
;
# Description fields are for documentation purposes
- name: trace_queries
props:
- name: region
value: "{{ region }}"
description: Required parameter for the trace_queries resource.
- name: query_rows
description: |
A list of trace queries.
value:
- query:
type: "{{ type }}"
rowId: "{{ rowId }}"
orderBy:
fieldName: "{{ fieldName }}"
order: "{{ order }}"
- name: time_range
value:
type: "{{ type }}"
DELETE examples​
- delete
Cancel a currently processed trace search query with the given id.
DELETE FROM sumologic.tracing.trace_queries
WHERE query_id = '{{ query_id }}' --required
AND region = '{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
;