traces_spans
Creates, updates, deletes, gets or lists a traces_spans
resource.
Overview
Name | traces_spans |
Type | Resource |
Id | sumologic.tracing.traces_spans |
Fields
The following fields are returned by SELECT
queries:
- getSpan
- getSpans
Details of the span with the given identifier.
Name | Datatype | Description |
---|---|---|
id | string | Identifier of the span. (example: 00000000002317A9) |
criticalPathContribution | object | |
duration | integer (int64) | Number of nanoseconds the span lasted. |
errorMessage | string | Produced error message (could be a stack trace, database error code, ..) (example: Exception in thread "local[9]" java.lang.OutOfMemoryError: Java heap space at my.app.force.fields.SpaceShipForceField.main(SpaceShipForceField.java:17) ) |
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: ^(CLIENT|SERVER|PRODUCER|CONSUMER|INTERNAL)$ , 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. |
numberOfLinks | integer (int32) | Number of span links in this span. |
operationName | string | The name of the operation given to the span. (example: retrieveAccount) |
parentId | string | Identifier of the parent span, if any. If the span has no parent it's considered a root span. (example: 000000000003C7BE) |
remoteService | string | Name of the possible remote span's service. (example: external-service) |
remoteServiceColor | string | Color hex code assigned to the remote service. (example: #fa41c6) |
remoteServiceType | string | Defines type of service. (pattern: ^(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)$ , 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 or CockroachDB ) |
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) |
serviceColor | string | Color hex code assigned to the service. (example: #fa41c6) |
serviceType | string | Defines type of service. (pattern: ^(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)$ , 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 or CockroachDB ) |
startedAt | string (date-time) | Date and time the span was started in the ISO 8601 / RFC3339 format. (example: 2019-11-22T09:00:00Z) |
status | object |
List of spans for the given trace.
Name | Datatype | Description |
---|---|---|
next | string | Next continuation token. (example: dlFXd0lhSkxzRjAwYnpVZkMrRmlhYnF4cGtNMWdnVEI) |
spanPage | array | List of trace spans. |
totalCount | integer (int64) | Total count of spans for this trace. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
getSpan | select | traceId , spanId , region | Get details of a span with the given identifier. | |
getSpans | select | traceId , 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 | SumoLogic region (enum: [us2, au, ca, de, eu, fed, in, jp], default: us2) |
spanId | string | Identifier of the span to get the details. |
traceId | string | Identifier of the trace to get the spans. |
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
- getSpan
- getSpans
Get details of a span with the given identifier.
SELECT
id,
criticalPathContribution,
duration,
errorMessage,
events,
fields,
info,
kind,
links,
logs,
numberOfLinks,
operationName,
parentId,
remoteService,
remoteServiceColor,
remoteServiceType,
resource,
service,
serviceColor,
serviceType,
startedAt,
status
FROM sumologic.tracing.traces_spans
WHERE traceId = '{{ traceId }}' -- required
AND spanId = '{{ spanId }}' -- required
AND region = '{{ region }}' -- required
;
Get a list of spans for the given trace. The response is paginated with a default limit of 100 spans per page.
SELECT
next,
spanPage,
totalCount
FROM sumologic.tracing.traces_spans
WHERE traceId = '{{ traceId }}' -- required
AND region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND token = '{{ token }}'
;