blob: 183af0d0c61561c08df8f3f9928fe7c0899e1f40 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
Dan O'Mearadd494642020-05-01 07:42:23 -070075<h1><a href="cloudtrace_v2.html">Cloud Trace API</a> . <a href="cloudtrace_v2.projects.html">projects</a> . <a href="cloudtrace_v2.projects.traces.html">traces</a> . <a href="cloudtrace_v2.projects.traces.spans.html">spans</a></h1>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#createSpan">createSpan(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Creates a new span.</p>
80<h3>Method Details</h3>
81<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070082 <code class="details" id="createSpan">createSpan(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070083 <pre>Creates a new span.
84
85Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -070086 name: string, Required. The resource name of the span in the following format:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087
88 projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project;
89it is a 32-character hexadecimal encoding of a 16-byte array.
90
91[SPAN_ID] is a unique identifier for a span within a trace; it
Bu Sun Kimd059ad82020-07-22 17:02:09 -070092is a 16-character hexadecimal encoding of an 8-byte array. It should not
93be zero. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -070094 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070095 The object takes the form of:
96
97{ # A span represents a single operation within a trace. Spans can be
98 # nested to form a trace tree. Often, a trace contains a root span
99 # that describes the end-to-end latency, and one or more subspans for
100 # its sub-operations. A trace can also contain multiple root spans,
Dan O'Mearadd494642020-05-01 07:42:23 -0700101 # or none at all. Spans do not need to be contiguous&amp;mdash;there may be
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102 # gaps or overlaps between spans in a trace.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700103 &quot;displayName&quot;: { # Represents a string that might be shortened to a specified length. # Required. A description of the span&#x27;s operation (up to 128 bytes).
104 # Trace displays the description in the
105 # Google Cloud Platform Console.
106 # For example, the display name can be a qualified method name or a file name
107 # and a line number where the operation is called. A best practice is to use
108 # the same display name within an application and at the same call point.
109 # This makes it easier to correlate spans in different traces.
110 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
111 # bytes long and the limit of the string is 128 bytes, then
112 # `value` contains the first 128 bytes of the 500-byte string.
113 #
114 # Truncation always happens on a UTF8 character boundary. If there
115 # are multi-byte characters in the string, then the length of the
116 # shortened string might be less than the size limit.
117 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
118 # value is 0, then the string was not shortened.
119 },
120 &quot;links&quot;: { # A collection of links, which are references from this span to a span # Links associated with the span. You can have up to 128 links per Span.
121 # in the same or different trace.
122 &quot;link&quot;: [ # A collection of links.
123 { # A pointer from the current span to another span in the same trace or in a
124 # different trace. For example, this can be used in batching operations,
125 # where a single batch handler processes multiple requests from different
126 # traces or when the handler receives a request from a different project.
127 &quot;traceId&quot;: &quot;A String&quot;, # The [TRACE_ID] for a trace within a project.
128 &quot;type&quot;: &quot;A String&quot;, # The relationship of the current span relative to the linked span.
129 &quot;spanId&quot;: &quot;A String&quot;, # The [SPAN_ID] for a span within a trace.
130 &quot;attributes&quot;: { # A set of attributes, each in the format `[KEY]:[VALUE]`. # A set of attributes on the link. You have have up to 32 attributes per
131 # link.
132 &quot;attributeMap&quot;: { # The set of attributes. Each attribute&#x27;s key can be up to 128 bytes
133 # long. The value can be a string up to 256 bytes, a signed 64-bit integer,
134 # or the Boolean values `true` and `false`. For example:
135 #
136 # &quot;/instance_id&quot;: { &quot;string_value&quot;: { &quot;value&quot;: &quot;my-instance&quot; } }
137 # &quot;/http/request_bytes&quot;: { &quot;int_value&quot;: 300 }
138 # &quot;abc.com/myattribute&quot;: { &quot;bool_value&quot;: false }
139 &quot;a_key&quot;: { # The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.
140 &quot;stringValue&quot;: { # Represents a string that might be shortened to a specified length. # A string up to 256 bytes long.
141 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
142 # bytes long and the limit of the string is 128 bytes, then
143 # `value` contains the first 128 bytes of the 500-byte string.
144 #
145 # Truncation always happens on a UTF8 character boundary. If there
146 # are multi-byte characters in the string, then the length of the
147 # shortened string might be less than the size limit.
148 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
149 # value is 0, then the string was not shortened.
150 },
151 &quot;intValue&quot;: &quot;A String&quot;, # A 64-bit signed integer.
152 &quot;boolValue&quot;: True or False, # A Boolean value represented by `true` or `false`.
153 },
154 },
155 &quot;droppedAttributesCount&quot;: 42, # The number of attributes that were discarded. Attributes can be discarded
156 # because their keys are too long or because there are too many attributes.
157 # If this value is 0 then all attributes are valid.
158 },
159 },
160 ],
161 &quot;droppedLinksCount&quot;: 42, # The number of dropped links after the maximum size was enforced. If
162 # this value is 0, then no links were dropped.
163 },
164 &quot;parentSpanId&quot;: &quot;A String&quot;, # The [SPAN_ID] of this span&#x27;s parent span. If this is a root span,
165 # then this field must be empty.
166 &quot;timeEvents&quot;: { # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation # A set of time events. You can have up to 32 annotations and 128 message
167 # events per span.
168 # on the span, consisting of either user-supplied key:value pairs, or
169 # details of a message sent/received between Spans.
170 &quot;droppedMessageEventsCount&quot;: 42, # The number of dropped message events in all the included time events.
171 # If the value is 0, then no message events were dropped.
172 &quot;timeEvent&quot;: [ # A collection of `TimeEvent`s.
173 { # A time-stamped annotation or message event in the Span.
174 &quot;time&quot;: &quot;A String&quot;, # The timestamp indicating the time the event occurred.
175 &quot;annotation&quot;: { # Text annotation with a set of attributes. # Text annotation with a set of attributes.
176 &quot;description&quot;: { # Represents a string that might be shortened to a specified length. # A user-supplied message describing the event. The maximum length for
177 # the description is 256 bytes.
178 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
179 # bytes long and the limit of the string is 128 bytes, then
180 # `value` contains the first 128 bytes of the 500-byte string.
181 #
182 # Truncation always happens on a UTF8 character boundary. If there
183 # are multi-byte characters in the string, then the length of the
184 # shortened string might be less than the size limit.
185 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
186 # value is 0, then the string was not shortened.
187 },
188 &quot;attributes&quot;: { # A set of attributes, each in the format `[KEY]:[VALUE]`. # A set of attributes on the annotation. You can have up to 4 attributes
189 # per Annotation.
190 &quot;attributeMap&quot;: { # The set of attributes. Each attribute&#x27;s key can be up to 128 bytes
191 # long. The value can be a string up to 256 bytes, a signed 64-bit integer,
192 # or the Boolean values `true` and `false`. For example:
193 #
194 # &quot;/instance_id&quot;: { &quot;string_value&quot;: { &quot;value&quot;: &quot;my-instance&quot; } }
195 # &quot;/http/request_bytes&quot;: { &quot;int_value&quot;: 300 }
196 # &quot;abc.com/myattribute&quot;: { &quot;bool_value&quot;: false }
197 &quot;a_key&quot;: { # The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.
198 &quot;stringValue&quot;: { # Represents a string that might be shortened to a specified length. # A string up to 256 bytes long.
199 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
200 # bytes long and the limit of the string is 128 bytes, then
201 # `value` contains the first 128 bytes of the 500-byte string.
202 #
203 # Truncation always happens on a UTF8 character boundary. If there
204 # are multi-byte characters in the string, then the length of the
205 # shortened string might be less than the size limit.
206 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
207 # value is 0, then the string was not shortened.
208 },
209 &quot;intValue&quot;: &quot;A String&quot;, # A 64-bit signed integer.
210 &quot;boolValue&quot;: True or False, # A Boolean value represented by `true` or `false`.
211 },
212 },
213 &quot;droppedAttributesCount&quot;: 42, # The number of attributes that were discarded. Attributes can be discarded
214 # because their keys are too long or because there are too many attributes.
215 # If this value is 0 then all attributes are valid.
216 },
217 },
218 &quot;messageEvent&quot;: { # An event describing a message sent/received between Spans. # An event describing a message sent/received between Spans.
219 &quot;compressedSizeBytes&quot;: &quot;A String&quot;, # The number of compressed bytes sent or received. If missing assumed to
220 # be the same size as uncompressed.
221 &quot;uncompressedSizeBytes&quot;: &quot;A String&quot;, # The number of uncompressed bytes sent or received.
222 &quot;id&quot;: &quot;A String&quot;, # An identifier for the MessageEvent&#x27;s message that can be used to match
223 # SENT and RECEIVED MessageEvents. It is recommended to be unique within
224 # a Span.
225 &quot;type&quot;: &quot;A String&quot;, # Type of MessageEvent. Indicates whether the message was sent or
226 # received.
227 },
228 },
229 ],
230 &quot;droppedAnnotationsCount&quot;: 42, # The number of dropped annotations in all the included time events.
231 # If the value is 0, then no annotations were dropped.
232 },
233 &quot;name&quot;: &quot;A String&quot;, # Required. The resource name of the span in the following format:
234 #
235 # projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project;
236 # it is a 32-character hexadecimal encoding of a 16-byte array.
237 #
238 # [SPAN_ID] is a unique identifier for a span within a trace; it
239 # is a 16-character hexadecimal encoding of an 8-byte array. It should not
240 # be zero.
Bu Sun Kim65020912020-05-20 12:08:20 -0700241 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for # Optional. The final status for this span.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700242 # different programming environments, including REST APIs and RPC APIs. It is
243 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
244 # three pieces of data: error code, error message, and error details.
245 #
246 # You can find out more about this error model and how to work with it in the
247 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -0700248 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700249 # message types for APIs to use.
250 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700251 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700252 },
253 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700254 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
255 # user-facing error message should be localized and sent in the
256 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700257 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700258 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700259 &quot;childSpanCount&quot;: 42, # Optional. The number of child spans that were generated while this span
260 # was active. If set, allows implementation to detect missing child spans.
Bu Sun Kim65020912020-05-20 12:08:20 -0700261 &quot;stackTrace&quot;: { # A call stack appearing in a trace. # Stack trace captured at the start of the span.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700262 &quot;stackTraceHashId&quot;: &quot;A String&quot;, # The hash ID is used to conserve network bandwidth for duplicate
263 # stack traces within a single trace.
264 #
265 # Often multiple spans will have identical stack traces.
266 # The first occurrence of a stack trace should contain both the
267 # `stackFrame` content and a value in `stackTraceHashId`.
268 #
269 # Subsequent spans within the same request can refer
270 # to that stack trace by only setting `stackTraceHashId`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700271 &quot;stackFrames&quot;: { # A collection of stack frames, which can be truncated. # Stack frames in this stack trace. A maximum of 128 frames are allowed.
272 &quot;droppedFramesCount&quot;: 42, # The number of stack frames that were dropped because there
273 # were too many stack frames.
274 # If this value is 0, then no stack frames were dropped.
275 &quot;frame&quot;: [ # Stack frames in this call stack.
276 { # Represents a single stack frame in a stack trace.
277 &quot;lineNumber&quot;: &quot;A String&quot;, # The line number in `file_name` where the function call appears.
278 &quot;functionName&quot;: { # Represents a string that might be shortened to a specified length. # The fully-qualified name that uniquely identifies the function or
279 # method that is active in this frame (up to 1024 bytes).
Bu Sun Kim65020912020-05-20 12:08:20 -0700280 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
281 # bytes long and the limit of the string is 128 bytes, then
282 # `value` contains the first 128 bytes of the 500-byte string.
283 #
284 # Truncation always happens on a UTF8 character boundary. If there
285 # are multi-byte characters in the string, then the length of the
286 # shortened string might be less than the size limit.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700287 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
288 # value is 0, then the string was not shortened.
Bu Sun Kim65020912020-05-20 12:08:20 -0700289 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700290 &quot;sourceVersion&quot;: { # Represents a string that might be shortened to a specified length. # The version of the deployed source code (up to 128 bytes).
291 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
292 # bytes long and the limit of the string is 128 bytes, then
293 # `value` contains the first 128 bytes of the 500-byte string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700294 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700295 # Truncation always happens on a UTF8 character boundary. If there
296 # are multi-byte characters in the string, then the length of the
297 # shortened string might be less than the size limit.
298 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
299 # value is 0, then the string was not shortened.
300 },
301 &quot;loadModule&quot;: { # Binary module. # The binary module from where the code was loaded.
302 &quot;buildId&quot;: { # Represents a string that might be shortened to a specified length. # A unique identifier for the module, usually a hash of its
303 # contents (up to 128 bytes).
304 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
305 # bytes long and the limit of the string is 128 bytes, then
306 # `value` contains the first 128 bytes of the 500-byte string.
307 #
308 # Truncation always happens on a UTF8 character boundary. If there
309 # are multi-byte characters in the string, then the length of the
310 # shortened string might be less than the size limit.
311 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
312 # value is 0, then the string was not shortened.
313 },
314 &quot;module&quot;: { # Represents a string that might be shortened to a specified length. # For example: main binary, kernel modules, and dynamic libraries
315 # such as libc.so, sharedlib.so (up to 256 bytes).
316 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
317 # bytes long and the limit of the string is 128 bytes, then
318 # `value` contains the first 128 bytes of the 500-byte string.
319 #
320 # Truncation always happens on a UTF8 character boundary. If there
321 # are multi-byte characters in the string, then the length of the
322 # shortened string might be less than the size limit.
323 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
324 # value is 0, then the string was not shortened.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700325 },
326 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700327 &quot;columnNumber&quot;: &quot;A String&quot;, # The column number where the function call appears, if available.
328 # This is important in JavaScript because of its anonymous functions.
329 &quot;originalFunctionName&quot;: { # Represents a string that might be shortened to a specified length. # An un-mangled function name, if `function_name` is
330 # [mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can
331 # be fully-qualified (up to 1024 bytes).
332 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
333 # bytes long and the limit of the string is 128 bytes, then
334 # `value` contains the first 128 bytes of the 500-byte string.
335 #
336 # Truncation always happens on a UTF8 character boundary. If there
337 # are multi-byte characters in the string, then the length of the
338 # shortened string might be less than the size limit.
339 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
340 # value is 0, then the string was not shortened.
341 },
342 &quot;fileName&quot;: { # Represents a string that might be shortened to a specified length. # The name of the source file where the function call appears (up to 256
343 # bytes).
344 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
345 # bytes long and the limit of the string is 128 bytes, then
346 # `value` contains the first 128 bytes of the 500-byte string.
347 #
348 # Truncation always happens on a UTF8 character boundary. If there
349 # are multi-byte characters in the string, then the length of the
350 # shortened string might be less than the size limit.
351 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
352 # value is 0, then the string was not shortened.
Bu Sun Kim65020912020-05-20 12:08:20 -0700353 },
354 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700355 ],
356 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700357 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700358 &quot;attributes&quot;: { # A set of attributes, each in the format `[KEY]:[VALUE]`. # A set of attributes on the span. You can have up to 32 attributes per
359 # span.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700360 &quot;attributeMap&quot;: { # The set of attributes. Each attribute&#x27;s key can be up to 128 bytes
361 # long. The value can be a string up to 256 bytes, a signed 64-bit integer,
362 # or the Boolean values `true` and `false`. For example:
363 #
364 # &quot;/instance_id&quot;: { &quot;string_value&quot;: { &quot;value&quot;: &quot;my-instance&quot; } }
365 # &quot;/http/request_bytes&quot;: { &quot;int_value&quot;: 300 }
366 # &quot;abc.com/myattribute&quot;: { &quot;bool_value&quot;: false }
367 &quot;a_key&quot;: { # The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700368 &quot;stringValue&quot;: { # Represents a string that might be shortened to a specified length. # A string up to 256 bytes long.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700369 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
370 # bytes long and the limit of the string is 128 bytes, then
371 # `value` contains the first 128 bytes of the 500-byte string.
372 #
373 # Truncation always happens on a UTF8 character boundary. If there
374 # are multi-byte characters in the string, then the length of the
375 # shortened string might be less than the size limit.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700376 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
377 # value is 0, then the string was not shortened.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700378 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700379 &quot;intValue&quot;: &quot;A String&quot;, # A 64-bit signed integer.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700380 &quot;boolValue&quot;: True or False, # A Boolean value represented by `true` or `false`.
381 },
382 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700383 &quot;droppedAttributesCount&quot;: 42, # The number of attributes that were discarded. Attributes can be discarded
384 # because their keys are too long or because there are too many attributes.
385 # If this value is 0 then all attributes are valid.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700386 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700387 &quot;spanKind&quot;: &quot;A String&quot;, # Optional. Distinguishes between spans generated in a particular context. For example,
388 # two spans with the same name may be distinguished using `CLIENT` (caller)
389 # and `SERVER` (callee) to identify an RPC call.
390 &quot;endTime&quot;: &quot;A String&quot;, # Required. The end time of the span. On the client side, this is the time kept by
391 # the local machine where the span execution ends. On the server side, this
392 # is the time when the server application handler stops running.
393 &quot;startTime&quot;: &quot;A String&quot;, # Required. The start time of the span. On the client side, this is the time kept by
394 # the local machine where the span execution starts. On the server side, this
395 # is the time when the server&#x27;s application handler starts running.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700396 &quot;spanId&quot;: &quot;A String&quot;, # Required. The [SPAN_ID] portion of the span&#x27;s resource name.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700397 &quot;sameProcessAsParentSpan&quot;: True or False, # Optional. Set this parameter to indicate whether this span is in
398 # the same process as its parent. If you do not set this parameter,
399 # Trace is unable to take advantage of this helpful information.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700400}
401
402 x__xgafv: string, V1 error format.
403 Allowed values
404 1 - v1 error format
405 2 - v2 error format
406
407Returns:
408 An object of the form:
409
410 { # A span represents a single operation within a trace. Spans can be
411 # nested to form a trace tree. Often, a trace contains a root span
412 # that describes the end-to-end latency, and one or more subspans for
413 # its sub-operations. A trace can also contain multiple root spans,
Dan O'Mearadd494642020-05-01 07:42:23 -0700414 # or none at all. Spans do not need to be contiguous&amp;mdash;there may be
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700415 # gaps or overlaps between spans in a trace.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700416 &quot;displayName&quot;: { # Represents a string that might be shortened to a specified length. # Required. A description of the span&#x27;s operation (up to 128 bytes).
417 # Trace displays the description in the
418 # Google Cloud Platform Console.
419 # For example, the display name can be a qualified method name or a file name
420 # and a line number where the operation is called. A best practice is to use
421 # the same display name within an application and at the same call point.
422 # This makes it easier to correlate spans in different traces.
423 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
424 # bytes long and the limit of the string is 128 bytes, then
425 # `value` contains the first 128 bytes of the 500-byte string.
426 #
427 # Truncation always happens on a UTF8 character boundary. If there
428 # are multi-byte characters in the string, then the length of the
429 # shortened string might be less than the size limit.
430 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
431 # value is 0, then the string was not shortened.
432 },
433 &quot;links&quot;: { # A collection of links, which are references from this span to a span # Links associated with the span. You can have up to 128 links per Span.
434 # in the same or different trace.
435 &quot;link&quot;: [ # A collection of links.
436 { # A pointer from the current span to another span in the same trace or in a
437 # different trace. For example, this can be used in batching operations,
438 # where a single batch handler processes multiple requests from different
439 # traces or when the handler receives a request from a different project.
440 &quot;traceId&quot;: &quot;A String&quot;, # The [TRACE_ID] for a trace within a project.
441 &quot;type&quot;: &quot;A String&quot;, # The relationship of the current span relative to the linked span.
442 &quot;spanId&quot;: &quot;A String&quot;, # The [SPAN_ID] for a span within a trace.
443 &quot;attributes&quot;: { # A set of attributes, each in the format `[KEY]:[VALUE]`. # A set of attributes on the link. You have have up to 32 attributes per
444 # link.
445 &quot;attributeMap&quot;: { # The set of attributes. Each attribute&#x27;s key can be up to 128 bytes
446 # long. The value can be a string up to 256 bytes, a signed 64-bit integer,
447 # or the Boolean values `true` and `false`. For example:
448 #
449 # &quot;/instance_id&quot;: { &quot;string_value&quot;: { &quot;value&quot;: &quot;my-instance&quot; } }
450 # &quot;/http/request_bytes&quot;: { &quot;int_value&quot;: 300 }
451 # &quot;abc.com/myattribute&quot;: { &quot;bool_value&quot;: false }
452 &quot;a_key&quot;: { # The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.
453 &quot;stringValue&quot;: { # Represents a string that might be shortened to a specified length. # A string up to 256 bytes long.
454 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
455 # bytes long and the limit of the string is 128 bytes, then
456 # `value` contains the first 128 bytes of the 500-byte string.
457 #
458 # Truncation always happens on a UTF8 character boundary. If there
459 # are multi-byte characters in the string, then the length of the
460 # shortened string might be less than the size limit.
461 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
462 # value is 0, then the string was not shortened.
463 },
464 &quot;intValue&quot;: &quot;A String&quot;, # A 64-bit signed integer.
465 &quot;boolValue&quot;: True or False, # A Boolean value represented by `true` or `false`.
466 },
467 },
468 &quot;droppedAttributesCount&quot;: 42, # The number of attributes that were discarded. Attributes can be discarded
469 # because their keys are too long or because there are too many attributes.
470 # If this value is 0 then all attributes are valid.
471 },
472 },
473 ],
474 &quot;droppedLinksCount&quot;: 42, # The number of dropped links after the maximum size was enforced. If
475 # this value is 0, then no links were dropped.
476 },
477 &quot;parentSpanId&quot;: &quot;A String&quot;, # The [SPAN_ID] of this span&#x27;s parent span. If this is a root span,
478 # then this field must be empty.
479 &quot;timeEvents&quot;: { # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation # A set of time events. You can have up to 32 annotations and 128 message
480 # events per span.
481 # on the span, consisting of either user-supplied key:value pairs, or
482 # details of a message sent/received between Spans.
483 &quot;droppedMessageEventsCount&quot;: 42, # The number of dropped message events in all the included time events.
484 # If the value is 0, then no message events were dropped.
485 &quot;timeEvent&quot;: [ # A collection of `TimeEvent`s.
486 { # A time-stamped annotation or message event in the Span.
487 &quot;time&quot;: &quot;A String&quot;, # The timestamp indicating the time the event occurred.
488 &quot;annotation&quot;: { # Text annotation with a set of attributes. # Text annotation with a set of attributes.
489 &quot;description&quot;: { # Represents a string that might be shortened to a specified length. # A user-supplied message describing the event. The maximum length for
490 # the description is 256 bytes.
491 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
492 # bytes long and the limit of the string is 128 bytes, then
493 # `value` contains the first 128 bytes of the 500-byte string.
494 #
495 # Truncation always happens on a UTF8 character boundary. If there
496 # are multi-byte characters in the string, then the length of the
497 # shortened string might be less than the size limit.
498 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
499 # value is 0, then the string was not shortened.
500 },
501 &quot;attributes&quot;: { # A set of attributes, each in the format `[KEY]:[VALUE]`. # A set of attributes on the annotation. You can have up to 4 attributes
502 # per Annotation.
503 &quot;attributeMap&quot;: { # The set of attributes. Each attribute&#x27;s key can be up to 128 bytes
504 # long. The value can be a string up to 256 bytes, a signed 64-bit integer,
505 # or the Boolean values `true` and `false`. For example:
506 #
507 # &quot;/instance_id&quot;: { &quot;string_value&quot;: { &quot;value&quot;: &quot;my-instance&quot; } }
508 # &quot;/http/request_bytes&quot;: { &quot;int_value&quot;: 300 }
509 # &quot;abc.com/myattribute&quot;: { &quot;bool_value&quot;: false }
510 &quot;a_key&quot;: { # The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.
511 &quot;stringValue&quot;: { # Represents a string that might be shortened to a specified length. # A string up to 256 bytes long.
512 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
513 # bytes long and the limit of the string is 128 bytes, then
514 # `value` contains the first 128 bytes of the 500-byte string.
515 #
516 # Truncation always happens on a UTF8 character boundary. If there
517 # are multi-byte characters in the string, then the length of the
518 # shortened string might be less than the size limit.
519 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
520 # value is 0, then the string was not shortened.
521 },
522 &quot;intValue&quot;: &quot;A String&quot;, # A 64-bit signed integer.
523 &quot;boolValue&quot;: True or False, # A Boolean value represented by `true` or `false`.
524 },
525 },
526 &quot;droppedAttributesCount&quot;: 42, # The number of attributes that were discarded. Attributes can be discarded
527 # because their keys are too long or because there are too many attributes.
528 # If this value is 0 then all attributes are valid.
529 },
530 },
531 &quot;messageEvent&quot;: { # An event describing a message sent/received between Spans. # An event describing a message sent/received between Spans.
532 &quot;compressedSizeBytes&quot;: &quot;A String&quot;, # The number of compressed bytes sent or received. If missing assumed to
533 # be the same size as uncompressed.
534 &quot;uncompressedSizeBytes&quot;: &quot;A String&quot;, # The number of uncompressed bytes sent or received.
535 &quot;id&quot;: &quot;A String&quot;, # An identifier for the MessageEvent&#x27;s message that can be used to match
536 # SENT and RECEIVED MessageEvents. It is recommended to be unique within
537 # a Span.
538 &quot;type&quot;: &quot;A String&quot;, # Type of MessageEvent. Indicates whether the message was sent or
539 # received.
540 },
541 },
542 ],
543 &quot;droppedAnnotationsCount&quot;: 42, # The number of dropped annotations in all the included time events.
544 # If the value is 0, then no annotations were dropped.
545 },
546 &quot;name&quot;: &quot;A String&quot;, # Required. The resource name of the span in the following format:
547 #
548 # projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project;
549 # it is a 32-character hexadecimal encoding of a 16-byte array.
550 #
551 # [SPAN_ID] is a unique identifier for a span within a trace; it
552 # is a 16-character hexadecimal encoding of an 8-byte array. It should not
553 # be zero.
Bu Sun Kim65020912020-05-20 12:08:20 -0700554 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for # Optional. The final status for this span.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700555 # different programming environments, including REST APIs and RPC APIs. It is
556 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
557 # three pieces of data: error code, error message, and error details.
558 #
559 # You can find out more about this error model and how to work with it in the
560 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -0700561 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700562 # message types for APIs to use.
563 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700564 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700565 },
566 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700567 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
568 # user-facing error message should be localized and sent in the
569 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700570 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700571 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700572 &quot;childSpanCount&quot;: 42, # Optional. The number of child spans that were generated while this span
573 # was active. If set, allows implementation to detect missing child spans.
Bu Sun Kim65020912020-05-20 12:08:20 -0700574 &quot;stackTrace&quot;: { # A call stack appearing in a trace. # Stack trace captured at the start of the span.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700575 &quot;stackTraceHashId&quot;: &quot;A String&quot;, # The hash ID is used to conserve network bandwidth for duplicate
576 # stack traces within a single trace.
577 #
578 # Often multiple spans will have identical stack traces.
579 # The first occurrence of a stack trace should contain both the
580 # `stackFrame` content and a value in `stackTraceHashId`.
581 #
582 # Subsequent spans within the same request can refer
583 # to that stack trace by only setting `stackTraceHashId`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700584 &quot;stackFrames&quot;: { # A collection of stack frames, which can be truncated. # Stack frames in this stack trace. A maximum of 128 frames are allowed.
585 &quot;droppedFramesCount&quot;: 42, # The number of stack frames that were dropped because there
586 # were too many stack frames.
587 # If this value is 0, then no stack frames were dropped.
588 &quot;frame&quot;: [ # Stack frames in this call stack.
589 { # Represents a single stack frame in a stack trace.
590 &quot;lineNumber&quot;: &quot;A String&quot;, # The line number in `file_name` where the function call appears.
591 &quot;functionName&quot;: { # Represents a string that might be shortened to a specified length. # The fully-qualified name that uniquely identifies the function or
592 # method that is active in this frame (up to 1024 bytes).
Bu Sun Kim65020912020-05-20 12:08:20 -0700593 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
594 # bytes long and the limit of the string is 128 bytes, then
595 # `value` contains the first 128 bytes of the 500-byte string.
596 #
597 # Truncation always happens on a UTF8 character boundary. If there
598 # are multi-byte characters in the string, then the length of the
599 # shortened string might be less than the size limit.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700600 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
601 # value is 0, then the string was not shortened.
Bu Sun Kim65020912020-05-20 12:08:20 -0700602 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700603 &quot;sourceVersion&quot;: { # Represents a string that might be shortened to a specified length. # The version of the deployed source code (up to 128 bytes).
604 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
605 # bytes long and the limit of the string is 128 bytes, then
606 # `value` contains the first 128 bytes of the 500-byte string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700607 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700608 # Truncation always happens on a UTF8 character boundary. If there
609 # are multi-byte characters in the string, then the length of the
610 # shortened string might be less than the size limit.
611 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
612 # value is 0, then the string was not shortened.
613 },
614 &quot;loadModule&quot;: { # Binary module. # The binary module from where the code was loaded.
615 &quot;buildId&quot;: { # Represents a string that might be shortened to a specified length. # A unique identifier for the module, usually a hash of its
616 # contents (up to 128 bytes).
617 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
618 # bytes long and the limit of the string is 128 bytes, then
619 # `value` contains the first 128 bytes of the 500-byte string.
620 #
621 # Truncation always happens on a UTF8 character boundary. If there
622 # are multi-byte characters in the string, then the length of the
623 # shortened string might be less than the size limit.
624 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
625 # value is 0, then the string was not shortened.
626 },
627 &quot;module&quot;: { # Represents a string that might be shortened to a specified length. # For example: main binary, kernel modules, and dynamic libraries
628 # such as libc.so, sharedlib.so (up to 256 bytes).
629 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
630 # bytes long and the limit of the string is 128 bytes, then
631 # `value` contains the first 128 bytes of the 500-byte string.
632 #
633 # Truncation always happens on a UTF8 character boundary. If there
634 # are multi-byte characters in the string, then the length of the
635 # shortened string might be less than the size limit.
636 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
637 # value is 0, then the string was not shortened.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700638 },
639 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700640 &quot;columnNumber&quot;: &quot;A String&quot;, # The column number where the function call appears, if available.
641 # This is important in JavaScript because of its anonymous functions.
642 &quot;originalFunctionName&quot;: { # Represents a string that might be shortened to a specified length. # An un-mangled function name, if `function_name` is
643 # [mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can
644 # be fully-qualified (up to 1024 bytes).
645 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
646 # bytes long and the limit of the string is 128 bytes, then
647 # `value` contains the first 128 bytes of the 500-byte string.
648 #
649 # Truncation always happens on a UTF8 character boundary. If there
650 # are multi-byte characters in the string, then the length of the
651 # shortened string might be less than the size limit.
652 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
653 # value is 0, then the string was not shortened.
654 },
655 &quot;fileName&quot;: { # Represents a string that might be shortened to a specified length. # The name of the source file where the function call appears (up to 256
656 # bytes).
657 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
658 # bytes long and the limit of the string is 128 bytes, then
659 # `value` contains the first 128 bytes of the 500-byte string.
660 #
661 # Truncation always happens on a UTF8 character boundary. If there
662 # are multi-byte characters in the string, then the length of the
663 # shortened string might be less than the size limit.
664 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
665 # value is 0, then the string was not shortened.
Bu Sun Kim65020912020-05-20 12:08:20 -0700666 },
667 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700668 ],
669 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700670 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700671 &quot;attributes&quot;: { # A set of attributes, each in the format `[KEY]:[VALUE]`. # A set of attributes on the span. You can have up to 32 attributes per
672 # span.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700673 &quot;attributeMap&quot;: { # The set of attributes. Each attribute&#x27;s key can be up to 128 bytes
674 # long. The value can be a string up to 256 bytes, a signed 64-bit integer,
675 # or the Boolean values `true` and `false`. For example:
676 #
677 # &quot;/instance_id&quot;: { &quot;string_value&quot;: { &quot;value&quot;: &quot;my-instance&quot; } }
678 # &quot;/http/request_bytes&quot;: { &quot;int_value&quot;: 300 }
679 # &quot;abc.com/myattribute&quot;: { &quot;bool_value&quot;: false }
680 &quot;a_key&quot;: { # The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700681 &quot;stringValue&quot;: { # Represents a string that might be shortened to a specified length. # A string up to 256 bytes long.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700682 &quot;value&quot;: &quot;A String&quot;, # The shortened string. For example, if the original string is 500
683 # bytes long and the limit of the string is 128 bytes, then
684 # `value` contains the first 128 bytes of the 500-byte string.
685 #
686 # Truncation always happens on a UTF8 character boundary. If there
687 # are multi-byte characters in the string, then the length of the
688 # shortened string might be less than the size limit.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700689 &quot;truncatedByteCount&quot;: 42, # The number of bytes removed from the original string. If this
690 # value is 0, then the string was not shortened.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700691 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700692 &quot;intValue&quot;: &quot;A String&quot;, # A 64-bit signed integer.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700693 &quot;boolValue&quot;: True or False, # A Boolean value represented by `true` or `false`.
694 },
695 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700696 &quot;droppedAttributesCount&quot;: 42, # The number of attributes that were discarded. Attributes can be discarded
697 # because their keys are too long or because there are too many attributes.
698 # If this value is 0 then all attributes are valid.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700699 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700700 &quot;spanKind&quot;: &quot;A String&quot;, # Optional. Distinguishes between spans generated in a particular context. For example,
701 # two spans with the same name may be distinguished using `CLIENT` (caller)
702 # and `SERVER` (callee) to identify an RPC call.
703 &quot;endTime&quot;: &quot;A String&quot;, # Required. The end time of the span. On the client side, this is the time kept by
704 # the local machine where the span execution ends. On the server side, this
705 # is the time when the server application handler stops running.
706 &quot;startTime&quot;: &quot;A String&quot;, # Required. The start time of the span. On the client side, this is the time kept by
707 # the local machine where the span execution starts. On the server side, this
708 # is the time when the server&#x27;s application handler starts running.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700709 &quot;spanId&quot;: &quot;A String&quot;, # Required. The [SPAN_ID] portion of the span&#x27;s resource name.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700710 &quot;sameProcessAsParentSpan&quot;: True or False, # Optional. Set this parameter to indicate whether this span is in
711 # the same process as its parent. If you do not set this parameter,
712 # Trace is unable to take advantage of this helpful information.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713 }</pre>
714</div>
715
716</body></html>