v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-1321718.3 KB
projects

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

post/v2/{+name}

Path parameters

namestring required

Required. The resource name of the span in the following format: * projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] [TRACE_ID] is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. It should not be zero. [SPAN_ID] is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array. It should not be zero. .

Request body

sameProcessAsParentSpanboolean

Optional. Set this parameter to indicate whether this span is in the same process as its parent. If you do not set this parameter, Trace is unable to take advantage of this helpful information.

spanKind'SPAN_KIND_UNSPECIFIED' | 'INTERNAL' | 'SERVER' | 'CLIENT' | 'PRODUCER' | 'CONSUMER'

Optional. Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using CLIENT (caller) and SERVER (callee) to identify an RPC call.

startTimestring google-datetime

Required. The start time of the span. On the client side, this is the time kept by the local machine where the span execution starts. On the server side, this is the time when the server's application handler starts running.

spanIdstring

Required. The [SPAN_ID] portion of the span's resource name.

endTimestring google-datetime

Required. The end time of the span. On the client side, this is the time kept by the local machine where the span execution ends. On the server side, this is the time when the server application handler stops running.

parentSpanIdstring

The [SPAN_ID] of this span's parent span. If this is a root span, then this field must be empty.

namestring

Required. The resource name of the span in the following format: * projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] [TRACE_ID] is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. It should not be zero. [SPAN_ID] is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array. It should not be zero. .

childSpanCountinteger

Optional. The number of child spans that were generated while this span was active. If set, allows implementation to detect missing child spans.

Response

Successful response