Home | History | Annotate | Download | only in dyn
      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 
     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>
     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.
     95     Allowed values
     96       1 - v1 error format
     97       2 - v2 error format
     98 
     99 Returns:
    100   An object of the form:
    101 
    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.
    105     "projectId": "A String", # Project ID of the Cloud project where the trace data is stored.
    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.
    108     "spans": [ # Collection of spans in the trace.
    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 (10MB for
    126             # `/stacktrace` values).
    127             #
    128             # Some predefined label keys exist, or you may create your own. When creating
    129             # your own, we recommend the following formats:
    130             #
    131             # * `/category/product/key` for agents of well-known products (e.g.
    132             #   `/db/mongodb/read_size`).
    133             # * `short_host/path/key` for domain-specific keys (e.g.
    134             #   `foo.com/myproduct/bar`)
    135             #
    136             # Predefined labels include:
    137             #
    138             # *   `/agent`
    139             # *   `/component`
    140             # *   `/error/message`
    141             # *   `/error/name`
    142             # *   `/http/client_city`
    143             # *   `/http/client_country`
    144             # *   `/http/client_protocol`
    145             # *   `/http/client_region`
    146             # *   `/http/host`
    147             # *   `/http/method`
    148             # *   `/http/redirected_url`
    149             # *   `/http/request/size`
    150             # *   `/http/response/size`
    151             # *   `/http/status_code`
    152             # *   `/http/url`
    153             # *   `/http/user_agent`
    154             # *   `/pid`
    155             # *   `/stacktrace`
    156             # *   `/tid`
    157           "a_key": "A String",
    158         },
    159         "parentSpanId": "A String", # ID of the parent span, if any. Optional.
    160         "startTime": "A String", # Start time of the span in nanoseconds from the UNIX epoch.
    161         "spanId": "A String", # Identifier for the span. Must be a 64-bit integer other than 0 and
    162             # unique within a trace.
    163         "endTime": "A String", # End time of the span in nanoseconds from the UNIX epoch.
    164       },
    165     ],
    166   }</pre>
    167 </div>
    168 
    169 <div class="method">
    170     <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>
    171   <pre>Returns of a list of traces that match the specified filter conditions.
    172 
    173 Args:
    174   projectId: string, ID of the Cloud project where the trace data is stored. (required)
    175   orderBy: string, Field used to sort the returned traces. Optional.
    176 Can be one of the following:
    177 
    178 *   `trace_id`
    179 *   `name` (`name` field of root span in the trace)
    180 *   `duration` (difference between `end_time` and `start_time` fields of
    181      the root span)
    182 *   `start` (`start_time` field of the root span)
    183 
    184 Descending order can be specified by appending `desc` to the sort field
    185 (for example, `name desc`).
    186 
    187 Only one sort field is permitted.
    188   startTime: string, Start of the time interval (inclusive) during which the trace data was
    189 collected from the application.
    190   pageSize: integer, Maximum number of traces to return. If not specified or <= 0, the
    191 implementation selects a reasonable value.  The implementation may
    192 return fewer traces than the requested page size. Optional.
    193   x__xgafv: string, V1 error format.
    194     Allowed values
    195       1 - v1 error format
    196       2 - v2 error format
    197   pageToken: string, Token identifying the page of results to return. If provided, use the
    198 value of the `next_page_token` field from a previous request. Optional.
    199   filter: string, An optional filter against labels for the request.
    200 
    201 By default, searches use prefix matching. To specify exact match, prepend
    202 a plus symbol (`+`) to the search term.
    203 Multiple terms are ANDed. Syntax:
    204 
    205 *   `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root
    206     span starts with `NAME_PREFIX`.
    207 *   `+root:NAME` or `+NAME`: Return traces where any root span's name is
    208     exactly `NAME`.
    209 *   `span:NAME_PREFIX`: Return traces where any span starts with
    210     `NAME_PREFIX`.
    211 *   `+span:NAME`: Return traces where any span's name is exactly
    212     `NAME`.
    213 *   `latency:DURATION`: Return traces whose overall latency is
    214     greater or equal to than `DURATION`. Accepted units are nanoseconds
    215     (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For
    216     example, `latency:24ms` returns traces whose overall latency
    217     is greater than or equal to 24 milliseconds.
    218 *   `label:LABEL_KEY`: Return all traces containing the specified
    219     label key (exact match, case-sensitive) regardless of the key:value
    220     pair's value (including empty values).
    221 *   `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified
    222     label key (exact match, case-sensitive) whose value starts with
    223     `VALUE_PREFIX`. Both a key and a value must be specified.
    224 *   `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair
    225     exactly matching the specified text. Both a key and a value must be
    226     specified.
    227 *   `method:VALUE`: Equivalent to `/http/method:VALUE`.
    228 *   `url:VALUE`: Equivalent to `/http/url:VALUE`.
    229   endTime: string, End of the time interval (inclusive) during which the trace data was
    230 collected from the application.
    231   view: string, Type of data returned for traces in the list. Optional. Default is
    232 `MINIMAL`.
    233 
    234 Returns:
    235   An object of the form:
    236 
    237     { # The response message for the `ListTraces` method.
    238     "nextPageToken": "A String", # If defined, indicates that there are more traces that match the request
    239         # and that this value should be passed to the next request to continue
    240         # retrieving additional traces.
    241     "traces": [ # List of trace records returned.
    242       { # A trace describes how long it takes for an application to perform an
    243           # operation. It consists of a set of spans, each of which represent a single
    244           # timed event within the operation.
    245         "projectId": "A String", # Project ID of the Cloud project where the trace data is stored.
    246         "traceId": "A String", # Globally unique identifier for the trace. This identifier is a 128-bit
    247             # numeric value formatted as a 32-byte hex string.
    248         "spans": [ # Collection of spans in the trace.
    249           { # A span represents a single timed event within a trace. Spans can be nested
    250               # and form a trace tree. Often, a trace contains a root span that describes the
    251               # end-to-end latency of an operation and, optionally, one or more subspans for
    252               # its suboperations. Spans do not need to be contiguous. There may be gaps
    253               # between spans in a trace.
    254             "kind": "A String", # Distinguishes between spans generated in a particular context. For example,
    255                 # two spans with the same name may be distinguished using `RPC_CLIENT`
    256                 # and `RPC_SERVER` to identify queueing latency associated with the span.
    257             "name": "A String", # Name of the span. Must be less than 128 bytes. The span name is sanitized
    258                 # and displayed in the Stackdriver Trace tool in the
    259                 # {% dynamic print site_values.console_name %}.
    260                 # The name may be a method name or some other per-call site name.
    261                 # For the same executable and the same call point, a best practice is
    262                 # to use a consistent name, which makes it easier to correlate
    263                 # cross-trace spans.
    264             "labels": { # Collection of labels associated with the span. Label keys must be less than
    265                 # 128 bytes. Label values must be less than 16 kilobytes (10MB for
    266                 # `/stacktrace` values).
    267                 #
    268                 # Some predefined label keys exist, or you may create your own. When creating
    269                 # your own, we recommend the following formats:
    270                 #
    271                 # * `/category/product/key` for agents of well-known products (e.g.
    272                 #   `/db/mongodb/read_size`).
    273                 # * `short_host/path/key` for domain-specific keys (e.g.
    274                 #   `foo.com/myproduct/bar`)
    275                 #
    276                 # Predefined labels include:
    277                 #
    278                 # *   `/agent`
    279                 # *   `/component`
    280                 # *   `/error/message`
    281                 # *   `/error/name`
    282                 # *   `/http/client_city`
    283                 # *   `/http/client_country`
    284                 # *   `/http/client_protocol`
    285                 # *   `/http/client_region`
    286                 # *   `/http/host`
    287                 # *   `/http/method`
    288                 # *   `/http/redirected_url`
    289                 # *   `/http/request/size`
    290                 # *   `/http/response/size`
    291                 # *   `/http/status_code`
    292                 # *   `/http/url`
    293                 # *   `/http/user_agent`
    294                 # *   `/pid`
    295                 # *   `/stacktrace`
    296                 # *   `/tid`
    297               "a_key": "A String",
    298             },
    299             "parentSpanId": "A String", # ID of the parent span, if any. Optional.
    300             "startTime": "A String", # Start time of the span in nanoseconds from the UNIX epoch.
    301             "spanId": "A String", # Identifier for the span. Must be a 64-bit integer other than 0 and
    302                 # unique within a trace.
    303             "endTime": "A String", # End time of the span in nanoseconds from the UNIX epoch.
    304           },
    305         ],
    306       },
    307     ],
    308   }
309
310 311
312 list_next(previous_request, previous_response) 313
Retrieves the next page of results.
    314 
    315 Args:
    316   previous_request: The request for the previous page. (required)
    317   previous_response: The response from the request for the previous page. (required)
    318 
    319 Returns:
    320   A request object that you can call 'execute()' on to request the next
    321   page. Returns None if there are no more items in the collection.
    322     
323
324 325