Skip to main content

spans

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

Overview​

Namespans
TypeResource
Idsumologic.tracing.spans

Fields​

The following fields are returned by SELECT queries:

Details of the span with the given identifier.

NameDatatypeDescription
idstringIdentifier of the span. (example: 00000000002317A9)
parent_idstringIdentifier of the parent span, if any. If the span has no parent it's considered a root span. (example: 000000000003C7BE) (wire: parentId)
operation_namestringThe name of the operation given to the span. (example: retrieveAccount) (wire: operationName)
critical_path_contributionobject (wire: criticalPathContribution)
durationinteger (int64)Number of nanoseconds the span lasted.
error_messagestringProduced 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)
eventsarrayEvents attached to this span.
fieldsobjectFields attached to this span.
infoobject
kindstringSpan 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.)
linksarrayList of casually related spans.
logsarrayLogs attached to this span.
number_of_linksinteger (int32)Number of span links in this span. (wire: numberOfLinks)
remote_servicestringName of the possible remote span's service. (example: external-service) (wire: remoteService)
remote_service_colorstringColor hex code assigned to the remote service. (example: #fa41c6) (wire: remoteServiceColor)
remote_service_typestringDefines 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)
resourcestringThe name of the resource attached to the span. (example: http.request)
servicestringThe name of the service this span is part of. (example: user-service)
service_colorstringColor hex code assigned to the service. (example: #fa41c6) (wire: serviceColor)
service_typestringDefines 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_atstring (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)
statusobject

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselecttrace_id, span_id, regionGet details of a span with the given identifier.
listselecttrace_id, regionlimit, tokenGet 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.

NameDatatypeDescription
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)
span_idstringIdentifier of the span to get the details. (wire: spanId)
trace_idstringIdentifier of the trace to get the spans. (wire: traceId)
limitinteger (int32)The maximum number of results to fetch.
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 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
;