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 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 75 | <h1><a href="cloudtrace_v1.html">Stackdriver 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. |
| 90 | |
| 91 | Args: |
| 92 | projectId: string, ID of the Cloud project where the trace data is stored. (required) |
| 93 | traceId: string, ID of the trace to return. (required) |
| 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. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 105 | "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^] | 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. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 108 | "spans": [ # Collection of spans in the trace. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 109 | { # 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. |
| 114 | "kind": "A String", # Distinguishes between spans generated in a particular context. For example, |
| 115 | # two spans with the same name may be distinguished using `RPC_CLIENT` |
| 116 | # and `RPC_SERVER` to identify queueing latency associated with the span. |
| 117 | "name": "A String", # Name of the span. Must be less than 128 bytes. The span name is sanitized |
| 118 | # and displayed in the Stackdriver Trace tool in the |
| 119 | # {% dynamic print site_values.console_name %}. |
| 120 | # The name may be a method name or some other per-call site name. |
| 121 | # For the same executable and the same call point, a best practice is |
| 122 | # to use a consistent name, which makes it easier to correlate |
| 123 | # cross-trace spans. |
| 124 | "labels": { # Collection of labels associated with the span. Label keys must be less than |
| 125 | # 128 bytes. Label values must be less than 16 kilobytes. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 126 | "a_key": "A String", |
| 127 | }, |
| 128 | "parentSpanId": "A String", # ID of the parent span, if any. Optional. |
| 129 | "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^] | 130 | "spanId": "A String", # Identifier for the span. Must be a 64-bit integer other than 0 and |
| 131 | # unique within a trace. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 132 | "endTime": "A String", # End time of the span in nanoseconds from the UNIX epoch. |
| 133 | }, |
| 134 | ], |
| 135 | }</pre> |
| 136 | </div> |
| 137 | |
| 138 | <div class="method"> |
| 139 | <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> |
| 140 | <pre>Returns of a list of traces that match the specified filter conditions. |
| 141 | |
| 142 | Args: |
| 143 | projectId: string, ID of the Cloud project where the trace data is stored. (required) |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 144 | orderBy: string, Field used to sort the returned traces. Optional. |
| 145 | Can be one of the following: |
| 146 | |
| 147 | * `trace_id` |
| 148 | * `name` (`name` field of root span in the trace) |
| 149 | * `duration` (difference between `end_time` and `start_time` fields of |
| 150 | the root span) |
| 151 | * `start` (`start_time` field of the root span) |
| 152 | |
| 153 | Descending order can be specified by appending `desc` to the sort field |
| 154 | (for example, `name desc`). |
| 155 | |
| 156 | Only one sort field is permitted. |
| 157 | startTime: string, End of the time interval (inclusive) during which the trace data was |
| 158 | collected from the application. |
| 159 | pageSize: integer, Maximum number of traces to return. If not specified or <= 0, the |
| 160 | implementation selects a reasonable value. The implementation may |
| 161 | return fewer traces than the requested page size. Optional. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 162 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 163 | Allowed values |
| 164 | 1 - v1 error format |
| 165 | 2 - v2 error format |
| 166 | pageToken: string, Token identifying the page of results to return. If provided, use the |
| 167 | value of the `next_page_token` field from a previous request. Optional. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 168 | filter: string, An optional filter for the request. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 169 | endTime: string, Start of the time interval (inclusive) during which the trace data was |
| 170 | collected from the application. |
| 171 | view: string, Type of data returned for traces in the list. Optional. Default is |
| 172 | `MINIMAL`. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 173 | |
| 174 | Returns: |
| 175 | An object of the form: |
| 176 | |
| 177 | { # The response message for the `ListTraces` method. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 178 | "nextPageToken": "A String", # If defined, indicates that there are more traces that match the request |
| 179 | # and that this value should be passed to the next request to continue |
| 180 | # retrieving additional traces. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 181 | "traces": [ # List of trace records returned. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 182 | { # A trace describes how long it takes for an application to perform an |
| 183 | # operation. It consists of a set of spans, each of which represent a single |
| 184 | # timed event within the operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 185 | "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^] | 186 | "traceId": "A String", # Globally unique identifier for the trace. This identifier is a 128-bit |
| 187 | # numeric value formatted as a 32-byte hex string. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 188 | "spans": [ # Collection of spans in the trace. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 189 | { # A span represents a single timed event within a trace. Spans can be nested |
| 190 | # and form a trace tree. Often, a trace contains a root span that describes the |
| 191 | # end-to-end latency of an operation and, optionally, one or more subspans for |
| 192 | # its suboperations. Spans do not need to be contiguous. There may be gaps |
| 193 | # between spans in a trace. |
| 194 | "kind": "A String", # Distinguishes between spans generated in a particular context. For example, |
| 195 | # two spans with the same name may be distinguished using `RPC_CLIENT` |
| 196 | # and `RPC_SERVER` to identify queueing latency associated with the span. |
| 197 | "name": "A String", # Name of the span. Must be less than 128 bytes. The span name is sanitized |
| 198 | # and displayed in the Stackdriver Trace tool in the |
| 199 | # {% dynamic print site_values.console_name %}. |
| 200 | # The name may be a method name or some other per-call site name. |
| 201 | # For the same executable and the same call point, a best practice is |
| 202 | # to use a consistent name, which makes it easier to correlate |
| 203 | # cross-trace spans. |
| 204 | "labels": { # Collection of labels associated with the span. Label keys must be less than |
| 205 | # 128 bytes. Label values must be less than 16 kilobytes. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 206 | "a_key": "A String", |
| 207 | }, |
| 208 | "parentSpanId": "A String", # ID of the parent span, if any. Optional. |
| 209 | "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^] | 210 | "spanId": "A String", # Identifier for the span. Must be a 64-bit integer other than 0 and |
| 211 | # unique within a trace. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 212 | "endTime": "A String", # End time of the span in nanoseconds from the UNIX epoch. |
| 213 | }, |
| 214 | ], |
| 215 | }, |
| 216 | ], |
| 217 | }</pre> |
| 218 | </div> |
| 219 | |
| 220 | <div class="method"> |
| 221 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 222 | <pre>Retrieves the next page of results. |
| 223 | |
| 224 | Args: |
| 225 | previous_request: The request for the previous page. (required) |
| 226 | previous_response: The response from the request for the previous page. (required) |
| 227 | |
| 228 | Returns: |
| 229 | A request object that you can call 'execute()' on to request the next |
| 230 | page. Returns None if there are no more items in the collection. |
| 231 | </pre> |
| 232 | </div> |
| 233 | |
| 234 | </body></html> |