@maxim_mazurok/gapi.client.cloudtrace-v1 0.0.20231102 → 0.0.20231130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +180 -284
- package/package.json +6 -6
- package/readme.md +22 -19
- package/tests.ts +0 -80
- package/tsconfig.json +0 -18
- package/tslint.json +0 -6
package/index.d.ts
CHANGED
|
@@ -9,294 +9,190 @@
|
|
|
9
9
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
10
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
11
|
// Generated from: https://cloudtrace.googleapis.com/$discovery/rest?version=v1
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20231130
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
16
16
|
declare namespace gapi.client {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
/** Load Cloud Trace API v1 */
|
|
18
|
+
function load(
|
|
19
|
+
urlOrObject: 'https://cloudtrace.googleapis.com/$discovery/rest?version=v1'
|
|
20
|
+
): Promise<void>;
|
|
21
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
22
|
+
function load(name: 'cloudtrace', version: 'v1'): Promise<void>;
|
|
23
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
24
|
+
function load(name: 'cloudtrace', version: 'v1', callback: () => any): void;
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using `RPC_CLIENT` and `RPC_SERVER` to identify
|
|
61
|
-
* queueing latency associated with the span.
|
|
62
|
-
*/
|
|
63
|
-
kind?:
|
|
64
|
-
string;
|
|
65
|
-
/**
|
|
66
|
-
* Collection of labels associated with the span. Label keys must be less than 128 bytes. Label values must be less than 16 kilobytes (10MB for `/stacktrace` values). Some predefined
|
|
67
|
-
* label keys exist, or you may create your own. When creating your own, we recommend the following formats: * `/category/product/key` for agents of well-known products (e.g.
|
|
68
|
-
* `/db/mongodb/read_size`). * `short_host/path/key` for domain-specific keys (e.g. `foo.com/myproduct/bar`) Predefined labels include: * `/agent` * `/component` * `/error/message` *
|
|
69
|
-
* `/error/name` * `/http/client_city` * `/http/client_country` * `/http/client_protocol` * `/http/client_region` * `/http/host` * `/http/method` * `/http/path` *
|
|
70
|
-
* `/http/redirected_url` * `/http/request/size` * `/http/response/size` * `/http/route` * `/http/status_code` * `/http/url` * `/http/user_agent` * `/pid` * `/stacktrace` * `/tid`
|
|
71
|
-
*/
|
|
72
|
-
labels?:
|
|
73
|
-
{ [P in string]: string };
|
|
74
|
-
/**
|
|
75
|
-
* Name of the span. Must be less than 128 bytes. The span name is sanitized and displayed in the Trace tool in the Google Cloud Platform Console. The name may be a method name or some
|
|
76
|
-
* other per-call site name. For the same executable and the same call point, a best practice is to use a consistent name, which makes it easier to correlate cross-trace spans.
|
|
77
|
-
*/
|
|
78
|
-
name?:
|
|
79
|
-
string;
|
|
80
|
-
/** Optional. ID of the parent span, if any. */
|
|
81
|
-
parentSpanId?:
|
|
82
|
-
string;
|
|
83
|
-
/** Identifier for the span. Must be a 64-bit integer other than 0 and unique within a trace. For example, `2205310701640571284`. */
|
|
84
|
-
spanId?:
|
|
85
|
-
string;
|
|
86
|
-
/** Start time of the span in nanoseconds from the UNIX epoch. */
|
|
87
|
-
startTime?:
|
|
88
|
-
string;
|
|
89
|
-
}
|
|
90
|
-
interface TracesResource {
|
|
91
|
-
/** Gets a single trace by its ID. */
|
|
92
|
-
get(request?: {
|
|
93
|
-
/** V1 error format. */
|
|
94
|
-
"$.xgafv"?:
|
|
95
|
-
string;
|
|
96
|
-
/** OAuth access token. */
|
|
97
|
-
access_token?:
|
|
98
|
-
string;
|
|
99
|
-
/** Data format for response. */
|
|
100
|
-
alt?:
|
|
101
|
-
string;
|
|
102
|
-
/** JSONP */
|
|
103
|
-
callback?:
|
|
104
|
-
string;
|
|
105
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
106
|
-
fields?:
|
|
107
|
-
string;
|
|
108
|
-
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
109
|
-
key?:
|
|
110
|
-
string;
|
|
111
|
-
/** OAuth 2.0 token for the current user. */
|
|
112
|
-
oauth_token?:
|
|
113
|
-
string;
|
|
114
|
-
/** Returns response with indentations and line breaks. */
|
|
115
|
-
prettyPrint?:
|
|
116
|
-
boolean;
|
|
117
|
-
/** Required. ID of the Cloud project where the trace data is stored. */
|
|
118
|
-
projectId:
|
|
119
|
-
string;
|
|
120
|
-
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
121
|
-
quotaUser?:
|
|
122
|
-
string;
|
|
123
|
-
/** Required. ID of the trace to return. */
|
|
124
|
-
traceId:
|
|
125
|
-
string;
|
|
126
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
127
|
-
upload_protocol?:
|
|
128
|
-
string;
|
|
129
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
130
|
-
uploadType?:
|
|
131
|
-
string;
|
|
132
|
-
}): Request<Trace>;
|
|
133
|
-
/** Returns a list of traces that match the specified filter conditions. */
|
|
134
|
-
list(request?: {
|
|
135
|
-
/** V1 error format. */
|
|
136
|
-
"$.xgafv"?:
|
|
137
|
-
string;
|
|
138
|
-
/** OAuth access token. */
|
|
139
|
-
access_token?:
|
|
140
|
-
string;
|
|
141
|
-
/** Data format for response. */
|
|
142
|
-
alt?:
|
|
143
|
-
string;
|
|
144
|
-
/** JSONP */
|
|
145
|
-
callback?:
|
|
146
|
-
string;
|
|
147
|
-
/** End of the time interval (inclusive) during which the trace data was collected from the application. */
|
|
148
|
-
endTime?:
|
|
149
|
-
string;
|
|
150
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
151
|
-
fields?:
|
|
152
|
-
string;
|
|
153
|
-
/**
|
|
154
|
-
* Optional. A filter against labels for the request. By default, searches use prefix matching. To specify exact match, prepend a plus symbol (`+`) to the search term. Multiple
|
|
155
|
-
* terms are ANDed. Syntax: * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root span starts with `NAME_PREFIX`. * `+root:NAME` or `+NAME`: Return traces where any
|
|
156
|
-
* root span's name is exactly `NAME`. * `span:NAME_PREFIX`: Return traces where any span starts with `NAME_PREFIX`. * `+span:NAME`: Return traces where any span's name is exactly
|
|
157
|
-
* `NAME`. * `latency:DURATION`: Return traces whose overall latency is greater or equal to than `DURATION`. Accepted units are nanoseconds (`ns`), milliseconds (`ms`), and seconds
|
|
158
|
-
* (`s`). Default is `ms`. For example, `latency:24ms` returns traces whose overall latency is greater than or equal to 24 milliseconds. * `label:LABEL_KEY`: Return all traces
|
|
159
|
-
* containing the specified label key (exact match, case-sensitive) regardless of the key:value pair's value (including empty values). * `LABEL_KEY:VALUE_PREFIX`: Return all traces
|
|
160
|
-
* containing the specified label key (exact match, case-sensitive) whose value starts with `VALUE_PREFIX`. Both a key and a value must be specified. * `+LABEL_KEY:VALUE`: Return
|
|
161
|
-
* all traces containing a key:value pair exactly matching the specified text. Both a key and a value must be specified. * `method:VALUE`: Equivalent to `/http/method:VALUE`. *
|
|
162
|
-
* `url:VALUE`: Equivalent to `/http/url:VALUE`.
|
|
163
|
-
*/
|
|
164
|
-
filter?:
|
|
165
|
-
string;
|
|
166
|
-
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
167
|
-
key?:
|
|
168
|
-
string;
|
|
169
|
-
/** OAuth 2.0 token for the current user. */
|
|
170
|
-
oauth_token?:
|
|
171
|
-
string;
|
|
172
|
-
/**
|
|
173
|
-
* Optional. Field used to sort the returned traces. Can be one of the following: * `trace_id` * `name` (`name` field of root span in the trace) * `duration` (difference between
|
|
174
|
-
* `end_time` and `start_time` fields of the root span) * `start` (`start_time` field of the root span) Descending order can be specified by appending `desc` to the sort field (for
|
|
175
|
-
* example, `name desc`). Only one sort field is permitted.
|
|
176
|
-
*/
|
|
177
|
-
orderBy?:
|
|
178
|
-
string;
|
|
179
|
-
/**
|
|
180
|
-
* Optional. Maximum number of traces to return. If not specified or <= 0, the implementation selects a reasonable value. The implementation may return fewer traces than the
|
|
181
|
-
* requested page size.
|
|
182
|
-
*/
|
|
183
|
-
pageSize?:
|
|
184
|
-
number;
|
|
185
|
-
/** Token identifying the page of results to return. If provided, use the value of the `next_page_token` field from a previous request. */
|
|
186
|
-
pageToken?:
|
|
187
|
-
string;
|
|
188
|
-
/** Returns response with indentations and line breaks. */
|
|
189
|
-
prettyPrint?:
|
|
190
|
-
boolean;
|
|
191
|
-
/** Required. ID of the Cloud project where the trace data is stored. */
|
|
192
|
-
projectId:
|
|
193
|
-
string;
|
|
194
|
-
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
195
|
-
quotaUser?:
|
|
196
|
-
string;
|
|
197
|
-
/** Start of the time interval (inclusive) during which the trace data was collected from the application. */
|
|
198
|
-
startTime?:
|
|
199
|
-
string;
|
|
200
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
201
|
-
upload_protocol?:
|
|
202
|
-
string;
|
|
203
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
204
|
-
uploadType?:
|
|
205
|
-
string;
|
|
206
|
-
/** Optional. Type of data returned for traces in the list. Default is `MINIMAL`. */
|
|
207
|
-
view?:
|
|
208
|
-
string;
|
|
209
|
-
}): Request<ListTracesResponse>;
|
|
210
|
-
}
|
|
211
|
-
interface ProjectsResource {
|
|
212
|
-
/**
|
|
213
|
-
* Sends new traces to Cloud Trace or updates existing traces. If the ID of a trace that you send matches that of an existing trace, any fields in the existing trace and its spans are
|
|
214
|
-
* overwritten by the provided values, and any new fields provided are merged with the existing trace data. If the ID does not match, a new trace is created.
|
|
215
|
-
*/
|
|
216
|
-
patchTraces(request: {
|
|
217
|
-
/** V1 error format. */
|
|
218
|
-
"$.xgafv"?:
|
|
219
|
-
string;
|
|
220
|
-
/** OAuth access token. */
|
|
221
|
-
access_token?:
|
|
222
|
-
string;
|
|
223
|
-
/** Data format for response. */
|
|
224
|
-
alt?:
|
|
225
|
-
string;
|
|
226
|
-
/** JSONP */
|
|
227
|
-
callback?:
|
|
228
|
-
string;
|
|
229
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
230
|
-
fields?:
|
|
231
|
-
string;
|
|
232
|
-
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
233
|
-
key?:
|
|
234
|
-
string;
|
|
235
|
-
/** OAuth 2.0 token for the current user. */
|
|
236
|
-
oauth_token?:
|
|
237
|
-
string;
|
|
238
|
-
/** Returns response with indentations and line breaks. */
|
|
239
|
-
prettyPrint?:
|
|
240
|
-
boolean;
|
|
241
|
-
/** Required. ID of the Cloud project where the trace data is stored. */
|
|
242
|
-
projectId:
|
|
243
|
-
string;
|
|
244
|
-
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
245
|
-
quotaUser?:
|
|
246
|
-
string;
|
|
247
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
248
|
-
upload_protocol?:
|
|
249
|
-
string;
|
|
250
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
251
|
-
uploadType?:
|
|
252
|
-
string;
|
|
253
|
-
/** Request body */
|
|
254
|
-
resource:
|
|
255
|
-
Traces;
|
|
256
|
-
}): Request<{}>;
|
|
257
|
-
patchTraces(request: {
|
|
258
|
-
/** V1 error format. */
|
|
259
|
-
"$.xgafv"?:
|
|
260
|
-
string;
|
|
261
|
-
/** OAuth access token. */
|
|
262
|
-
access_token?:
|
|
263
|
-
string;
|
|
264
|
-
/** Data format for response. */
|
|
265
|
-
alt?:
|
|
266
|
-
string;
|
|
267
|
-
/** JSONP */
|
|
268
|
-
callback?:
|
|
269
|
-
string;
|
|
270
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
271
|
-
fields?:
|
|
272
|
-
string;
|
|
273
|
-
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
274
|
-
key?:
|
|
275
|
-
string;
|
|
276
|
-
/** OAuth 2.0 token for the current user. */
|
|
277
|
-
oauth_token?:
|
|
278
|
-
string;
|
|
279
|
-
/** Returns response with indentations and line breaks. */
|
|
280
|
-
prettyPrint?:
|
|
281
|
-
boolean;
|
|
282
|
-
/** Required. ID of the Cloud project where the trace data is stored. */
|
|
283
|
-
projectId:
|
|
284
|
-
string;
|
|
285
|
-
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
286
|
-
quotaUser?:
|
|
287
|
-
string;
|
|
288
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
289
|
-
upload_protocol?:
|
|
290
|
-
string;
|
|
291
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
292
|
-
uploadType?:
|
|
293
|
-
string;
|
|
294
|
-
},
|
|
295
|
-
body: Traces): Request<{}>;
|
|
296
|
-
traces:
|
|
297
|
-
TracesResource;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
const projects: ProjectsResource;
|
|
26
|
+
namespace cloudtrace {
|
|
27
|
+
interface Empty {}
|
|
28
|
+
interface ListTracesResponse {
|
|
29
|
+
/** If defined, indicates that there are more traces that match the request and that this value should be passed to the next request to continue retrieving additional traces. */
|
|
30
|
+
nextPageToken?: string;
|
|
31
|
+
/** List of trace records as specified by the view parameter. */
|
|
32
|
+
traces?: Trace[];
|
|
33
|
+
}
|
|
34
|
+
interface Trace {
|
|
35
|
+
/** Project ID of the Cloud project where the trace data is stored. */
|
|
36
|
+
projectId?: string;
|
|
37
|
+
/** Collection of spans in the trace. */
|
|
38
|
+
spans?: TraceSpan[];
|
|
39
|
+
/** Globally unique identifier for the trace. This identifier is a 128-bit numeric value formatted as a 32-byte hex string. For example, `382d4f4c6b7bb2f4a972559d9085001d`. The numeric value should not be zero. */
|
|
40
|
+
traceId?: string;
|
|
41
|
+
}
|
|
42
|
+
interface Traces {
|
|
43
|
+
/** List of traces. */
|
|
44
|
+
traces?: Trace[];
|
|
45
|
+
}
|
|
46
|
+
interface TraceSpan {
|
|
47
|
+
/** End time of the span in nanoseconds from the UNIX epoch. */
|
|
48
|
+
endTime?: string;
|
|
49
|
+
/** Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using `RPC_CLIENT` and `RPC_SERVER` to identify queueing latency associated with the span. */
|
|
50
|
+
kind?: string;
|
|
51
|
+
/** Collection of labels associated with the span. Label keys must be less than 128 bytes. Label values must be less than 16 kilobytes (10MB for `/stacktrace` values). Some predefined label keys exist, or you may create your own. When creating your own, we recommend the following formats: * `/category/product/key` for agents of well-known products (e.g. `/db/mongodb/read_size`). * `short_host/path/key` for domain-specific keys (e.g. `foo.com/myproduct/bar`) Predefined labels include: * `/agent` * `/component` * `/error/message` * `/error/name` * `/http/client_city` * `/http/client_country` * `/http/client_protocol` * `/http/client_region` * `/http/host` * `/http/method` * `/http/path` * `/http/redirected_url` * `/http/request/size` * `/http/response/size` * `/http/route` * `/http/status_code` * `/http/url` * `/http/user_agent` * `/pid` * `/stacktrace` * `/tid` */
|
|
52
|
+
labels?: {[P in string]: string};
|
|
53
|
+
/** Name of the span. Must be less than 128 bytes. The span name is sanitized and displayed in the Trace tool in the Google Cloud Platform Console. The name may be a method name or some other per-call site name. For the same executable and the same call point, a best practice is to use a consistent name, which makes it easier to correlate cross-trace spans. */
|
|
54
|
+
name?: string;
|
|
55
|
+
/** Optional. ID of the parent span, if any. */
|
|
56
|
+
parentSpanId?: string;
|
|
57
|
+
/** Identifier for the span. Must be a 64-bit integer other than 0 and unique within a trace. For example, `2205310701640571284`. */
|
|
58
|
+
spanId?: string;
|
|
59
|
+
/** Start time of the span in nanoseconds from the UNIX epoch. */
|
|
60
|
+
startTime?: string;
|
|
301
61
|
}
|
|
62
|
+
interface TracesResource {
|
|
63
|
+
/** Gets a single trace by its ID. */
|
|
64
|
+
get(request?: {
|
|
65
|
+
/** V1 error format. */
|
|
66
|
+
'$.xgafv'?: string;
|
|
67
|
+
/** OAuth access token. */
|
|
68
|
+
access_token?: string;
|
|
69
|
+
/** Data format for response. */
|
|
70
|
+
alt?: string;
|
|
71
|
+
/** JSONP */
|
|
72
|
+
callback?: string;
|
|
73
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
74
|
+
fields?: string;
|
|
75
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
76
|
+
key?: string;
|
|
77
|
+
/** OAuth 2.0 token for the current user. */
|
|
78
|
+
oauth_token?: string;
|
|
79
|
+
/** Returns response with indentations and line breaks. */
|
|
80
|
+
prettyPrint?: boolean;
|
|
81
|
+
/** Required. ID of the Cloud project where the trace data is stored. */
|
|
82
|
+
projectId: string;
|
|
83
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
84
|
+
quotaUser?: string;
|
|
85
|
+
/** Required. ID of the trace to return. */
|
|
86
|
+
traceId: string;
|
|
87
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
88
|
+
upload_protocol?: string;
|
|
89
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
90
|
+
uploadType?: string;
|
|
91
|
+
}): Request<Trace>;
|
|
92
|
+
/** Returns a list of traces that match the specified filter conditions. */
|
|
93
|
+
list(request?: {
|
|
94
|
+
/** V1 error format. */
|
|
95
|
+
'$.xgafv'?: string;
|
|
96
|
+
/** OAuth access token. */
|
|
97
|
+
access_token?: string;
|
|
98
|
+
/** Data format for response. */
|
|
99
|
+
alt?: string;
|
|
100
|
+
/** JSONP */
|
|
101
|
+
callback?: string;
|
|
102
|
+
/** End of the time interval (inclusive) during which the trace data was collected from the application. */
|
|
103
|
+
endTime?: string;
|
|
104
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
105
|
+
fields?: string;
|
|
106
|
+
/** Optional. A filter against labels for the request. By default, searches use prefix matching. To specify exact match, prepend a plus symbol (`+`) to the search term. Multiple terms are ANDed. Syntax: * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root span starts with `NAME_PREFIX`. * `+root:NAME` or `+NAME`: Return traces where any root span's name is exactly `NAME`. * `span:NAME_PREFIX`: Return traces where any span starts with `NAME_PREFIX`. * `+span:NAME`: Return traces where any span's name is exactly `NAME`. * `latency:DURATION`: Return traces whose overall latency is greater or equal to than `DURATION`. Accepted units are nanoseconds (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For example, `latency:24ms` returns traces whose overall latency is greater than or equal to 24 milliseconds. * `label:LABEL_KEY`: Return all traces containing the specified label key (exact match, case-sensitive) regardless of the key:value pair's value (including empty values). * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified label key (exact match, case-sensitive) whose value starts with `VALUE_PREFIX`. Both a key and a value must be specified. * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair exactly matching the specified text. Both a key and a value must be specified. * `method:VALUE`: Equivalent to `/http/method:VALUE`. * `url:VALUE`: Equivalent to `/http/url:VALUE`. */
|
|
107
|
+
filter?: string;
|
|
108
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
109
|
+
key?: string;
|
|
110
|
+
/** OAuth 2.0 token for the current user. */
|
|
111
|
+
oauth_token?: string;
|
|
112
|
+
/** Optional. Field used to sort the returned traces. Can be one of the following: * `trace_id` * `name` (`name` field of root span in the trace) * `duration` (difference between `end_time` and `start_time` fields of the root span) * `start` (`start_time` field of the root span) Descending order can be specified by appending `desc` to the sort field (for example, `name desc`). Only one sort field is permitted. */
|
|
113
|
+
orderBy?: string;
|
|
114
|
+
/** Optional. Maximum number of traces to return. If not specified or <= 0, the implementation selects a reasonable value. The implementation may return fewer traces than the requested page size. */
|
|
115
|
+
pageSize?: number;
|
|
116
|
+
/** Token identifying the page of results to return. If provided, use the value of the `next_page_token` field from a previous request. */
|
|
117
|
+
pageToken?: string;
|
|
118
|
+
/** Returns response with indentations and line breaks. */
|
|
119
|
+
prettyPrint?: boolean;
|
|
120
|
+
/** Required. ID of the Cloud project where the trace data is stored. */
|
|
121
|
+
projectId: string;
|
|
122
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
123
|
+
quotaUser?: string;
|
|
124
|
+
/** Start of the time interval (inclusive) during which the trace data was collected from the application. */
|
|
125
|
+
startTime?: string;
|
|
126
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
127
|
+
upload_protocol?: string;
|
|
128
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
129
|
+
uploadType?: string;
|
|
130
|
+
/** Optional. Type of data returned for traces in the list. Default is `MINIMAL`. */
|
|
131
|
+
view?: string;
|
|
132
|
+
}): Request<ListTracesResponse>;
|
|
133
|
+
}
|
|
134
|
+
interface ProjectsResource {
|
|
135
|
+
/** Sends new traces to Cloud Trace or updates existing traces. If the ID of a trace that you send matches that of an existing trace, any fields in the existing trace and its spans are overwritten by the provided values, and any new fields provided are merged with the existing trace data. If the ID does not match, a new trace is created. */
|
|
136
|
+
patchTraces(request: {
|
|
137
|
+
/** V1 error format. */
|
|
138
|
+
'$.xgafv'?: string;
|
|
139
|
+
/** OAuth access token. */
|
|
140
|
+
access_token?: string;
|
|
141
|
+
/** Data format for response. */
|
|
142
|
+
alt?: string;
|
|
143
|
+
/** JSONP */
|
|
144
|
+
callback?: string;
|
|
145
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
146
|
+
fields?: string;
|
|
147
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
148
|
+
key?: string;
|
|
149
|
+
/** OAuth 2.0 token for the current user. */
|
|
150
|
+
oauth_token?: string;
|
|
151
|
+
/** Returns response with indentations and line breaks. */
|
|
152
|
+
prettyPrint?: boolean;
|
|
153
|
+
/** Required. ID of the Cloud project where the trace data is stored. */
|
|
154
|
+
projectId: string;
|
|
155
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
156
|
+
quotaUser?: string;
|
|
157
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
158
|
+
upload_protocol?: string;
|
|
159
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
160
|
+
uploadType?: string;
|
|
161
|
+
/** Request body */
|
|
162
|
+
resource: Traces;
|
|
163
|
+
}): Request<{}>;
|
|
164
|
+
patchTraces(
|
|
165
|
+
request: {
|
|
166
|
+
/** V1 error format. */
|
|
167
|
+
'$.xgafv'?: string;
|
|
168
|
+
/** OAuth access token. */
|
|
169
|
+
access_token?: string;
|
|
170
|
+
/** Data format for response. */
|
|
171
|
+
alt?: string;
|
|
172
|
+
/** JSONP */
|
|
173
|
+
callback?: string;
|
|
174
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
175
|
+
fields?: string;
|
|
176
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
177
|
+
key?: string;
|
|
178
|
+
/** OAuth 2.0 token for the current user. */
|
|
179
|
+
oauth_token?: string;
|
|
180
|
+
/** Returns response with indentations and line breaks. */
|
|
181
|
+
prettyPrint?: boolean;
|
|
182
|
+
/** Required. ID of the Cloud project where the trace data is stored. */
|
|
183
|
+
projectId: string;
|
|
184
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
185
|
+
quotaUser?: string;
|
|
186
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
187
|
+
upload_protocol?: string;
|
|
188
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
189
|
+
uploadType?: string;
|
|
190
|
+
},
|
|
191
|
+
body: Traces
|
|
192
|
+
): Request<{}>;
|
|
193
|
+
traces: TracesResource;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const projects: ProjectsResource;
|
|
197
|
+
}
|
|
302
198
|
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maxim_mazurok/gapi.client.cloudtrace-v1",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20231130",
|
|
4
4
|
"description": "TypeScript typings for Cloud Trace API v1",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
|
|
8
|
+
},
|
|
5
9
|
"license": "MIT",
|
|
6
10
|
"author": {
|
|
7
|
-
"email": "maxim@mazurok.com",
|
|
8
11
|
"name": "Maxim Mazurok",
|
|
12
|
+
"email": "maxim@mazurok.com",
|
|
9
13
|
"url": "https://maxim.mazurok.com"
|
|
10
14
|
},
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
|
|
14
|
-
},
|
|
15
15
|
"types": "index.d.ts",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@types/gapi.client": "*",
|
package/readme.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# TypeScript typings for Cloud Trace API v1
|
|
2
2
|
|
|
3
|
-
Sends application trace data to Cloud Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Cloud Trace API directly. If you are looking to instrument your application for Cloud Trace, we recommend using OpenTelemetry.
|
|
3
|
+
Sends application trace data to Cloud Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Cloud Trace API directly. If you are looking to instrument your application for Cloud Trace, we recommend using OpenTelemetry.
|
|
4
4
|
For detailed description please check [documentation](https://cloud.google.com/trace).
|
|
5
5
|
|
|
6
6
|
## Installing
|
|
@@ -25,10 +25,13 @@ gapi.load('client', () => {
|
|
|
25
25
|
Then load api client wrapper:
|
|
26
26
|
|
|
27
27
|
```typescript
|
|
28
|
-
gapi.client.load(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
gapi.client.load(
|
|
29
|
+
'https://cloudtrace.googleapis.com/$discovery/rest?version=v1',
|
|
30
|
+
() => {
|
|
31
|
+
// now we can use:
|
|
32
|
+
// gapi.client.cloudtrace
|
|
33
|
+
}
|
|
34
|
+
);
|
|
32
35
|
```
|
|
33
36
|
|
|
34
37
|
```typescript
|
|
@@ -45,35 +48,35 @@ Don't forget to authenticate your client before sending any request to resources
|
|
|
45
48
|
// declare client_id registered in Google Developers Console
|
|
46
49
|
var client_id = '',
|
|
47
50
|
scope = [
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
|
52
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
50
53
|
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
// Write Trace data for a project or application
|
|
55
|
+
'https://www.googleapis.com/auth/trace.append',
|
|
53
56
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
// Read Trace data for a project or application
|
|
58
|
+
'https://www.googleapis.com/auth/trace.readonly',
|
|
59
|
+
],
|
|
60
|
+
immediate = true;
|
|
58
61
|
// ...
|
|
59
62
|
|
|
60
63
|
gapi.auth.authorize(
|
|
61
|
-
{
|
|
64
|
+
{client_id: client_id, scope: scope, immediate: immediate},
|
|
62
65
|
authResult => {
|
|
63
66
|
if (authResult && !authResult.error) {
|
|
64
|
-
|
|
67
|
+
/* handle successful authorization */
|
|
65
68
|
} else {
|
|
66
|
-
|
|
69
|
+
/* handle authorization error */
|
|
67
70
|
}
|
|
68
|
-
}
|
|
71
|
+
}
|
|
72
|
+
);
|
|
69
73
|
```
|
|
70
74
|
|
|
71
75
|
After that you can use Cloud Trace API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
72
76
|
|
|
73
77
|
```typescript
|
|
74
|
-
|
|
75
78
|
/*
|
|
76
79
|
Sends new traces to Cloud Trace or updates existing traces. If the ID of a trace that you send matches that of an existing trace, any fields in the existing trace and its spans are overwritten by the provided values, and any new fields provided are merged with the existing trace data. If the ID does not match, a new trace is created.
|
|
77
80
|
*/
|
|
78
|
-
await gapi.client.cloudtrace.projects.patchTraces({
|
|
81
|
+
await gapi.client.cloudtrace.projects.patchTraces({projectId: 'projectId'});
|
|
79
82
|
```
|
package/tests.ts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/* This is stub file for gapi.client.cloudtrace-v1 definition tests */
|
|
2
|
-
// IMPORTANT
|
|
3
|
-
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
4
|
-
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
5
|
-
|
|
6
|
-
// Revision: 20231102
|
|
7
|
-
|
|
8
|
-
gapi.load('client', async () => {
|
|
9
|
-
/** now we can use gapi.client */
|
|
10
|
-
|
|
11
|
-
await gapi.client.load('https://cloudtrace.googleapis.com/$discovery/rest?version=v1');
|
|
12
|
-
/** now we can use gapi.client.cloudtrace */
|
|
13
|
-
|
|
14
|
-
/** don't forget to authenticate your client before sending any request to resources: */
|
|
15
|
-
/** declare client_id registered in Google Developers Console */
|
|
16
|
-
const client_id = '<<PUT YOUR CLIENT ID HERE>>';
|
|
17
|
-
const scope = [
|
|
18
|
-
/** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
|
|
19
|
-
'https://www.googleapis.com/auth/cloud-platform',
|
|
20
|
-
/** Write Trace data for a project or application */
|
|
21
|
-
'https://www.googleapis.com/auth/trace.append',
|
|
22
|
-
/** Read Trace data for a project or application */
|
|
23
|
-
'https://www.googleapis.com/auth/trace.readonly',
|
|
24
|
-
];
|
|
25
|
-
const immediate = false;
|
|
26
|
-
gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
|
|
27
|
-
if (authResult && !authResult.error) {
|
|
28
|
-
/** handle successful authorization */
|
|
29
|
-
run();
|
|
30
|
-
} else {
|
|
31
|
-
/** handle authorization error */
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
async function run() {
|
|
36
|
-
/**
|
|
37
|
-
* Sends new traces to Cloud Trace or updates existing traces. If the ID of a trace that you send matches that of an existing trace, any fields in the existing trace and its spans are
|
|
38
|
-
* overwritten by the provided values, and any new fields provided are merged with the existing trace data. If the ID does not match, a new trace is created.
|
|
39
|
-
*/
|
|
40
|
-
await gapi.client.cloudtrace.projects.patchTraces({
|
|
41
|
-
projectId: "Test string",
|
|
42
|
-
}, {
|
|
43
|
-
traces: [
|
|
44
|
-
{
|
|
45
|
-
projectId: "Test string",
|
|
46
|
-
spans: [
|
|
47
|
-
{
|
|
48
|
-
endTime: "Test string",
|
|
49
|
-
kind: "Test string",
|
|
50
|
-
labels: {
|
|
51
|
-
A: "Test string"
|
|
52
|
-
},
|
|
53
|
-
name: "Test string",
|
|
54
|
-
parentSpanId: "Test string",
|
|
55
|
-
spanId: "Test string",
|
|
56
|
-
startTime: "Test string",
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
traceId: "Test string",
|
|
60
|
-
}
|
|
61
|
-
],
|
|
62
|
-
});
|
|
63
|
-
/** Gets a single trace by its ID. */
|
|
64
|
-
await gapi.client.cloudtrace.projects.traces.get({
|
|
65
|
-
projectId: "Test string",
|
|
66
|
-
traceId: "Test string",
|
|
67
|
-
});
|
|
68
|
-
/** Returns a list of traces that match the specified filter conditions. */
|
|
69
|
-
await gapi.client.cloudtrace.projects.traces.list({
|
|
70
|
-
endTime: "Test string",
|
|
71
|
-
filter: "Test string",
|
|
72
|
-
orderBy: "Test string",
|
|
73
|
-
pageSize: 42,
|
|
74
|
-
pageToken: "Test string",
|
|
75
|
-
projectId: "Test string",
|
|
76
|
-
startTime: "Test string",
|
|
77
|
-
view: "Test string",
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
});
|
package/tsconfig.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"lib": ["es6", "dom"],
|
|
5
|
-
"noImplicitAny": true,
|
|
6
|
-
"noImplicitThis": true,
|
|
7
|
-
"strictNullChecks": true,
|
|
8
|
-
"baseUrl": "../",
|
|
9
|
-
"typeRoots": [
|
|
10
|
-
"../"
|
|
11
|
-
],
|
|
12
|
-
"types": [],
|
|
13
|
-
"noEmit": true,
|
|
14
|
-
"forceConsistentCasingInFileNames": true,
|
|
15
|
-
"strictFunctionTypes": true
|
|
16
|
-
},
|
|
17
|
-
"files": ["index.d.ts", "tests.ts"]
|
|
18
|
-
}
|