blob: 5854fd43363a81243b299e8fd339a9ad52eacd10 [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 Kimd059ad82020-07-22 17:02:09 -070081 <code><a href="#list">list(projectId, endTime=None, orderBy=None, view=None, pageToken=None, pageSize=None, startTime=None, filter=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.
90
91Args:
Dan O'Mearadd494642020-05-01 07:42:23 -070092 projectId: string, Required. ID of the Cloud project where the trace data is stored. (required)
93 traceId: string, Required. ID of the trace to return. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080094 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040095 Allowed values
96 1 - v1 error format
97 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080098
99Returns:
100 An object of the form:
101
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400102 { # A trace describes how long it takes for an application to perform an
103 # operation. It consists of a set of spans, each of which represent a single
104 # timed event within the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700105 &quot;projectId&quot;: &quot;A String&quot;, # Project ID of the Cloud project where the trace data is stored.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700106 &quot;traceId&quot;: &quot;A String&quot;, # Globally unique identifier for the trace. This identifier is a 128-bit
107 # numeric value formatted as a 32-byte hex string. For example,
108 # `382d4f4c6b7bb2f4a972559d9085001d`. The numeric value should not be zero.
Bu Sun Kim65020912020-05-20 12:08:20 -0700109 &quot;spans&quot;: [ # Collection of spans in the trace.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400110 { # A span represents a single timed event within a trace. Spans can be nested
111 # and form a trace tree. Often, a trace contains a root span that describes the
112 # end-to-end latency of an operation and, optionally, one or more subspans for
113 # its suboperations. Spans do not need to be contiguous. There may be gaps
114 # between spans in a trace.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700115 &quot;spanId&quot;: &quot;A String&quot;, # Identifier for the span. Must be a 64-bit integer other than 0 and
116 # unique within a trace. For example, `2205310701640571284`.
117 &quot;kind&quot;: &quot;A String&quot;, # Distinguishes between spans generated in a particular context. For example,
118 # two spans with the same name may be distinguished using `RPC_CLIENT`
119 # and `RPC_SERVER` to identify queueing latency associated with the span.
120 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the span in nanoseconds from the UNIX epoch.
121 &quot;name&quot;: &quot;A String&quot;, # Name of the span. Must be less than 128 bytes. The span name is sanitized
122 # and displayed in the Trace tool in the Google Cloud Platform Console.
123 # The name may be a method name or some other per-call site name.
124 # For the same executable and the same call point, a best practice is
125 # to use a consistent name, which makes it easier to correlate
126 # cross-trace spans.
127 &quot;endTime&quot;: &quot;A String&quot;, # End time of the span in nanoseconds from the UNIX epoch.
128 &quot;parentSpanId&quot;: &quot;A String&quot;, # Optional. ID of the parent span, if any.
Bu Sun Kim65020912020-05-20 12:08:20 -0700129 &quot;labels&quot;: { # Collection of labels associated with the span. Label keys must be less than
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400130 # 128 bytes. Label values must be less than 16 kilobytes (10MB for
131 # `/stacktrace` values).
132 #
133 # Some predefined label keys exist, or you may create your own. When creating
134 # your own, we recommend the following formats:
135 #
136 # * `/category/product/key` for agents of well-known products (e.g.
137 # `/db/mongodb/read_size`).
138 # * `short_host/path/key` for domain-specific keys (e.g.
139 # `foo.com/myproduct/bar`)
140 #
141 # Predefined labels include:
142 #
143 # * `/agent`
144 # * `/component`
145 # * `/error/message`
146 # * `/error/name`
147 # * `/http/client_city`
148 # * `/http/client_country`
149 # * `/http/client_protocol`
150 # * `/http/client_region`
151 # * `/http/host`
152 # * `/http/method`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 # * `/http/path`
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400154 # * `/http/redirected_url`
155 # * `/http/request/size`
156 # * `/http/response/size`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700157 # * `/http/route`
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400158 # * `/http/status_code`
159 # * `/http/url`
160 # * `/http/user_agent`
161 # * `/pid`
162 # * `/stacktrace`
163 # * `/tid`
Bu Sun Kim65020912020-05-20 12:08:20 -0700164 &quot;a_key&quot;: &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800165 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800166 },
167 ],
168 }</pre>
169</div>
170
171<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700172 <code class="details" id="list">list(projectId, endTime=None, orderBy=None, view=None, pageToken=None, pageSize=None, startTime=None, filter=None, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800173 <pre>Returns of a list of traces that match the specified filter conditions.
174
175Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700176 projectId: string, Required. ID of the Cloud project where the trace data is stored. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700177 endTime: string, End of the time interval (inclusive) during which the trace data was
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700178collected from the application.
Dan O'Mearadd494642020-05-01 07:42:23 -0700179 orderBy: string, Optional. Field used to sort the returned traces.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400180Can be one of the following:
181
182* `trace_id`
183* `name` (`name` field of root span in the trace)
184* `duration` (difference between `end_time` and `start_time` fields of
185 the root span)
186* `start` (`start_time` field of the root span)
187
188Descending order can be specified by appending `desc` to the sort field
189(for example, `name desc`).
190
191Only one sort field is permitted.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700192 view: string, Optional. Type of data returned for traces in the list. Default is
193`MINIMAL`.
194 pageToken: string, Token identifying the page of results to return. If provided, use the
195value of the `next_page_token` field from a previous request.
196 pageSize: integer, Optional. Maximum number of traces to return. If not specified or &lt;= 0, the
197implementation selects a reasonable value. The implementation may
198return fewer traces than the requested page size.
199 startTime: string, Start of the time interval (inclusive) during which the trace data was
200collected from the application.
Dan O'Mearadd494642020-05-01 07:42:23 -0700201 filter: string, Optional. A filter against labels for the request.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400202
203By default, searches use prefix matching. To specify exact match, prepend
204a plus symbol (`+`) to the search term.
205Multiple terms are ANDed. Syntax:
206
207* `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root
208 span starts with `NAME_PREFIX`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700209* `+root:NAME` or `+NAME`: Return traces where any root span&#x27;s name is
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400210 exactly `NAME`.
211* `span:NAME_PREFIX`: Return traces where any span starts with
212 `NAME_PREFIX`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700213* `+span:NAME`: Return traces where any span&#x27;s name is exactly
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400214 `NAME`.
215* `latency:DURATION`: Return traces whose overall latency is
216 greater or equal to than `DURATION`. Accepted units are nanoseconds
217 (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For
218 example, `latency:24ms` returns traces whose overall latency
219 is greater than or equal to 24 milliseconds.
220* `label:LABEL_KEY`: Return all traces containing the specified
221 label key (exact match, case-sensitive) regardless of the key:value
Bu Sun Kim65020912020-05-20 12:08:20 -0700222 pair&#x27;s value (including empty values).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400223* `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified
224 label key (exact match, case-sensitive) whose value starts with
225 `VALUE_PREFIX`. Both a key and a value must be specified.
226* `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair
227 exactly matching the specified text. Both a key and a value must be
228 specified.
229* `method:VALUE`: Equivalent to `/http/method:VALUE`.
230* `url:VALUE`: Equivalent to `/http/url:VALUE`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700231 x__xgafv: string, V1 error format.
232 Allowed values
233 1 - v1 error format
234 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800235
236Returns:
237 An object of the form:
238
239 { # The response message for the `ListTraces` method.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700240 &quot;nextPageToken&quot;: &quot;A String&quot;, # If defined, indicates that there are more traces that match the request
241 # and that this value should be passed to the next request to continue
242 # retrieving additional traces.
Bu Sun Kim65020912020-05-20 12:08:20 -0700243 &quot;traces&quot;: [ # List of trace records as specified by the view parameter.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400244 { # A trace describes how long it takes for an application to perform an
245 # operation. It consists of a set of spans, each of which represent a single
246 # timed event within the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700247 &quot;projectId&quot;: &quot;A String&quot;, # Project ID of the Cloud project where the trace data is stored.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700248 &quot;traceId&quot;: &quot;A String&quot;, # Globally unique identifier for the trace. This identifier is a 128-bit
249 # numeric value formatted as a 32-byte hex string. For example,
250 # `382d4f4c6b7bb2f4a972559d9085001d`. The numeric value should not be zero.
Bu Sun Kim65020912020-05-20 12:08:20 -0700251 &quot;spans&quot;: [ # Collection of spans in the trace.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400252 { # A span represents a single timed event within a trace. Spans can be nested
253 # and form a trace tree. Often, a trace contains a root span that describes the
254 # end-to-end latency of an operation and, optionally, one or more subspans for
255 # its suboperations. Spans do not need to be contiguous. There may be gaps
256 # between spans in a trace.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700257 &quot;spanId&quot;: &quot;A String&quot;, # Identifier for the span. Must be a 64-bit integer other than 0 and
258 # unique within a trace. For example, `2205310701640571284`.
259 &quot;kind&quot;: &quot;A String&quot;, # Distinguishes between spans generated in a particular context. For example,
260 # two spans with the same name may be distinguished using `RPC_CLIENT`
261 # and `RPC_SERVER` to identify queueing latency associated with the span.
262 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the span in nanoseconds from the UNIX epoch.
263 &quot;name&quot;: &quot;A String&quot;, # Name of the span. Must be less than 128 bytes. The span name is sanitized
264 # and displayed in the Trace tool in the Google Cloud Platform Console.
265 # The name may be a method name or some other per-call site name.
266 # For the same executable and the same call point, a best practice is
267 # to use a consistent name, which makes it easier to correlate
268 # cross-trace spans.
269 &quot;endTime&quot;: &quot;A String&quot;, # End time of the span in nanoseconds from the UNIX epoch.
270 &quot;parentSpanId&quot;: &quot;A String&quot;, # Optional. ID of the parent span, if any.
Bu Sun Kim65020912020-05-20 12:08:20 -0700271 &quot;labels&quot;: { # Collection of labels associated with the span. Label keys must be less than
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400272 # 128 bytes. Label values must be less than 16 kilobytes (10MB for
273 # `/stacktrace` values).
274 #
275 # Some predefined label keys exist, or you may create your own. When creating
276 # your own, we recommend the following formats:
277 #
278 # * `/category/product/key` for agents of well-known products (e.g.
279 # `/db/mongodb/read_size`).
280 # * `short_host/path/key` for domain-specific keys (e.g.
281 # `foo.com/myproduct/bar`)
282 #
283 # Predefined labels include:
284 #
285 # * `/agent`
286 # * `/component`
287 # * `/error/message`
288 # * `/error/name`
289 # * `/http/client_city`
290 # * `/http/client_country`
291 # * `/http/client_protocol`
292 # * `/http/client_region`
293 # * `/http/host`
294 # * `/http/method`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700295 # * `/http/path`
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400296 # * `/http/redirected_url`
297 # * `/http/request/size`
298 # * `/http/response/size`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700299 # * `/http/route`
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400300 # * `/http/status_code`
301 # * `/http/url`
302 # * `/http/user_agent`
303 # * `/pid`
304 # * `/stacktrace`
305 # * `/tid`
Bu Sun Kim65020912020-05-20 12:08:20 -0700306 &quot;a_key&quot;: &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800307 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800308 },
309 ],
310 },
311 ],
312 }</pre>
313</div>
314
315<div class="method">
316 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
317 <pre>Retrieves the next page of results.
318
319Args:
320 previous_request: The request for the previous page. (required)
321 previous_response: The response from the request for the previous page. (required)
322
323Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700324 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800325 page. Returns None if there are no more items in the collection.
326 </pre>
327</div>
328
329</body></html>