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"> |
| 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 90 | In this case, getting for traces is considered an active developer method, |
| 91 | even though it is technically a read-only method. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 92 | |
| 93 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 94 | 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 Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 96 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 97 | Allowed values |
| 98 | 1 - v1 error format |
| 99 | 2 - v2 error format |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 100 | |
| 101 | Returns: |
| 102 | An object of the form: |
| 103 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 104 | { # 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 Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 107 | "projectId": "A String", # Project ID of the Cloud project where the trace data is stored. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 108 | "traceId": "A String", # Globally unique identifier for the trace. This identifier is a 128-bit |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 109 | # numeric value formatted as a 32-byte hex string. For example, |
| 110 | # `382d4f4c6b7bb2f4a972559d9085001d`. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 111 | "spans": [ # Collection of spans in the trace. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 112 | { # 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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 122 | # Google Cloud Platform Console. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 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 | "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] | 128 | # 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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 151 | # * `/http/path` |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 152 | # * `/http/redirected_url` |
| 153 | # * `/http/request/size` |
| 154 | # * `/http/response/size` |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 155 | # * `/http/route` |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 156 | # * `/http/status_code` |
| 157 | # * `/http/url` |
| 158 | # * `/http/user_agent` |
| 159 | # * `/pid` |
| 160 | # * `/stacktrace` |
| 161 | # * `/tid` |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 162 | "a_key": "A String", |
| 163 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 164 | "parentSpanId": "A String", # Optional. ID of the parent span, if any. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 165 | "startTime": "A String", # Start time of the span in nanoseconds from the UNIX epoch. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 166 | "spanId": "A String", # Identifier for the span. Must be a 64-bit integer other than 0 and |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 167 | # unique within a trace. For example, `2205310701640571284`. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 168 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 177 | In this case, listing for traces is considered an active developer method, |
| 178 | even though it is technically a read-only method. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 179 | |
| 180 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 181 | 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 Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 183 | Can 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 | |
| 191 | Descending order can be specified by appending `desc` to the sort field |
| 192 | (for example, `name desc`). |
| 193 | |
| 194 | Only one sort field is permitted. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 195 | startTime: string, Start of the time interval (inclusive) during which the trace data was |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 196 | collected from the application. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 197 | pageSize: integer, Optional. Maximum number of traces to return. If not specified or <= 0, the |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 198 | implementation selects a reasonable value. The implementation may |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 199 | return fewer traces than the requested page size. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 200 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 201 | 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 205 | value of the `next_page_token` field from a previous request. |
| 206 | filter: string, Optional. A filter against labels for the request. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 207 | |
| 208 | By default, searches use prefix matching. To specify exact match, prepend |
| 209 | a plus symbol (`+`) to the search term. |
| 210 | Multiple 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 Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 237 | collected from the application. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 238 | view: string, Optional. Type of data returned for traces in the list. Default is |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 239 | `MINIMAL`. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 240 | |
| 241 | Returns: |
| 242 | An object of the form: |
| 243 | |
| 244 | { # The response message for the `ListTraces` method. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 245 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 248 | "traces": [ # List of trace records as specified by the view parameter. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 249 | { # 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 Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 252 | "projectId": "A String", # Project ID of the Cloud project where the trace data is stored. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 253 | "traceId": "A String", # Globally unique identifier for the trace. This identifier is a 128-bit |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 254 | # numeric value formatted as a 32-byte hex string. For example, |
| 255 | # `382d4f4c6b7bb2f4a972559d9085001d`. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 256 | "spans": [ # Collection of spans in the trace. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 257 | { # 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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 267 | # Google Cloud Platform Console. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 268 | # 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 Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 273 | # 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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 296 | # * `/http/path` |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 297 | # * `/http/redirected_url` |
| 298 | # * `/http/request/size` |
| 299 | # * `/http/response/size` |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 300 | # * `/http/route` |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 301 | # * `/http/status_code` |
| 302 | # * `/http/url` |
| 303 | # * `/http/user_agent` |
| 304 | # * `/pid` |
| 305 | # * `/stacktrace` |
| 306 | # * `/tid` |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 307 | "a_key": "A String", |
| 308 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 309 | "parentSpanId": "A String", # Optional. ID of the parent span, if any. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 310 | "startTime": "A String", # Start time of the span in nanoseconds from the UNIX epoch. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 311 | "spanId": "A String", # Identifier for the span. Must be a 64-bit integer other than 0 and |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 312 | # unique within a trace. For example, `2205310701640571284`. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 313 | "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 | |
| 325 | Args: |
| 326 | previous_request: The request for the previous page. (required) |
| 327 | previous_response: The response from the request for the previous page. (required) |
| 328 | |
| 329 | Returns: |
| 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> |