spans
Creates, updates, deletes, gets or lists a spans resource.
Overview​
| Name | spans |
| Type | Resource |
| Id | sumologic.tracing.spans |
Fields​
The following fields are returned by SELECT queries:
- get
- list
Details of the span with the given identifier.
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier of the span. (example: 00000000002317A9) |
parent_id | string | Identifier of the parent span, if any. If the span has no parent it's considered a root span. (example: 000000000003C7BE) (wire: parentId) |
operation_name | string | The name of the operation given to the span. (example: retrieveAccount) (wire: operationName) |
critical_path_contribution | object | (wire: criticalPathContribution) |
duration | integer (int64) | Number of nanoseconds the span lasted. |
error_message | string | Produced error message (could be a stack trace, database error code, ..) (example: Exception in thread "local[9]" java.lang.OutOfMemoryError: Java heap space<br /> at my.app.force.fields.SpaceShipForceField.main(SpaceShipForceField.java:17)<br />) (wire: errorMessage) |
events | array | Events attached to this span. |
fields | object | Fields attached to this span. |
info | object | |
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.) |
links | array | List of casually related spans. |
logs | array | Logs attached to this span. |
number_of_links | integer (int32) | Number of span links in this span. (wire: numberOfLinks) |
remote_service | string | Name of the possible remote span's service. (example: external-service) (wire: remoteService) |
remote_service_color | string | Color hex code assigned to the remote service. (example: #fa41c6) (wire: remoteServiceColor) |
remote_service_type | string | Defines type of service. (pattern: <code>^(Db|HTTP|MQ|Web|Mixed|Unknown|Cpp|DotNET|Erlang|Go|Java|NodeJS|Php|Python|Ruby|WebJS|Swift|MSSQL|MySQL|Oracle|Db2|PostgreSQL|Redshift|Hive|Cloudscape|HSQLDB|Progress|MaxDB|HANADB|Ingres|FirstSQL|EnterpriseDB|Cache|Adabas|Firebird|ApacheDerby|FileMaker|Informix|InstantDB|InterBase|MariaDB|Netezza|PervasivePSQL|PointBase|SQLite|Sybase|Teradata|Vertica|H2|ColdFusion|Cassandra|HBase|MongoDB|Redis|Couchbase|CouchDB|CosmosDB|DynamoDB|Neo4j|Geode|Elasticsearch|Memcached|CockroachDB|RPC|gRPC|JavaRMI|DotNETWCF|ApacheDubbo)$</code>, example: HTTP, x-pattern-message: Should be either Db, HTTP, MQ, Web, Mixed, Unknown, Cpp, DotNET, Erlang, Go, Java, NodeJS, Php, Python, Ruby, WebJS, Swift, MSSQL, MySQL, Oracle, Db2, PostgreSQL, Redshift, Hive, Cloudscape, HSQLDB, Progress, MaxDB, HANADB, Ingres, FirstSQL, EnterpriseDB, Cache, Adabas, Firebird, ApacheDerby, FileMaker, Informix, InstantDB, InterBase, MariaDB, Netezza, PervasivePSQL, PointBase, SQLite, Sybase, Teradata, Vertica, H2, ColdFusion, Cassandra, HBase, MongoDB, Redis, Couchbase, CouchDB, CosmosDB, DynamoDB, Neo4j, Geode, Elasticsearch, Memcached, CockroachDB, RPC, gRPC, JavaRMI, DotNETWCF or ApacheDubbo) (wire: remoteServiceType) |
resource | string | The name of the resource attached to the span. (example: http.request) |
service | string | The name of the service this span is part of. (example: user-service) |
service_color | string | Color hex code assigned to the service. (example: #fa41c6) (wire: serviceColor) |
service_type | string | Defines type of service. (pattern: <code>^(Db|HTTP|MQ|Web|Mixed|Unknown|Cpp|DotNET|Erlang|Go|Java|NodeJS|Php|Python|Ruby|WebJS|Swift|MSSQL|MySQL|Oracle|Db2|PostgreSQL|Redshift|Hive|Cloudscape|HSQLDB|Progress|MaxDB|HANADB|Ingres|FirstSQL|EnterpriseDB|Cache|Adabas|Firebird|ApacheDerby|FileMaker|Informix|InstantDB|InterBase|MariaDB|Netezza|PervasivePSQL|PointBase|SQLite|Sybase|Teradata|Vertica|H2|ColdFusion|Cassandra|HBase|MongoDB|Redis|Couchbase|CouchDB|CosmosDB|DynamoDB|Neo4j|Geode|Elasticsearch|Memcached|CockroachDB|RPC|gRPC|JavaRMI|DotNETWCF|ApacheDubbo)$</code>, example: HTTP, x-pattern-message: Should be either Db, HTTP, MQ, Web, Mixed, Unknown, Cpp, DotNET, Erlang, Go, Java, NodeJS, Php, Python, Ruby, WebJS, Swift, MSSQL, MySQL, Oracle, Db2, PostgreSQL, Redshift, Hive, Cloudscape, HSQLDB, Progress, MaxDB, HANADB, Ingres, FirstSQL, EnterpriseDB, Cache, Adabas, Firebird, ApacheDerby, FileMaker, Informix, InstantDB, InterBase, MariaDB, Netezza, PervasivePSQL, PointBase, SQLite, Sybase, Teradata, Vertica, H2, ColdFusion, Cassandra, HBase, MongoDB, Redis, Couchbase, CouchDB, CosmosDB, DynamoDB, Neo4j, Geode, Elasticsearch, Memcached, CockroachDB, RPC, gRPC, JavaRMI, DotNETWCF or ApacheDubbo) (wire: serviceType) |
started_at | string (date-time) | Date and time the span was started in the [ISO 8601 / RFC3339](https:​//tools.ietf.org/html/rfc3339) format. (example: 2019-11-22T09:00:00.000Z) (wire: startedAt) |
status | object |
List of spans for the given trace.
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier of the span. (example: 00000000002317A9) |
parent_id | string | Identifier of the parent span, if any. If the span has no parent it's considered a root span. (example: 000000000003C7BE) (wire: parentId) |
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. |
info | object | |
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.) |
number_of_links | integer (int32) | Number of span links in this span. (wire: numberOfLinks) |
remote_service | string | Name of the possible remote span's service. (example: external-service) (wire: remoteService) |
remote_service_color | string | Color hex code assigned to the remote service. (example: #fa41c6) (wire: remoteServiceColor) |
remote_service_type | string | Defines type of service. (pattern: <code>^(Db|HTTP|MQ|Web|Mixed|Unknown|Cpp|DotNET|Erlang|Go|Java|NodeJS|Php|Python|Ruby|WebJS|Swift|MSSQL|MySQL|Oracle|Db2|PostgreSQL|Redshift|Hive|Cloudscape|HSQLDB|Progress|MaxDB|HANADB|Ingres|FirstSQL|EnterpriseDB|Cache|Adabas|Firebird|ApacheDerby|FileMaker|Informix|InstantDB|InterBase|MariaDB|Netezza|PervasivePSQL|PointBase|SQLite|Sybase|Teradata|Vertica|H2|ColdFusion|Cassandra|HBase|MongoDB|Redis|Couchbase|CouchDB|CosmosDB|DynamoDB|Neo4j|Geode|Elasticsearch|Memcached|CockroachDB|RPC|gRPC|JavaRMI|DotNETWCF|ApacheDubbo)$</code>, example: HTTP, x-pattern-message: Should be either Db, HTTP, MQ, Web, Mixed, Unknown, Cpp, DotNET, Erlang, Go, Java, NodeJS, Php, Python, Ruby, WebJS, Swift, MSSQL, MySQL, Oracle, Db2, PostgreSQL, Redshift, Hive, Cloudscape, HSQLDB, Progress, MaxDB, HANADB, Ingres, FirstSQL, EnterpriseDB, Cache, Adabas, Firebird, ApacheDerby, FileMaker, Informix, InstantDB, InterBase, MariaDB, Netezza, PervasivePSQL, PointBase, SQLite, Sybase, Teradata, Vertica, H2, ColdFusion, Cassandra, HBase, MongoDB, Redis, Couchbase, CouchDB, CosmosDB, DynamoDB, Neo4j, Geode, Elasticsearch, Memcached, CockroachDB, RPC, gRPC, JavaRMI, DotNETWCF or ApacheDubbo) (wire: remoteServiceType) |
resource | string | The name of the resource attached to the span. (example: http.request) |
service | string | The name of the service this span is part of. (example: user-service) |
service_color | string | Color hex code assigned to the service. (example: #fa41c6) (wire: serviceColor) |
service_type | string | Defines type of service. (pattern: <code>^(Db|HTTP|MQ|Web|Mixed|Unknown|Cpp|DotNET|Erlang|Go|Java|NodeJS|Php|Python|Ruby|WebJS|Swift|MSSQL|MySQL|Oracle|Db2|PostgreSQL|Redshift|Hive|Cloudscape|HSQLDB|Progress|MaxDB|HANADB|Ingres|FirstSQL|EnterpriseDB|Cache|Adabas|Firebird|ApacheDerby|FileMaker|Informix|InstantDB|InterBase|MariaDB|Netezza|PervasivePSQL|PointBase|SQLite|Sybase|Teradata|Vertica|H2|ColdFusion|Cassandra|HBase|MongoDB|Redis|Couchbase|CouchDB|CosmosDB|DynamoDB|Neo4j|Geode|Elasticsearch|Memcached|CockroachDB|RPC|gRPC|JavaRMI|DotNETWCF|ApacheDubbo)$</code>, example: HTTP, x-pattern-message: Should be either Db, HTTP, MQ, Web, Mixed, Unknown, Cpp, DotNET, Erlang, Go, Java, NodeJS, Php, Python, Ruby, WebJS, Swift, MSSQL, MySQL, Oracle, Db2, PostgreSQL, Redshift, Hive, Cloudscape, HSQLDB, Progress, MaxDB, HANADB, Ingres, FirstSQL, EnterpriseDB, Cache, Adabas, Firebird, ApacheDerby, FileMaker, Informix, InstantDB, InterBase, MariaDB, Netezza, PervasivePSQL, PointBase, SQLite, Sybase, Teradata, Vertica, H2, ColdFusion, Cassandra, HBase, MongoDB, Redis, Couchbase, CouchDB, CosmosDB, DynamoDB, Neo4j, Geode, Elasticsearch, Memcached, CockroachDB, RPC, gRPC, JavaRMI, DotNETWCF or ApacheDubbo) (wire: serviceType) |
started_at | string (date-time) | Date and time the span was started in the [ISO 8601 / RFC3339](https:​//tools.ietf.org/html/rfc3339) format. (example: 2019-11-22T09:00:00.000Z) (wire: startedAt) |
status | object |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | trace_id, span_id, region | Get details of a span with the given identifier. | |
list | select | trace_id, region | limit, token | Get a list of spans for the given trace. 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 |
|---|---|---|
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) |
span_id | string | Identifier of the span to get the details. (wire: spanId) |
trace_id | string | Identifier of the trace to get the spans. (wire: traceId) |
limit | integer (int32) | The maximum number of results to fetch. |
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​
- get
- list
Get details of a span with the given identifier.
SELECT
id,
parent_id,
operation_name,
critical_path_contribution,
duration,
error_message,
events,
fields,
info,
kind,
links,
logs,
number_of_links,
remote_service,
remote_service_color,
remote_service_type,
resource,
service,
service_color,
service_type,
started_at,
status
FROM sumologic.tracing.spans
WHERE trace_id = '{{ trace_id }}' -- required
AND span_id = '{{ span_id }}' -- required
AND region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
;
Get a list of spans for the given trace. The response is paginated with a default limit of 100 spans per page.
SELECT
id,
parent_id,
operation_name,
duration,
info,
kind,
number_of_links,
remote_service,
remote_service_color,
remote_service_type,
resource,
service,
service_color,
service_type,
started_at,
status
FROM sumologic.tracing.spans
WHERE trace_id = '{{ trace_id }}' -- required
AND region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
AND limit = '{{ limit }}'
AND token = '{{ token }}'
;