blob: 1afb0f50877efa155cfbbebb34a67f6d17707f5e [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
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040075<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 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.
90
91Args:
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 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800105 "projectId": "A String", # Project ID of the Cloud project where the trace data is stored.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400106 "traceId": "A String", # Globally unique identifier for the trace. This identifier is a 128-bit
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700107 # numeric value formatted as a 32-byte hex string. For example,
108 # `382d4f4c6b7bb2f4a972559d9085001d`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800109 "spans": [ # 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.
115 "kind": "A String", # Distinguishes between spans generated in a particular context. For example,
116 # two spans with the same name may be distinguished using `RPC_CLIENT`
117 # and `RPC_SERVER` to identify queueing latency associated with the span.
118 "name": "A String", # Name of the span. Must be less than 128 bytes. The span name is sanitized
119 # and displayed in the Stackdriver Trace tool in the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120 # Google Cloud Platform Console.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400121 # The name may be a method name or some other per-call site name.
122 # For the same executable and the same call point, a best practice is
123 # to use a consistent name, which makes it easier to correlate
124 # cross-trace spans.
125 "labels": { # Collection of labels associated with the span. Label keys must be less than
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400126 # 128 bytes. Label values must be less than 16 kilobytes (10MB for
127 # `/stacktrace` values).
128 #
129 # Some predefined label keys exist, or you may create your own. When creating
130 # your own, we recommend the following formats:
131 #
132 # * `/category/product/key` for agents of well-known products (e.g.
133 # `/db/mongodb/read_size`).
134 # * `short_host/path/key` for domain-specific keys (e.g.
135 # `foo.com/myproduct/bar`)
136 #
137 # Predefined labels include:
138 #
139 # * `/agent`
140 # * `/component`
141 # * `/error/message`
142 # * `/error/name`
143 # * `/http/client_city`
144 # * `/http/client_country`
145 # * `/http/client_protocol`
146 # * `/http/client_region`
147 # * `/http/host`
148 # * `/http/method`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700149 # * `/http/path`
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400150 # * `/http/redirected_url`
151 # * `/http/request/size`
152 # * `/http/response/size`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 # * `/http/route`
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400154 # * `/http/status_code`
155 # * `/http/url`
156 # * `/http/user_agent`
157 # * `/pid`
158 # * `/stacktrace`
159 # * `/tid`
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800160 "a_key": "A String",
161 },
162 "parentSpanId": "A String", # ID of the parent span, if any. Optional.
163 "startTime": "A String", # Start time of the span in nanoseconds from the UNIX epoch.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400164 "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 -0700165 # unique within a trace. For example, `2205310701640571284`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800166 "endTime": "A String", # End time of the span in nanoseconds from the UNIX epoch.
167 },
168 ],
169 }</pre>
170</div>
171
172<div class="method">
173 <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>
174 <pre>Returns of a list of traces that match the specified filter conditions.
175
176Args:
177 projectId: string, ID of the Cloud project where the trace data is stored. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400178 orderBy: string, Field used to sort the returned traces. Optional.
179Can be one of the following:
180
181* `trace_id`
182* `name` (`name` field of root span in the trace)
183* `duration` (difference between `end_time` and `start_time` fields of
184 the root span)
185* `start` (`start_time` field of the root span)
186
187Descending order can be specified by appending `desc` to the sort field
188(for example, `name desc`).
189
190Only one sort field is permitted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400191 startTime: string, Start of the time interval (inclusive) during which the trace data was
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400192collected from the application.
193 pageSize: integer, Maximum number of traces to return. If not specified or <= 0, the
194implementation selects a reasonable value. The implementation may
195return fewer traces than the requested page size. Optional.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800196 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400197 Allowed values
198 1 - v1 error format
199 2 - v2 error format
200 pageToken: string, Token identifying the page of results to return. If provided, use the
201value of the `next_page_token` field from a previous request. Optional.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400202 filter: string, An optional filter against labels for the request.
203
204By default, searches use prefix matching. To specify exact match, prepend
205a plus symbol (`+`) to the search term.
206Multiple terms are ANDed. Syntax:
207
208* `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root
209 span starts with `NAME_PREFIX`.
210* `+root:NAME` or `+NAME`: Return traces where any root span's name is
211 exactly `NAME`.
212* `span:NAME_PREFIX`: Return traces where any span starts with
213 `NAME_PREFIX`.
214* `+span:NAME`: Return traces where any span's name is exactly
215 `NAME`.
216* `latency:DURATION`: Return traces whose overall latency is
217 greater or equal to than `DURATION`. Accepted units are nanoseconds
218 (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For
219 example, `latency:24ms` returns traces whose overall latency
220 is greater than or equal to 24 milliseconds.
221* `label:LABEL_KEY`: Return all traces containing the specified
222 label key (exact match, case-sensitive) regardless of the key:value
223 pair's value (including empty values).
224* `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified
225 label key (exact match, case-sensitive) whose value starts with
226 `VALUE_PREFIX`. Both a key and a value must be specified.
227* `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair
228 exactly matching the specified text. Both a key and a value must be
229 specified.
230* `method:VALUE`: Equivalent to `/http/method:VALUE`.
231* `url:VALUE`: Equivalent to `/http/url:VALUE`.
232 endTime: string, End of the time interval (inclusive) during which the trace data was
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400233collected from the application.
234 view: string, Type of data returned for traces in the list. Optional. Default is
235`MINIMAL`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800236
237Returns:
238 An object of the form:
239
240 { # The response message for the `ListTraces` method.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400241 "nextPageToken": "A String", # If defined, indicates that there are more traces that match the request
242 # and that this value should be passed to the next request to continue
243 # retrieving additional traces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700244 "traces": [ # List of trace records as specified by the view parameter.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400245 { # A trace describes how long it takes for an application to perform an
246 # operation. It consists of a set of spans, each of which represent a single
247 # timed event within the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800248 "projectId": "A String", # Project ID of the Cloud project where the trace data is stored.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400249 "traceId": "A String", # Globally unique identifier for the trace. This identifier is a 128-bit
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700250 # numeric value formatted as a 32-byte hex string. For example,
251 # `382d4f4c6b7bb2f4a972559d9085001d`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800252 "spans": [ # Collection of spans in the trace.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400253 { # A span represents a single timed event within a trace. Spans can be nested
254 # and form a trace tree. Often, a trace contains a root span that describes the
255 # end-to-end latency of an operation and, optionally, one or more subspans for
256 # its suboperations. Spans do not need to be contiguous. There may be gaps
257 # between spans in a trace.
258 "kind": "A String", # Distinguishes between spans generated in a particular context. For example,
259 # two spans with the same name may be distinguished using `RPC_CLIENT`
260 # and `RPC_SERVER` to identify queueing latency associated with the span.
261 "name": "A String", # Name of the span. Must be less than 128 bytes. The span name is sanitized
262 # and displayed in the Stackdriver Trace tool in the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700263 # Google Cloud Platform Console.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400264 # The name may be a method name or some other per-call site name.
265 # For the same executable and the same call point, a best practice is
266 # to use a consistent name, which makes it easier to correlate
267 # cross-trace spans.
268 "labels": { # Collection of labels associated with the span. Label keys must be less than
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400269 # 128 bytes. Label values must be less than 16 kilobytes (10MB for
270 # `/stacktrace` values).
271 #
272 # Some predefined label keys exist, or you may create your own. When creating
273 # your own, we recommend the following formats:
274 #
275 # * `/category/product/key` for agents of well-known products (e.g.
276 # `/db/mongodb/read_size`).
277 # * `short_host/path/key` for domain-specific keys (e.g.
278 # `foo.com/myproduct/bar`)
279 #
280 # Predefined labels include:
281 #
282 # * `/agent`
283 # * `/component`
284 # * `/error/message`
285 # * `/error/name`
286 # * `/http/client_city`
287 # * `/http/client_country`
288 # * `/http/client_protocol`
289 # * `/http/client_region`
290 # * `/http/host`
291 # * `/http/method`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 # * `/http/path`
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400293 # * `/http/redirected_url`
294 # * `/http/request/size`
295 # * `/http/response/size`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700296 # * `/http/route`
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400297 # * `/http/status_code`
298 # * `/http/url`
299 # * `/http/user_agent`
300 # * `/pid`
301 # * `/stacktrace`
302 # * `/tid`
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800303 "a_key": "A String",
304 },
305 "parentSpanId": "A String", # ID of the parent span, if any. Optional.
306 "startTime": "A String", # Start time of the span in nanoseconds from the UNIX epoch.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400307 "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 -0700308 # unique within a trace. For example, `2205310701640571284`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800309 "endTime": "A String", # End time of the span in nanoseconds from the UNIX epoch.
310 },
311 ],
312 },
313 ],
314 }</pre>
315</div>
316
317<div class="method">
318 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
319 <pre>Retrieves the next page of results.
320
321Args:
322 previous_request: The request for the previous page. (required)
323 previous_response: The response from the request for the previous page. (required)
324
325Returns:
326 A request object that you can call 'execute()' on to request the next
327 page. Returns None if there are no more items in the collection.
328 </pre>
329</div>
330
331</body></html>