blob: 13df879fe3bfbfa6a177cc5589c276d1dd908533 [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">
81 <code><a href="#list">list(projectId, orderBy=None, startTime=None, pageSize=None, x__xgafv=None, pageToken=None, filter=None, endTime=None, view=None)</a></code></p>
82<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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800107 "projectId": "A String", # Project ID of the Cloud project where the trace data is stored.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400108 "traceId": "A String", # Globally unique identifier for the trace. This identifier is a 128-bit
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109 # numeric value formatted as a 32-byte hex string. For example,
110 # `382d4f4c6b7bb2f4a972559d9085001d`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800111 "spans": [ # Collection of spans in the trace.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400112 { # A span represents a single timed event within a trace. Spans can be nested
113 # and form a trace tree. Often, a trace contains a root span that describes the
114 # end-to-end latency of an operation and, optionally, one or more subspans for
115 # its suboperations. Spans do not need to be contiguous. There may be gaps
116 # between spans in a trace.
117 "kind": "A String", # 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 "name": "A String", # Name of the span. Must be less than 128 bytes. The span name is sanitized
121 # and displayed in the Stackdriver Trace tool in the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700122 # Google Cloud Platform Console.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400123 # 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 "labels": { # Collection of labels associated with the span. Label keys must be less than
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400128 # 128 bytes. Label values must be less than 16 kilobytes (10MB for
129 # `/stacktrace` values).
130 #
131 # Some predefined label keys exist, or you may create your own. When creating
132 # your own, we recommend the following formats:
133 #
134 # * `/category/product/key` for agents of well-known products (e.g.
135 # `/db/mongodb/read_size`).
136 # * `short_host/path/key` for domain-specific keys (e.g.
137 # `foo.com/myproduct/bar`)
138 #
139 # Predefined labels include:
140 #
141 # * `/agent`
142 # * `/component`
143 # * `/error/message`
144 # * `/error/name`
145 # * `/http/client_city`
146 # * `/http/client_country`
147 # * `/http/client_protocol`
148 # * `/http/client_region`
149 # * `/http/host`
150 # * `/http/method`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151 # * `/http/path`
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400152 # * `/http/redirected_url`
153 # * `/http/request/size`
154 # * `/http/response/size`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700155 # * `/http/route`
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400156 # * `/http/status_code`
157 # * `/http/url`
158 # * `/http/user_agent`
159 # * `/pid`
160 # * `/stacktrace`
161 # * `/tid`
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800162 "a_key": "A String",
163 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700164 "parentSpanId": "A String", # Optional. ID of the parent span, if any.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800165 "startTime": "A String", # Start time of the span in nanoseconds from the UNIX epoch.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400166 "spanId": "A String", # Identifier for the span. Must be a 64-bit integer other than 0 and
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700167 # unique within a trace. For example, `2205310701640571284`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800168 "endTime": "A String", # End time of the span in nanoseconds from the UNIX epoch.
169 },
170 ],
171 }</pre>
172</div>
173
174<div class="method">
175 <code class="details" id="list">list(projectId, orderBy=None, startTime=None, pageSize=None, x__xgafv=None, pageToken=None, filter=None, endTime=None, view=None)</code>
176 <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)
182 orderBy: string, Optional. Field used to sort the returned traces.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400183Can be one of the following:
184
185* `trace_id`
186* `name` (`name` field of root span in the trace)
187* `duration` (difference between `end_time` and `start_time` fields of
188 the root span)
189* `start` (`start_time` field of the root span)
190
191Descending order can be specified by appending `desc` to the sort field
192(for example, `name desc`).
193
194Only one sort field is permitted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400195 startTime: string, Start of the time interval (inclusive) during which the trace data was
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400196collected from the application.
Dan O'Mearadd494642020-05-01 07:42:23 -0700197 pageSize: integer, Optional. Maximum number of traces to return. If not specified or &lt;= 0, the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400198implementation selects a reasonable value. The implementation may
Dan O'Mearadd494642020-05-01 07:42:23 -0700199return fewer traces than the requested page size.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800200 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400201 Allowed values
202 1 - v1 error format
203 2 - v2 error format
204 pageToken: string, Token identifying the page of results to return. If provided, use the
Dan O'Mearadd494642020-05-01 07:42:23 -0700205value of the `next_page_token` field from a previous request.
206 filter: string, Optional. A filter against labels for the request.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400207
208By default, searches use prefix matching. To specify exact match, prepend
209a plus symbol (`+`) to the search term.
210Multiple terms are ANDed. Syntax:
211
212* `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root
213 span starts with `NAME_PREFIX`.
214* `+root:NAME` or `+NAME`: Return traces where any root span's name is
215 exactly `NAME`.
216* `span:NAME_PREFIX`: Return traces where any span starts with
217 `NAME_PREFIX`.
218* `+span:NAME`: Return traces where any span's name is exactly
219 `NAME`.
220* `latency:DURATION`: Return traces whose overall latency is
221 greater or equal to than `DURATION`. Accepted units are nanoseconds
222 (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For
223 example, `latency:24ms` returns traces whose overall latency
224 is greater than or equal to 24 milliseconds.
225* `label:LABEL_KEY`: Return all traces containing the specified
226 label key (exact match, case-sensitive) regardless of the key:value
227 pair's value (including empty values).
228* `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified
229 label key (exact match, case-sensitive) whose value starts with
230 `VALUE_PREFIX`. Both a key and a value must be specified.
231* `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair
232 exactly matching the specified text. Both a key and a value must be
233 specified.
234* `method:VALUE`: Equivalent to `/http/method:VALUE`.
235* `url:VALUE`: Equivalent to `/http/url:VALUE`.
236 endTime: string, End of the time interval (inclusive) during which the trace data was
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400237collected from the application.
Dan O'Mearadd494642020-05-01 07:42:23 -0700238 view: string, Optional. Type of data returned for traces in the list. Default is
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400239`MINIMAL`.
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400245 "nextPageToken": "A String", # If defined, indicates that there are more traces that match the request
246 # and that this value should be passed to the next request to continue
247 # retrieving additional traces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 "traces": [ # List of trace records as specified by the view parameter.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400249 { # A trace describes how long it takes for an application to perform an
250 # operation. It consists of a set of spans, each of which represent a single
251 # timed event within the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800252 "projectId": "A String", # Project ID of the Cloud project where the trace data is stored.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400253 "traceId": "A String", # Globally unique identifier for the trace. This identifier is a 128-bit
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700254 # numeric value formatted as a 32-byte hex string. For example,
255 # `382d4f4c6b7bb2f4a972559d9085001d`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800256 "spans": [ # Collection of spans in the trace.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400257 { # A span represents a single timed event within a trace. Spans can be nested
258 # and form a trace tree. Often, a trace contains a root span that describes the
259 # end-to-end latency of an operation and, optionally, one or more subspans for
260 # its suboperations. Spans do not need to be contiguous. There may be gaps
261 # between spans in a trace.
262 "kind": "A String", # Distinguishes between spans generated in a particular context. For example,
263 # two spans with the same name may be distinguished using `RPC_CLIENT`
264 # and `RPC_SERVER` to identify queueing latency associated with the span.
265 "name": "A String", # Name of the span. Must be less than 128 bytes. The span name is sanitized
266 # and displayed in the Stackdriver Trace tool in the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700267 # Google Cloud Platform Console.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400268 # The name may be a method name or some other per-call site name.
269 # For the same executable and the same call point, a best practice is
270 # to use a consistent name, which makes it easier to correlate
271 # cross-trace spans.
272 "labels": { # Collection of labels associated with the span. Label keys must be less than
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400273 # 128 bytes. Label values must be less than 16 kilobytes (10MB for
274 # `/stacktrace` values).
275 #
276 # Some predefined label keys exist, or you may create your own. When creating
277 # your own, we recommend the following formats:
278 #
279 # * `/category/product/key` for agents of well-known products (e.g.
280 # `/db/mongodb/read_size`).
281 # * `short_host/path/key` for domain-specific keys (e.g.
282 # `foo.com/myproduct/bar`)
283 #
284 # Predefined labels include:
285 #
286 # * `/agent`
287 # * `/component`
288 # * `/error/message`
289 # * `/error/name`
290 # * `/http/client_city`
291 # * `/http/client_country`
292 # * `/http/client_protocol`
293 # * `/http/client_region`
294 # * `/http/host`
295 # * `/http/method`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700296 # * `/http/path`
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400297 # * `/http/redirected_url`
298 # * `/http/request/size`
299 # * `/http/response/size`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700300 # * `/http/route`
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400301 # * `/http/status_code`
302 # * `/http/url`
303 # * `/http/user_agent`
304 # * `/pid`
305 # * `/stacktrace`
306 # * `/tid`
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800307 "a_key": "A String",
308 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700309 "parentSpanId": "A String", # Optional. ID of the parent span, if any.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800310 "startTime": "A String", # Start time of the span in nanoseconds from the UNIX epoch.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400311 "spanId": "A String", # Identifier for the span. Must be a 64-bit integer other than 0 and
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700312 # unique within a trace. For example, `2205310701640571284`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800313 "endTime": "A String", # End time of the span in nanoseconds from the UNIX epoch.
314 },
315 ],
316 },
317 ],
318 }</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:
330 A request object that you can call 'execute()' on to request the next
331 page. Returns None if there are no more items in the collection.
332 </pre>
333</div>
334
335</body></html>