Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 75 | <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 Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 76 | <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 Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 81 | <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 Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 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. |
| 90 | |
| 91 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 92 | 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 Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 94 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 95 | Allowed values |
| 96 | 1 - v1 error format |
| 97 | 2 - v2 error format |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 98 | |
| 99 | Returns: |
| 100 | An object of the form: |
| 101 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 102 | { # 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 Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 105 | "projectId": "A String", # Project ID of the Cloud project where the trace data is stored. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 106 | "traceId": "A String", # 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 Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 109 | "spans": [ # Collection of spans in the trace. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 110 | { # 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 Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 115 | "spanId": "A String", # Identifier for the span. Must be a 64-bit integer other than 0 and |
| 116 | # unique within a trace. For example, `2205310701640571284`. |
| 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 | "startTime": "A String", # Start time of the span in nanoseconds from the UNIX epoch. |
| 121 | "name": "A String", # 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 | "endTime": "A String", # End time of the span in nanoseconds from the UNIX epoch. |
| 128 | "parentSpanId": "A String", # Optional. ID of the parent span, if any. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 129 | "labels": { # Collection of labels associated with the span. Label keys must be less than |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 130 | # 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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 153 | # * `/http/path` |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 154 | # * `/http/redirected_url` |
| 155 | # * `/http/request/size` |
| 156 | # * `/http/response/size` |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 157 | # * `/http/route` |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 158 | # * `/http/status_code` |
| 159 | # * `/http/url` |
| 160 | # * `/http/user_agent` |
| 161 | # * `/pid` |
| 162 | # * `/stacktrace` |
| 163 | # * `/tid` |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 164 | "a_key": "A String", |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 165 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 166 | }, |
| 167 | ], |
| 168 | }</pre> |
| 169 | </div> |
| 170 | |
| 171 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 172 | <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 Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 173 | <pre>Returns of a list of traces that match the specified filter conditions. |
| 174 | |
| 175 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 176 | projectId: string, Required. ID of the Cloud project where the trace data is stored. (required) |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 177 | endTime: string, End of the time interval (inclusive) during which the trace data was |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 178 | collected from the application. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 179 | orderBy: string, Optional. Field used to sort the returned traces. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 180 | Can 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 | |
| 188 | Descending order can be specified by appending `desc` to the sort field |
| 189 | (for example, `name desc`). |
| 190 | |
| 191 | Only one sort field is permitted. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 192 | 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 |
| 195 | value of the `next_page_token` field from a previous request. |
| 196 | pageSize: integer, Optional. Maximum number of traces to return. If not specified or <= 0, the |
| 197 | implementation selects a reasonable value. The implementation may |
| 198 | return fewer traces than the requested page size. |
| 199 | startTime: string, Start of the time interval (inclusive) during which the trace data was |
| 200 | collected from the application. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 201 | filter: string, Optional. A filter against labels for the request. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 202 | |
| 203 | By default, searches use prefix matching. To specify exact match, prepend |
| 204 | a plus symbol (`+`) to the search term. |
| 205 | Multiple 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 Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 209 | * `+root:NAME` or `+NAME`: Return traces where any root span's name is |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 210 | exactly `NAME`. |
| 211 | * `span:NAME_PREFIX`: Return traces where any span starts with |
| 212 | `NAME_PREFIX`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 213 | * `+span:NAME`: Return traces where any span's name is exactly |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 214 | `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 Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 222 | pair's value (including empty values). |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 223 | * `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 Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 231 | x__xgafv: string, V1 error format. |
| 232 | Allowed values |
| 233 | 1 - v1 error format |
| 234 | 2 - v2 error format |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 235 | |
| 236 | Returns: |
| 237 | An object of the form: |
| 238 | |
| 239 | { # The response message for the `ListTraces` method. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 240 | "nextPageToken": "A String", # 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 Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 243 | "traces": [ # List of trace records as specified by the view parameter. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 244 | { # 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 Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 247 | "projectId": "A String", # Project ID of the Cloud project where the trace data is stored. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 248 | "traceId": "A String", # 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 Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 251 | "spans": [ # Collection of spans in the trace. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 252 | { # 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 Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 257 | "spanId": "A String", # Identifier for the span. Must be a 64-bit integer other than 0 and |
| 258 | # unique within a trace. For example, `2205310701640571284`. |
| 259 | "kind": "A String", # 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 | "startTime": "A String", # Start time of the span in nanoseconds from the UNIX epoch. |
| 263 | "name": "A String", # 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 | "endTime": "A String", # End time of the span in nanoseconds from the UNIX epoch. |
| 270 | "parentSpanId": "A String", # Optional. ID of the parent span, if any. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 271 | "labels": { # Collection of labels associated with the span. Label keys must be less than |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 272 | # 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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 295 | # * `/http/path` |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 296 | # * `/http/redirected_url` |
| 297 | # * `/http/request/size` |
| 298 | # * `/http/response/size` |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 299 | # * `/http/route` |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 300 | # * `/http/status_code` |
| 301 | # * `/http/url` |
| 302 | # * `/http/user_agent` |
| 303 | # * `/pid` |
| 304 | # * `/stacktrace` |
| 305 | # * `/tid` |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 306 | "a_key": "A String", |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 307 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 308 | }, |
| 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 | |
| 319 | Args: |
| 320 | previous_request: The request for the previous page. (required) |
| 321 | previous_response: The response from the request for the previous page. (required) |
| 322 | |
| 323 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 324 | A request object that you can call 'execute()' on to request the next |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 325 | page. Returns None if there are no more items in the collection. |
| 326 | </pre> |
| 327 | </div> |
| 328 | |
| 329 | </body></html> |