Skip to main content

spans

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

Overview

Namespans
TypeResource
Idgoogle.cloudtrace.spans

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
create_spaninsertprojectsId, tracesId, spansIdCreates a new span. If a span ID already exists, an additional copy of the span will be stored.

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
projectsIdstring
spansIdstring
tracesIdstring

INSERT examples

Creates a new span. If a span ID already exists, an additional copy of the span will be stored.

INSERT INTO google.cloudtrace.spans (
data__name,
data__spanId,
data__parentSpanId,
data__displayName,
data__startTime,
data__endTime,
data__attributes,
data__stackTrace,
data__timeEvents,
data__links,
data__status,
data__sameProcessAsParentSpan,
data__childSpanCount,
data__spanKind,
projectsId,
tracesId,
spansId
)
SELECT
'{{ name }}',
'{{ spanId }}',
'{{ parentSpanId }}',
'{{ displayName }}',
'{{ startTime }}',
'{{ endTime }}',
'{{ attributes }}',
'{{ stackTrace }}',
'{{ timeEvents }}',
'{{ links }}',
'{{ status }}',
{{ sameProcessAsParentSpan }},
{{ childSpanCount }},
'{{ spanKind }}',
'{{ projectsId }}',
'{{ tracesId }}',
'{{ spansId }}'
RETURNING
name,
attributes,
childSpanCount,
displayName,
endTime,
links,
parentSpanId,
sameProcessAsParentSpan,
spanId,
spanKind,
stackTrace,
startTime,
status,
timeEvents
;