blob: da109a98365d302a7c19f6a079e5c3a67575ec12 [file] [log] [blame]
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001<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_v1.html">Cloud Trace API</a> . <a href="cloudtrace_v1.projects.html">projects</a> . <a href="cloudtrace_v1.projects.traces.html">traces</a></h1>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#get">get(projectId, traceId, x__xgafv=None)</a></code></p>
79<p class="firstline">Gets a single trace by its ID.</p>
80<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070081 <code><a href="#list">list(projectId, startTime=None, pageToken=None, pageSize=None, view=None, orderBy=None, filter=None, endTime=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080082<p class="firstline">Returns of a list of traces that match the specified filter conditions.</p>
83<p class="toc_element">
84 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<h3>Method Details</h3>
87<div class="method">
88 <code class="details" id="get">get(projectId, traceId, x__xgafv=None)</code>
89 <pre>Gets a single trace by its ID.
Dan O'Mearadd494642020-05-01 07:42:23 -070090In this case, getting for traces is considered an active developer method,
91even though it is technically a read-only method.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080092
93Args:
Dan O'Mearadd494642020-05-01 07:42:23 -070094 projectId: string, Required. ID of the Cloud project where the trace data is stored. (required)
95 traceId: string, Required. ID of the trace to return. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080096 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040097 Allowed values
98 1 - v1 error format
99 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800100
101Returns:
102 An object of the form:
103
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400104 { # A trace describes how long it takes for an application to perform an
105 # operation. It consists of a set of spans, each of which represent a single
106 # timed event within the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700107 &quot;projectId&quot;: &quot;A String&quot;, # Project ID of the Cloud project where the trace data is stored.
108 &quot;spans&quot;: [ # Collection of spans in the trace.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400109 { # A span represents a single timed event within a trace. Spans can be nested
110 # and form a trace tree. Often, a trace contains a root span that describes the
111 # end-to-end latency of an operation and, optionally, one or more subspans for
112 # its suboperations. Spans do not need to be contiguous. There may be gaps
113 # between spans in a trace.
Bu Sun Kim65020912020-05-20 12:08:20 -0700114 &quot;labels&quot;: { # Collection of labels associated with the span. Label keys must be less than
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400115 # 128 bytes. Label values must be less than 16 kilobytes (10MB for
116 # `/stacktrace` values).
117 #
118 # Some predefined label keys exist, or you may create your own. When creating
119 # your own, we recommend the following formats:
120 #
121 # * `/category/product/key` for agents of well-known products (e.g.
122 # `/db/mongodb/read_size`).
123 # * `short_host/path/key` for domain-specific keys (e.g.
124 # `foo.com/myproduct/bar`)
125 #
126 # Predefined labels include:
127 #
128 # * `/agent`
129 # * `/component`
130 # * `/error/message`
131 # * `/error/name`
132 # * `/http/client_city`
133 # * `/http/client_country`
134 # * `/http/client_protocol`
135 # * `/http/client_region`
136 # * `/http/host`
137 # * `/http/method`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 # * `/http/path`
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400139 # * `/http/redirected_url`
140 # * `/http/request/size`
141 # * `/http/response/size`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142 # * `/http/route`
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400143 # * `/http/status_code`
144 # * `/http/url`
145 # * `/http/user_agent`
146 # * `/pid`
147 # * `/stacktrace`
148 # * `/tid`
Bu Sun Kim65020912020-05-20 12:08:20 -0700149 &quot;a_key&quot;: &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800150 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700151 &quot;name&quot;: &quot;A String&quot;, # Name of the span. Must be less than 128 bytes. The span name is sanitized
152 # and displayed in the Stackdriver Trace tool in the
153 # Google Cloud Platform Console.
154 # The name may be a method name or some other per-call site name.
155 # For the same executable and the same call point, a best practice is
156 # to use a consistent name, which makes it easier to correlate
157 # cross-trace spans.
158 &quot;spanId&quot;: &quot;A String&quot;, # Identifier for the span. Must be a 64-bit integer other than 0 and
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700159 # unique within a trace. For example, `2205310701640571284`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700160 &quot;parentSpanId&quot;: &quot;A String&quot;, # Optional. ID of the parent span, if any.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700161 &quot;endTime&quot;: &quot;A String&quot;, # End time of the span in nanoseconds from the UNIX epoch.
162 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the span in nanoseconds from the UNIX epoch.
163 &quot;kind&quot;: &quot;A String&quot;, # Distinguishes between spans generated in a particular context. For example,
164 # two spans with the same name may be distinguished using `RPC_CLIENT`
165 # and `RPC_SERVER` to identify queueing latency associated with the span.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800166 },
167 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700168 &quot;traceId&quot;: &quot;A String&quot;, # Globally unique identifier for the trace. This identifier is a 128-bit
169 # numeric value formatted as a 32-byte hex string. For example,
170 # `382d4f4c6b7bb2f4a972559d9085001d`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800171 }</pre>
172</div>
173
174<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700175 <code class="details" id="list">list(projectId, startTime=None, pageToken=None, pageSize=None, view=None, orderBy=None, filter=None, endTime=None, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800176 <pre>Returns of a list of traces that match the specified filter conditions.
Dan O'Mearadd494642020-05-01 07:42:23 -0700177In this case, listing for traces is considered an active developer method,
178even though it is technically a read-only method.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800179
180Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700181 projectId: string, Required. ID of the Cloud project where the trace data is stored. (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700182 startTime: string, Start of the time interval (inclusive) during which the trace data was
183collected from the application.
184 pageToken: string, Token identifying the page of results to return. If provided, use the
185value of the `next_page_token` field from a previous request.
186 pageSize: integer, Optional. Maximum number of traces to return. If not specified or &lt;= 0, the
187implementation selects a reasonable value. The implementation may
188return fewer traces than the requested page size.
189 view: string, Optional. Type of data returned for traces in the list. Default is
190`MINIMAL`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700191 orderBy: string, Optional. Field used to sort the returned traces.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400192Can be one of the following:
193
194* `trace_id`
195* `name` (`name` field of root span in the trace)
196* `duration` (difference between `end_time` and `start_time` fields of
197 the root span)
198* `start` (`start_time` field of the root span)
199
200Descending order can be specified by appending `desc` to the sort field
201(for example, `name desc`).
202
203Only one sort field is permitted.
Dan O'Mearadd494642020-05-01 07:42:23 -0700204 filter: string, Optional. A filter against labels for the request.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400205
206By default, searches use prefix matching. To specify exact match, prepend
207a plus symbol (`+`) to the search term.
208Multiple terms are ANDed. Syntax:
209
210* `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root
211 span starts with `NAME_PREFIX`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700212* `+root:NAME` or `+NAME`: Return traces where any root span&#x27;s name is
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400213 exactly `NAME`.
214* `span:NAME_PREFIX`: Return traces where any span starts with
215 `NAME_PREFIX`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700216* `+span:NAME`: Return traces where any span&#x27;s name is exactly
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400217 `NAME`.
218* `latency:DURATION`: Return traces whose overall latency is
219 greater or equal to than `DURATION`. Accepted units are nanoseconds
220 (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For
221 example, `latency:24ms` returns traces whose overall latency
222 is greater than or equal to 24 milliseconds.
223* `label:LABEL_KEY`: Return all traces containing the specified
224 label key (exact match, case-sensitive) regardless of the key:value
Bu Sun Kim65020912020-05-20 12:08:20 -0700225 pair&#x27;s value (including empty values).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400226* `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified
227 label key (exact match, case-sensitive) whose value starts with
228 `VALUE_PREFIX`. Both a key and a value must be specified.
229* `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair
230 exactly matching the specified text. Both a key and a value must be
231 specified.
232* `method:VALUE`: Equivalent to `/http/method:VALUE`.
233* `url:VALUE`: Equivalent to `/http/url:VALUE`.
234 endTime: string, End of the time interval (inclusive) during which the trace data was
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400235collected from the application.
Bu Sun Kim65020912020-05-20 12:08:20 -0700236 x__xgafv: string, V1 error format.
237 Allowed values
238 1 - v1 error format
239 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800240
241Returns:
242 An object of the form:
243
244 { # The response message for the `ListTraces` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700245 &quot;traces&quot;: [ # List of trace records as specified by the view parameter.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400246 { # A trace describes how long it takes for an application to perform an
247 # operation. It consists of a set of spans, each of which represent a single
248 # timed event within the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700249 &quot;projectId&quot;: &quot;A String&quot;, # Project ID of the Cloud project where the trace data is stored.
250 &quot;spans&quot;: [ # Collection of spans in the trace.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400251 { # A span represents a single timed event within a trace. Spans can be nested
252 # and form a trace tree. Often, a trace contains a root span that describes the
253 # end-to-end latency of an operation and, optionally, one or more subspans for
254 # its suboperations. Spans do not need to be contiguous. There may be gaps
255 # between spans in a trace.
Bu Sun Kim65020912020-05-20 12:08:20 -0700256 &quot;labels&quot;: { # Collection of labels associated with the span. Label keys must be less than
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400257 # 128 bytes. Label values must be less than 16 kilobytes (10MB for
258 # `/stacktrace` values).
259 #
260 # Some predefined label keys exist, or you may create your own. When creating
261 # your own, we recommend the following formats:
262 #
263 # * `/category/product/key` for agents of well-known products (e.g.
264 # `/db/mongodb/read_size`).
265 # * `short_host/path/key` for domain-specific keys (e.g.
266 # `foo.com/myproduct/bar`)
267 #
268 # Predefined labels include:
269 #
270 # * `/agent`
271 # * `/component`
272 # * `/error/message`
273 # * `/error/name`
274 # * `/http/client_city`
275 # * `/http/client_country`
276 # * `/http/client_protocol`
277 # * `/http/client_region`
278 # * `/http/host`
279 # * `/http/method`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700280 # * `/http/path`
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400281 # * `/http/redirected_url`
282 # * `/http/request/size`
283 # * `/http/response/size`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700284 # * `/http/route`
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400285 # * `/http/status_code`
286 # * `/http/url`
287 # * `/http/user_agent`
288 # * `/pid`
289 # * `/stacktrace`
290 # * `/tid`
Bu Sun Kim65020912020-05-20 12:08:20 -0700291 &quot;a_key&quot;: &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800292 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700293 &quot;name&quot;: &quot;A String&quot;, # Name of the span. Must be less than 128 bytes. The span name is sanitized
294 # and displayed in the Stackdriver Trace tool in the
295 # Google Cloud Platform Console.
296 # The name may be a method name or some other per-call site name.
297 # For the same executable and the same call point, a best practice is
298 # to use a consistent name, which makes it easier to correlate
299 # cross-trace spans.
300 &quot;spanId&quot;: &quot;A String&quot;, # Identifier for the span. Must be a 64-bit integer other than 0 and
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700301 # unique within a trace. For example, `2205310701640571284`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700302 &quot;parentSpanId&quot;: &quot;A String&quot;, # Optional. ID of the parent span, if any.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700303 &quot;endTime&quot;: &quot;A String&quot;, # End time of the span in nanoseconds from the UNIX epoch.
304 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the span in nanoseconds from the UNIX epoch.
305 &quot;kind&quot;: &quot;A String&quot;, # Distinguishes between spans generated in a particular context. For example,
306 # two spans with the same name may be distinguished using `RPC_CLIENT`
307 # and `RPC_SERVER` to identify queueing latency associated with the span.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800308 },
309 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700310 &quot;traceId&quot;: &quot;A String&quot;, # Globally unique identifier for the trace. This identifier is a 128-bit
311 # numeric value formatted as a 32-byte hex string. For example,
312 # `382d4f4c6b7bb2f4a972559d9085001d`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800313 },
314 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700315 &quot;nextPageToken&quot;: &quot;A String&quot;, # If defined, indicates that there are more traces that match the request
316 # and that this value should be passed to the next request to continue
317 # retrieving additional traces.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800318 }</pre>
319</div>
320
321<div class="method">
322 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
323 <pre>Retrieves the next page of results.
324
325Args:
326 previous_request: The request for the previous page. (required)
327 previous_response: The response from the request for the previous page. (required)
328
329Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700330 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800331 page. Returns None if there are no more items in the collection.
332 </pre>
333</div>
334
335</body></html>