span_query_results
Creates, updates, deletes, gets or lists a span_query_results resource.
Overview​
| Name | span_query_results |
| Type | Resource |
| Id | sumologic.tracing.span_query_results |
Fields​
The following fields are returned by SELECT queries:
- list
Details about the given span query.
| Name | Datatype | Description |
|---|---|---|
parent_span_id | string | Identifier of the parent span, if any. If the span has no parent it's considered a root span. (example: 000000000003C7BE) (wire: parentSpanId) |
span_id | string | Identifier of the span. (example: 00000000002317A9) (wire: spanId) |
trace_id | string | Identifier of the trace. (example: 1BB004A0005213C2) (wire: traceId) |
operation_name | string | The name of the operation given to the span. (example: retrieveAccount) (wire: operationName) |
duration | integer (int64) | Number of nanoseconds the span lasted. |
kind | string | Span kind describes the relationship between the Span, its parents, and its children in a Trace. Possible values: CLIENT, SERVER, PRODUCER, CONSUMER, INTERNAL. (pattern: <code>^(CLIENT|SERVER|PRODUCER|CONSUMER|INTERNAL)$</code>, example: SERVER, x-pattern-message: Should be either CLIENT, SERVER, PRODUCER, CONSUMER or INTERNAL.) |
metadata | object | Metadata attached to the span. |
remote_service | string | Name of the possible remote span's service. (example: external-service) (wire: remoteService) |
service | string | The name of the service this span is part of. (example: user-service) |
started_at | string (date-time) | Date and time the span was started in [ISO 8601 / RFC3339](https:​//tools.ietf.org/html/rfc3339) format. (example: 2019-11-22T09:00:00.000Z) (wire: startedAt) |
status | object | |
tags_json | string | Tags attached to this span as JSON. (example: {<br /> "http.host":"http:​//example.com",<br /> "http.request.method":"GET"<br />}) (wire: tagsJSON) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | query_id, row_id, region | limit, token | Get a list of spans matching a query with the specified id. The response is paginated with a default limit of 100 spans 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.
| Name | Datatype | Description |
|---|---|---|
query_id | string | Identifier of the executed query. (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) |
row_id | string | Identifier of the query row. (wire: rowId) |
limit | integer (int32) | Limit of the number of spans returned in the response. |
token | string | Continuation 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​
- list
Get a list of spans matching a query with the specified id. The response is paginated with a default limit of 100 spans per page.
SELECT
parent_span_id,
span_id,
trace_id,
operation_name,
duration,
kind,
metadata,
remote_service,
service,
started_at,
status,
tags_json
FROM sumologic.tracing.span_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 }}'
;