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></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="cloudtrace_v1.projects.traces.html">traces()</a></code> |
| 79 | </p> |
| 80 | <p class="firstline">Returns the traces Resource.</p> |
| 81 | |
| 82 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 83 | <code><a href="#patchTraces">patchTraces(projectId, body=None, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 84 | <p class="firstline">Sends new traces to Stackdriver Trace or updates existing traces. If the ID</p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 85 | <h3>Method Details</h3> |
| 86 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 87 | <code class="details" id="patchTraces">patchTraces(projectId, body=None, x__xgafv=None)</code> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 88 | <pre>Sends new traces to Stackdriver Trace or updates existing traces. If the ID |
| 89 | of a trace that you send matches that of an existing trace, any fields |
| 90 | in the existing trace and its spans are overwritten by the provided values, |
| 91 | and any new fields provided are merged with the existing trace data. If the |
| 92 | ID does not match, a new trace is created. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | In this case, writing traces is not considered an active developer |
| 94 | method since traces are machine generated. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 95 | |
| 96 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 97 | projectId: string, Required. ID of the Cloud project where the trace data is stored. (required) |
| 98 | body: object, The request body. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 99 | The object takes the form of: |
| 100 | |
| 101 | { # List of new or updated traces. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 102 | "traces": [ # List of traces. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 103 | { # A trace describes how long it takes for an application to perform an |
| 104 | # operation. It consists of a set of spans, each of which represent a single |
| 105 | # timed event within the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 106 | "projectId": "A String", # Project ID of the Cloud project where the trace data is stored. |
| 107 | "spans": [ # Collection of spans in the trace. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 108 | { # A span represents a single timed event within a trace. Spans can be nested |
| 109 | # and form a trace tree. Often, a trace contains a root span that describes the |
| 110 | # end-to-end latency of an operation and, optionally, one or more subspans for |
| 111 | # its suboperations. Spans do not need to be contiguous. There may be gaps |
| 112 | # between spans in a trace. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 113 | "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] | 114 | # 128 bytes. Label values must be less than 16 kilobytes (10MB for |
| 115 | # `/stacktrace` values). |
| 116 | # |
| 117 | # Some predefined label keys exist, or you may create your own. When creating |
| 118 | # your own, we recommend the following formats: |
| 119 | # |
| 120 | # * `/category/product/key` for agents of well-known products (e.g. |
| 121 | # `/db/mongodb/read_size`). |
| 122 | # * `short_host/path/key` for domain-specific keys (e.g. |
| 123 | # `foo.com/myproduct/bar`) |
| 124 | # |
| 125 | # Predefined labels include: |
| 126 | # |
| 127 | # * `/agent` |
| 128 | # * `/component` |
| 129 | # * `/error/message` |
| 130 | # * `/error/name` |
| 131 | # * `/http/client_city` |
| 132 | # * `/http/client_country` |
| 133 | # * `/http/client_protocol` |
| 134 | # * `/http/client_region` |
| 135 | # * `/http/host` |
| 136 | # * `/http/method` |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 137 | # * `/http/path` |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 138 | # * `/http/redirected_url` |
| 139 | # * `/http/request/size` |
| 140 | # * `/http/response/size` |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 141 | # * `/http/route` |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 142 | # * `/http/status_code` |
| 143 | # * `/http/url` |
| 144 | # * `/http/user_agent` |
| 145 | # * `/pid` |
| 146 | # * `/stacktrace` |
| 147 | # * `/tid` |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 148 | "a_key": "A String", |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 149 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 150 | "name": "A String", # Name of the span. Must be less than 128 bytes. The span name is sanitized |
| 151 | # and displayed in the Stackdriver Trace tool in the |
| 152 | # Google Cloud Platform Console. |
| 153 | # The name may be a method name or some other per-call site name. |
| 154 | # For the same executable and the same call point, a best practice is |
| 155 | # to use a consistent name, which makes it easier to correlate |
| 156 | # cross-trace spans. |
| 157 | "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] | 158 | # unique within a trace. For example, `2205310701640571284`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 159 | "parentSpanId": "A String", # Optional. ID of the parent span, if any. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 160 | "endTime": "A String", # End time of the span in nanoseconds from the UNIX epoch. |
| 161 | "startTime": "A String", # Start time of the span in nanoseconds from the UNIX epoch. |
| 162 | "kind": "A String", # Distinguishes between spans generated in a particular context. For example, |
| 163 | # two spans with the same name may be distinguished using `RPC_CLIENT` |
| 164 | # and `RPC_SERVER` to identify queueing latency associated with the span. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 165 | }, |
| 166 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 167 | "traceId": "A String", # Globally unique identifier for the trace. This identifier is a 128-bit |
| 168 | # numeric value formatted as a 32-byte hex string. For example, |
| 169 | # `382d4f4c6b7bb2f4a972559d9085001d`. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 170 | }, |
| 171 | ], |
| 172 | } |
| 173 | |
| 174 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 175 | Allowed values |
| 176 | 1 - v1 error format |
| 177 | 2 - v2 error format |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 178 | |
| 179 | Returns: |
| 180 | An object of the form: |
| 181 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 182 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 183 | # empty messages in your APIs. A typical example is to use it as the request |
| 184 | # or the response type of an API method. For instance: |
| 185 | # |
| 186 | # service Foo { |
| 187 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 188 | # } |
| 189 | # |
| 190 | # The JSON representation for `Empty` is empty JSON object `{}`. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 191 | }</pre> |
| 192 | </div> |
| 193 | |
| 194 | </body></html> |