..
This commit is contained in:
323
backend/node_modules/googleapis/apis/cloudtrace/v1.js
generated
vendored
Normal file
323
backend/node_modules/googleapis/apis/cloudtrace/v1.js
generated
vendored
Normal file
@@ -0,0 +1,323 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Copyright 2015 Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* jshint maxlen: false */
|
||||
const apirequest_1 = require("../../lib/apirequest");
|
||||
/**
|
||||
* Stackdriver Trace API
|
||||
*
|
||||
* Send and retrieve trace data from Stackdriver Trace. Data is generated and available by default for all App Engine applications. Data from other applications can be written to Stackdriver Trace for display, reporting, and analysis.
|
||||
|
||||
*
|
||||
* @example
|
||||
* const google = require('googleapis');
|
||||
* const cloudtrace = google.cloudtrace('v1');
|
||||
*
|
||||
* @namespace cloudtrace
|
||||
* @type {Function}
|
||||
* @version v1
|
||||
* @variation v1
|
||||
* @param {object=} options Options for Cloudtrace
|
||||
*/
|
||||
function Cloudtrace(options) {
|
||||
const self = this;
|
||||
self._options = options || {};
|
||||
self.projects = {
|
||||
/**
|
||||
* cloudtrace.projects.patchTraces
|
||||
*
|
||||
* @desc Sends new traces to Stackdriver 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.
|
||||
*
|
||||
* @example
|
||||
* // BEFORE RUNNING:
|
||||
* // ---------------
|
||||
* // 1. If not already done, enable the Stackdriver Trace API
|
||||
* // and check the quota for your project at
|
||||
* // https://console.developers.google.com/apis/api/cloudtrace
|
||||
* // 2. This sample uses Application Default Credentials for authentication.
|
||||
* // If not already done, install the gcloud CLI from
|
||||
* // https://cloud.google.com/sdk and run
|
||||
* // `gcloud beta auth application-default login`.
|
||||
* // For more information, see
|
||||
* // https://developers.google.com/identity/protocols/application-default-credentials
|
||||
* // 3. Install the Node.js client library by running
|
||||
* // `npm install googleapis --save`
|
||||
*
|
||||
* var google = require('googleapis');
|
||||
* var cloudTrace = google.cloudtrace('v1');
|
||||
*
|
||||
* authorize(function(authClient) {
|
||||
* var request = {
|
||||
* // ID of the Cloud project where the trace data is stored.
|
||||
* projectId: 'my-project-id', // TODO: Update placeholder value.
|
||||
*
|
||||
* resource: {
|
||||
* // TODO: Add desired properties to the request body. Only these properties
|
||||
* // will be changed.
|
||||
* },
|
||||
*
|
||||
* auth: authClient,
|
||||
* };
|
||||
*
|
||||
* cloudTrace.projects.patchTraces(request, function(err) {
|
||||
* if (err) {
|
||||
* console.error(err);
|
||||
* return;
|
||||
* }
|
||||
* });
|
||||
* });
|
||||
*
|
||||
* function authorize(callback) {
|
||||
* google.auth.getApplicationDefault(function(err, authClient) {
|
||||
* if (err) {
|
||||
* console.error('authentication failed: ', err);
|
||||
* return;
|
||||
* }
|
||||
* if (authClient.createScopedRequired && authClient.createScopedRequired()) {
|
||||
* var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
|
||||
* authClient = authClient.createScoped(scopes);
|
||||
* }
|
||||
* callback(authClient);
|
||||
* });
|
||||
* }
|
||||
*
|
||||
* @alias cloudtrace.projects.patchTraces
|
||||
* @memberOf! cloudtrace(v1)
|
||||
*
|
||||
* @param {object} params Parameters for request
|
||||
* @param {string} params.projectId ID of the Cloud project where the trace data is stored.
|
||||
* @param {cloudtrace(v1).Traces} params.resource Request body data
|
||||
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
|
||||
* @param {callback} callback The callback that handles the response.
|
||||
* @return {object} Request object
|
||||
*/
|
||||
patchTraces: function (params, options, callback) {
|
||||
if (typeof options === 'function') {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
options || (options = {});
|
||||
const rootUrl = options.rootUrl || 'https://cloudtrace.googleapis.com/';
|
||||
const parameters = {
|
||||
options: Object.assign({
|
||||
url: (rootUrl + '/v1/projects/{projectId}/traces').replace(/([^:]\/)\/+/g, '$1'),
|
||||
method: 'PATCH'
|
||||
}, options),
|
||||
params: params,
|
||||
requiredParams: ['projectId'],
|
||||
pathParams: ['projectId'],
|
||||
context: self
|
||||
};
|
||||
return apirequest_1.default(parameters, callback);
|
||||
},
|
||||
traces: {
|
||||
/**
|
||||
* cloudtrace.projects.traces.get
|
||||
*
|
||||
* @desc Gets a single trace by its ID.
|
||||
*
|
||||
* @example
|
||||
* // BEFORE RUNNING:
|
||||
* // ---------------
|
||||
* // 1. If not already done, enable the Stackdriver Trace API
|
||||
* // and check the quota for your project at
|
||||
* // https://console.developers.google.com/apis/api/cloudtrace
|
||||
* // 2. This sample uses Application Default Credentials for authentication.
|
||||
* // If not already done, install the gcloud CLI from
|
||||
* // https://cloud.google.com/sdk and run
|
||||
* // `gcloud beta auth application-default login`.
|
||||
* // For more information, see
|
||||
* // https://developers.google.com/identity/protocols/application-default-credentials
|
||||
* // 3. Install the Node.js client library by running
|
||||
* // `npm install googleapis --save`
|
||||
*
|
||||
* var google = require('googleapis');
|
||||
* var cloudTrace = google.cloudtrace('v1');
|
||||
*
|
||||
* authorize(function(authClient) {
|
||||
* var request = {
|
||||
* // ID of the Cloud project where the trace data is stored.
|
||||
* projectId: 'my-project-id', // TODO: Update placeholder value.
|
||||
*
|
||||
* // ID of the trace to return.
|
||||
* traceId: 'my-trace-id', // TODO: Update placeholder value.
|
||||
*
|
||||
* auth: authClient,
|
||||
* };
|
||||
*
|
||||
* cloudTrace.projects.traces.get(request, function(err, response) {
|
||||
* if (err) {
|
||||
* console.error(err);
|
||||
* return;
|
||||
* }
|
||||
*
|
||||
* // TODO: Change code below to process the `response` object:
|
||||
* console.log(JSON.stringify(response, null, 2));
|
||||
* });
|
||||
* });
|
||||
*
|
||||
* function authorize(callback) {
|
||||
* google.auth.getApplicationDefault(function(err, authClient) {
|
||||
* if (err) {
|
||||
* console.error('authentication failed: ', err);
|
||||
* return;
|
||||
* }
|
||||
* if (authClient.createScopedRequired && authClient.createScopedRequired()) {
|
||||
* var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
|
||||
* authClient = authClient.createScoped(scopes);
|
||||
* }
|
||||
* callback(authClient);
|
||||
* });
|
||||
* }
|
||||
*
|
||||
* @alias cloudtrace.projects.traces.get
|
||||
* @memberOf! cloudtrace(v1)
|
||||
*
|
||||
* @param {object} params Parameters for request
|
||||
* @param {string} params.projectId ID of the Cloud project where the trace data is stored.
|
||||
* @param {string} params.traceId ID of the trace to return.
|
||||
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
|
||||
* @param {callback} callback The callback that handles the response.
|
||||
* @return {object} Request object
|
||||
*/
|
||||
get: function (params, options, callback) {
|
||||
if (typeof options === 'function') {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
options || (options = {});
|
||||
const rootUrl = options.rootUrl || 'https://cloudtrace.googleapis.com/';
|
||||
const parameters = {
|
||||
options: Object.assign({
|
||||
url: (rootUrl + '/v1/projects/{projectId}/traces/{traceId}').replace(/([^:]\/)\/+/g, '$1'),
|
||||
method: 'GET'
|
||||
}, options),
|
||||
params: params,
|
||||
requiredParams: ['projectId', 'traceId'],
|
||||
pathParams: ['projectId', 'traceId'],
|
||||
context: self
|
||||
};
|
||||
return apirequest_1.default(parameters, callback);
|
||||
},
|
||||
/**
|
||||
* cloudtrace.projects.traces.list
|
||||
*
|
||||
* @desc Returns of a list of traces that match the specified filter conditions.
|
||||
*
|
||||
* @example
|
||||
* // BEFORE RUNNING:
|
||||
* // ---------------
|
||||
* // 1. If not already done, enable the Stackdriver Trace API
|
||||
* // and check the quota for your project at
|
||||
* // https://console.developers.google.com/apis/api/cloudtrace
|
||||
* // 2. This sample uses Application Default Credentials for authentication.
|
||||
* // If not already done, install the gcloud CLI from
|
||||
* // https://cloud.google.com/sdk and run
|
||||
* // `gcloud beta auth application-default login`.
|
||||
* // For more information, see
|
||||
* // https://developers.google.com/identity/protocols/application-default-credentials
|
||||
* // 3. Install the Node.js client library by running
|
||||
* // `npm install googleapis --save`
|
||||
*
|
||||
* var google = require('googleapis');
|
||||
* var cloudTrace = google.cloudtrace('v1');
|
||||
*
|
||||
* authorize(function(authClient) {
|
||||
* var request = {
|
||||
* // ID of the Cloud project where the trace data is stored.
|
||||
* projectId: 'my-project-id', // TODO: Update placeholder value.
|
||||
*
|
||||
* auth: authClient,
|
||||
* };
|
||||
*
|
||||
* var handlePage = function(err, response) {
|
||||
* if (err) {
|
||||
* console.error(err);
|
||||
* return;
|
||||
* }
|
||||
*
|
||||
* var tracesPage = response['traces'];
|
||||
* if (!tracesPage) {
|
||||
* return;
|
||||
* }
|
||||
* for (var i = 0; i < tracesPage.length; i++) {
|
||||
* // TODO: Change code below to process each resource in `tracesPage`:
|
||||
* console.log(JSON.stringify(tracesPage[i], null, 2));
|
||||
* }
|
||||
*
|
||||
* if (response.nextPageToken) {
|
||||
* request.pageToken = response.nextPageToken;
|
||||
* cloudTrace.projects.traces.list(request, handlePage);
|
||||
* }
|
||||
* };
|
||||
*
|
||||
* cloudTrace.projects.traces.list(request, handlePage);
|
||||
* });
|
||||
*
|
||||
* function authorize(callback) {
|
||||
* google.auth.getApplicationDefault(function(err, authClient) {
|
||||
* if (err) {
|
||||
* console.error('authentication failed: ', err);
|
||||
* return;
|
||||
* }
|
||||
* if (authClient.createScopedRequired && authClient.createScopedRequired()) {
|
||||
* var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
|
||||
* authClient = authClient.createScoped(scopes);
|
||||
* }
|
||||
* callback(authClient);
|
||||
* });
|
||||
* }
|
||||
*
|
||||
* @alias cloudtrace.projects.traces.list
|
||||
* @memberOf! cloudtrace(v1)
|
||||
*
|
||||
* @param {object} params Parameters for request
|
||||
* @param {string=} params.endTime End of the time interval (inclusive) during which the trace data was collected from the application.
|
||||
* @param {string=} params.filter An optional 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`.
|
||||
* @param {string=} params.orderBy Field used to sort the returned traces. Optional. 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.
|
||||
* @param {integer=} params.pageSize 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. Optional.
|
||||
* @param {string=} params.pageToken Token identifying the page of results to return. If provided, use the value of the `next_page_token` field from a previous request. Optional.
|
||||
* @param {string} params.projectId ID of the Cloud project where the trace data is stored.
|
||||
* @param {string=} params.startTime Start of the time interval (inclusive) during which the trace data was collected from the application.
|
||||
* @param {string=} params.view Type of data returned for traces in the list. Optional. Default is `MINIMAL`.
|
||||
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
|
||||
* @param {callback} callback The callback that handles the response.
|
||||
* @return {object} Request object
|
||||
*/
|
||||
list: function (params, options, callback) {
|
||||
if (typeof options === 'function') {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
options || (options = {});
|
||||
const rootUrl = options.rootUrl || 'https://cloudtrace.googleapis.com/';
|
||||
const parameters = {
|
||||
options: Object.assign({
|
||||
url: (rootUrl + '/v1/projects/{projectId}/traces').replace(/([^:]\/)\/+/g, '$1'),
|
||||
method: 'GET'
|
||||
}, options),
|
||||
params: params,
|
||||
requiredParams: ['projectId'],
|
||||
pathParams: ['projectId'],
|
||||
context: self
|
||||
};
|
||||
return apirequest_1.default(parameters, callback);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
module.exports = Cloudtrace;
|
||||
//# sourceMappingURL=v1.js.map
|
||||
1
backend/node_modules/googleapis/apis/cloudtrace/v1.js.map
generated
vendored
Normal file
1
backend/node_modules/googleapis/apis/cloudtrace/v1.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"v1.js","sourceRoot":"","sources":["v1.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,0BAA0B;AAE1B,qDAAoD;AAEpD;;;;;;;;;;;;;;;GAeG;AACH,oBAAoB,OAAO;IACzB,MAAM,IAAI,GAAG,IAAI,CAAC;IAClB,IAAI,CAAC,QAAQ,GAAG,OAAO,IAAI,EAAE,CAAC;IAE9B,IAAI,CAAC,QAAQ,GAAG;QAEd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAmEG;QACH,WAAW,EAAE,UAAU,MAAM,EAAE,OAAO,EAAE,QAAQ;YAC9C,EAAE,CAAC,CAAC,OAAO,OA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trace/v1.ts
generated
vendored
Normal file
424
backend/node_modules/googleapis/apis/cloudtrace/v1.ts
generated
vendored
Normal file
@@ -0,0 +1,424 @@
|
||||
/**
|
||||
* Copyright 2015 Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* jshint maxlen: false */
|
||||
|
||||
import createAPIRequest from '../../lib/apirequest';
|
||||
|
||||
/**
|
||||
* Stackdriver Trace API
|
||||
*
|
||||
* Send and retrieve trace data from Stackdriver Trace. Data is generated and available by default for all App Engine applications. Data from other applications can be written to Stackdriver Trace for display, reporting, and analysis.
|
||||
|
||||
*
|
||||
* @example
|
||||
* const google = require('googleapis');
|
||||
* const cloudtrace = google.cloudtrace('v1');
|
||||
*
|
||||
* @namespace cloudtrace
|
||||
* @type {Function}
|
||||
* @version v1
|
||||
* @variation v1
|
||||
* @param {object=} options Options for Cloudtrace
|
||||
*/
|
||||
function Cloudtrace(options) { // eslint-disable-line
|
||||
const self = this;
|
||||
self._options = options || {};
|
||||
|
||||
self.projects = {
|
||||
|
||||
/**
|
||||
* cloudtrace.projects.patchTraces
|
||||
*
|
||||
* @desc Sends new traces to Stackdriver 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.
|
||||
*
|
||||
* @example
|
||||
* // BEFORE RUNNING:
|
||||
* // ---------------
|
||||
* // 1. If not already done, enable the Stackdriver Trace API
|
||||
* // and check the quota for your project at
|
||||
* // https://console.developers.google.com/apis/api/cloudtrace
|
||||
* // 2. This sample uses Application Default Credentials for authentication.
|
||||
* // If not already done, install the gcloud CLI from
|
||||
* // https://cloud.google.com/sdk and run
|
||||
* // `gcloud beta auth application-default login`.
|
||||
* // For more information, see
|
||||
* // https://developers.google.com/identity/protocols/application-default-credentials
|
||||
* // 3. Install the Node.js client library by running
|
||||
* // `npm install googleapis --save`
|
||||
*
|
||||
* var google = require('googleapis');
|
||||
* var cloudTrace = google.cloudtrace('v1');
|
||||
*
|
||||
* authorize(function(authClient) {
|
||||
* var request = {
|
||||
* // ID of the Cloud project where the trace data is stored.
|
||||
* projectId: 'my-project-id', // TODO: Update placeholder value.
|
||||
*
|
||||
* resource: {
|
||||
* // TODO: Add desired properties to the request body. Only these properties
|
||||
* // will be changed.
|
||||
* },
|
||||
*
|
||||
* auth: authClient,
|
||||
* };
|
||||
*
|
||||
* cloudTrace.projects.patchTraces(request, function(err) {
|
||||
* if (err) {
|
||||
* console.error(err);
|
||||
* return;
|
||||
* }
|
||||
* });
|
||||
* });
|
||||
*
|
||||
* function authorize(callback) {
|
||||
* google.auth.getApplicationDefault(function(err, authClient) {
|
||||
* if (err) {
|
||||
* console.error('authentication failed: ', err);
|
||||
* return;
|
||||
* }
|
||||
* if (authClient.createScopedRequired && authClient.createScopedRequired()) {
|
||||
* var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
|
||||
* authClient = authClient.createScoped(scopes);
|
||||
* }
|
||||
* callback(authClient);
|
||||
* });
|
||||
* }
|
||||
*
|
||||
* @alias cloudtrace.projects.patchTraces
|
||||
* @memberOf! cloudtrace(v1)
|
||||
*
|
||||
* @param {object} params Parameters for request
|
||||
* @param {string} params.projectId ID of the Cloud project where the trace data is stored.
|
||||
* @param {cloudtrace(v1).Traces} params.resource Request body data
|
||||
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
|
||||
* @param {callback} callback The callback that handles the response.
|
||||
* @return {object} Request object
|
||||
*/
|
||||
patchTraces: function (params, options, callback) {
|
||||
if (typeof options === 'function') {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
options || (options = {});
|
||||
|
||||
const rootUrl = options.rootUrl || 'https://cloudtrace.googleapis.com/';
|
||||
|
||||
const parameters = {
|
||||
options: Object.assign({
|
||||
url: (rootUrl + '/v1/projects/{projectId}/traces').replace(/([^:]\/)\/+/g, '$1'),
|
||||
method: 'PATCH'
|
||||
}, options),
|
||||
params: params,
|
||||
requiredParams: ['projectId'],
|
||||
pathParams: ['projectId'],
|
||||
context: self
|
||||
};
|
||||
|
||||
return createAPIRequest(parameters, callback);
|
||||
},
|
||||
traces: {
|
||||
|
||||
/**
|
||||
* cloudtrace.projects.traces.get
|
||||
*
|
||||
* @desc Gets a single trace by its ID.
|
||||
*
|
||||
* @example
|
||||
* // BEFORE RUNNING:
|
||||
* // ---------------
|
||||
* // 1. If not already done, enable the Stackdriver Trace API
|
||||
* // and check the quota for your project at
|
||||
* // https://console.developers.google.com/apis/api/cloudtrace
|
||||
* // 2. This sample uses Application Default Credentials for authentication.
|
||||
* // If not already done, install the gcloud CLI from
|
||||
* // https://cloud.google.com/sdk and run
|
||||
* // `gcloud beta auth application-default login`.
|
||||
* // For more information, see
|
||||
* // https://developers.google.com/identity/protocols/application-default-credentials
|
||||
* // 3. Install the Node.js client library by running
|
||||
* // `npm install googleapis --save`
|
||||
*
|
||||
* var google = require('googleapis');
|
||||
* var cloudTrace = google.cloudtrace('v1');
|
||||
*
|
||||
* authorize(function(authClient) {
|
||||
* var request = {
|
||||
* // ID of the Cloud project where the trace data is stored.
|
||||
* projectId: 'my-project-id', // TODO: Update placeholder value.
|
||||
*
|
||||
* // ID of the trace to return.
|
||||
* traceId: 'my-trace-id', // TODO: Update placeholder value.
|
||||
*
|
||||
* auth: authClient,
|
||||
* };
|
||||
*
|
||||
* cloudTrace.projects.traces.get(request, function(err, response) {
|
||||
* if (err) {
|
||||
* console.error(err);
|
||||
* return;
|
||||
* }
|
||||
*
|
||||
* // TODO: Change code below to process the `response` object:
|
||||
* console.log(JSON.stringify(response, null, 2));
|
||||
* });
|
||||
* });
|
||||
*
|
||||
* function authorize(callback) {
|
||||
* google.auth.getApplicationDefault(function(err, authClient) {
|
||||
* if (err) {
|
||||
* console.error('authentication failed: ', err);
|
||||
* return;
|
||||
* }
|
||||
* if (authClient.createScopedRequired && authClient.createScopedRequired()) {
|
||||
* var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
|
||||
* authClient = authClient.createScoped(scopes);
|
||||
* }
|
||||
* callback(authClient);
|
||||
* });
|
||||
* }
|
||||
*
|
||||
* @alias cloudtrace.projects.traces.get
|
||||
* @memberOf! cloudtrace(v1)
|
||||
*
|
||||
* @param {object} params Parameters for request
|
||||
* @param {string} params.projectId ID of the Cloud project where the trace data is stored.
|
||||
* @param {string} params.traceId ID of the trace to return.
|
||||
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
|
||||
* @param {callback} callback The callback that handles the response.
|
||||
* @return {object} Request object
|
||||
*/
|
||||
get: function (params, options, callback) {
|
||||
if (typeof options === 'function') {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
options || (options = {});
|
||||
|
||||
const rootUrl = options.rootUrl || 'https://cloudtrace.googleapis.com/';
|
||||
|
||||
const parameters = {
|
||||
options: Object.assign({
|
||||
url: (rootUrl + '/v1/projects/{projectId}/traces/{traceId}').replace(/([^:]\/)\/+/g, '$1'),
|
||||
method: 'GET'
|
||||
}, options),
|
||||
params: params,
|
||||
requiredParams: ['projectId', 'traceId'],
|
||||
pathParams: ['projectId', 'traceId'],
|
||||
context: self
|
||||
};
|
||||
|
||||
return createAPIRequest(parameters, callback);
|
||||
},
|
||||
|
||||
/**
|
||||
* cloudtrace.projects.traces.list
|
||||
*
|
||||
* @desc Returns of a list of traces that match the specified filter conditions.
|
||||
*
|
||||
* @example
|
||||
* // BEFORE RUNNING:
|
||||
* // ---------------
|
||||
* // 1. If not already done, enable the Stackdriver Trace API
|
||||
* // and check the quota for your project at
|
||||
* // https://console.developers.google.com/apis/api/cloudtrace
|
||||
* // 2. This sample uses Application Default Credentials for authentication.
|
||||
* // If not already done, install the gcloud CLI from
|
||||
* // https://cloud.google.com/sdk and run
|
||||
* // `gcloud beta auth application-default login`.
|
||||
* // For more information, see
|
||||
* // https://developers.google.com/identity/protocols/application-default-credentials
|
||||
* // 3. Install the Node.js client library by running
|
||||
* // `npm install googleapis --save`
|
||||
*
|
||||
* var google = require('googleapis');
|
||||
* var cloudTrace = google.cloudtrace('v1');
|
||||
*
|
||||
* authorize(function(authClient) {
|
||||
* var request = {
|
||||
* // ID of the Cloud project where the trace data is stored.
|
||||
* projectId: 'my-project-id', // TODO: Update placeholder value.
|
||||
*
|
||||
* auth: authClient,
|
||||
* };
|
||||
*
|
||||
* var handlePage = function(err, response) {
|
||||
* if (err) {
|
||||
* console.error(err);
|
||||
* return;
|
||||
* }
|
||||
*
|
||||
* var tracesPage = response['traces'];
|
||||
* if (!tracesPage) {
|
||||
* return;
|
||||
* }
|
||||
* for (var i = 0; i < tracesPage.length; i++) {
|
||||
* // TODO: Change code below to process each resource in `tracesPage`:
|
||||
* console.log(JSON.stringify(tracesPage[i], null, 2));
|
||||
* }
|
||||
*
|
||||
* if (response.nextPageToken) {
|
||||
* request.pageToken = response.nextPageToken;
|
||||
* cloudTrace.projects.traces.list(request, handlePage);
|
||||
* }
|
||||
* };
|
||||
*
|
||||
* cloudTrace.projects.traces.list(request, handlePage);
|
||||
* });
|
||||
*
|
||||
* function authorize(callback) {
|
||||
* google.auth.getApplicationDefault(function(err, authClient) {
|
||||
* if (err) {
|
||||
* console.error('authentication failed: ', err);
|
||||
* return;
|
||||
* }
|
||||
* if (authClient.createScopedRequired && authClient.createScopedRequired()) {
|
||||
* var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
|
||||
* authClient = authClient.createScoped(scopes);
|
||||
* }
|
||||
* callback(authClient);
|
||||
* });
|
||||
* }
|
||||
*
|
||||
* @alias cloudtrace.projects.traces.list
|
||||
* @memberOf! cloudtrace(v1)
|
||||
*
|
||||
* @param {object} params Parameters for request
|
||||
* @param {string=} params.endTime End of the time interval (inclusive) during which the trace data was collected from the application.
|
||||
* @param {string=} params.filter An optional 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`.
|
||||
* @param {string=} params.orderBy Field used to sort the returned traces. Optional. 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.
|
||||
* @param {integer=} params.pageSize 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. Optional.
|
||||
* @param {string=} params.pageToken Token identifying the page of results to return. If provided, use the value of the `next_page_token` field from a previous request. Optional.
|
||||
* @param {string} params.projectId ID of the Cloud project where the trace data is stored.
|
||||
* @param {string=} params.startTime Start of the time interval (inclusive) during which the trace data was collected from the application.
|
||||
* @param {string=} params.view Type of data returned for traces in the list. Optional. Default is `MINIMAL`.
|
||||
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
|
||||
* @param {callback} callback The callback that handles the response.
|
||||
* @return {object} Request object
|
||||
*/
|
||||
list: function (params, options, callback) {
|
||||
if (typeof options === 'function') {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
options || (options = {});
|
||||
|
||||
const rootUrl = options.rootUrl || 'https://cloudtrace.googleapis.com/';
|
||||
|
||||
const parameters = {
|
||||
options: Object.assign({
|
||||
url: (rootUrl + '/v1/projects/{projectId}/traces').replace(/([^:]\/)\/+/g, '$1'),
|
||||
method: 'GET'
|
||||
}, options),
|
||||
params: params,
|
||||
requiredParams: ['projectId'],
|
||||
pathParams: ['projectId'],
|
||||
context: self
|
||||
};
|
||||
|
||||
return createAPIRequest(parameters, callback);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef Empty
|
||||
* @memberOf! cloudtrace(v1)
|
||||
* @type object
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef ListTracesResponse
|
||||
* @memberOf! cloudtrace(v1)
|
||||
* @type object
|
||||
* @property {string} nextPageToken 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.
|
||||
* @property {cloudtrace(v1).Trace[]} traces List of trace records returned.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Trace
|
||||
* @memberOf! cloudtrace(v1)
|
||||
* @type object
|
||||
* @property {string} projectId Project ID of the Cloud project where the trace data is stored.
|
||||
* @property {cloudtrace(v1).TraceSpan[]} spans Collection of spans in the trace.
|
||||
* @property {string} traceId Globally unique identifier for the trace. This identifier is a 128-bit
|
||||
numeric value formatted as a 32-byte hex string.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef TraceSpan
|
||||
* @memberOf! cloudtrace(v1)
|
||||
* @type object
|
||||
* @property {string} endTime End time of the span in nanoseconds from the UNIX epoch.
|
||||
* @property {string} kind 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.
|
||||
* @property {object} labels 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/redirected_url`
|
||||
* `/http/request/size`
|
||||
* `/http/response/size`
|
||||
* `/http/status_code`
|
||||
* `/http/url`
|
||||
* `/http/user_agent`
|
||||
* `/pid`
|
||||
* `/stacktrace`
|
||||
* `/tid`
|
||||
* @property {string} name Name of the span. Must be less than 128 bytes. The span name is sanitized
|
||||
and displayed in the Stackdriver Trace tool in the
|
||||
{% dynamic print site_values.console_name %}.
|
||||
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.
|
||||
* @property {string} parentSpanId ID of the parent span, if any. Optional.
|
||||
* @property {string} spanId Identifier for the span. Must be a 64-bit integer other than 0 and
|
||||
unique within a trace.
|
||||
* @property {string} startTime Start time of the span in nanoseconds from the UNIX epoch.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Traces
|
||||
* @memberOf! cloudtrace(v1)
|
||||
* @type object
|
||||
* @property {cloudtrace(v1).Trace[]} traces List of traces.
|
||||
*/
|
||||
export = Cloudtrace;
|
||||
114
backend/node_modules/googleapis/apis/cloudtrace/v2.js
generated
vendored
Normal file
114
backend/node_modules/googleapis/apis/cloudtrace/v2.js
generated
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Copyright 2015 Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* jshint maxlen: false */
|
||||
const apirequest_1 = require("../../lib/apirequest");
|
||||
/**
|
||||
* Stackdriver Trace API
|
||||
*
|
||||
* Send and retrieve trace data from Stackdriver Trace. Data is generated and available by default for all App Engine applications. Data from other applications can be written to Stackdriver Trace for display, reporting, and analysis.
|
||||
|
||||
*
|
||||
* @example
|
||||
* const google = require('googleapis');
|
||||
* const cloudtrace = google.cloudtrace('v2');
|
||||
*
|
||||
* @namespace cloudtrace
|
||||
* @type {Function}
|
||||
* @version v2
|
||||
* @variation v2
|
||||
* @param {object=} options Options for Cloudtrace
|
||||
*/
|
||||
function Cloudtrace(options) {
|
||||
const self = this;
|
||||
self._options = options || {};
|
||||
self.projects = {
|
||||
traces: {
|
||||
/**
|
||||
* cloudtrace.projects.traces.batchWrite
|
||||
*
|
||||
* @desc Sends new spans to Stackdriver Trace or updates existing traces. If the name of a trace that you send matches that of an existing trace, new spans are added to the existing trace. Attempt to update existing spans results undefined behavior. If the name does not match, a new trace is created with given set of spans.
|
||||
*
|
||||
* @alias cloudtrace.projects.traces.batchWrite
|
||||
* @memberOf! cloudtrace(v2)
|
||||
*
|
||||
* @param {object} params Parameters for request
|
||||
* @param {string} params.name Required. Name of the project where the spans belong. The format is `projects/PROJECT_ID`.
|
||||
* @param {cloudtrace(v2).BatchWriteSpansRequest} params.resource Request body data
|
||||
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
|
||||
* @param {callback} callback The callback that handles the response.
|
||||
* @return {object} Request object
|
||||
*/
|
||||
batchWrite: function (params, options, callback) {
|
||||
if (typeof options === 'function') {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
options || (options = {});
|
||||
const rootUrl = options.rootUrl || 'https://cloudtrace.googleapis.com/';
|
||||
const parameters = {
|
||||
options: Object.assign({
|
||||
url: (rootUrl + '/v2/{name}/traces:batchWrite').replace(/([^:]\/)\/+/g, '$1'),
|
||||
method: 'POST'
|
||||
}, options),
|
||||
params: params,
|
||||
requiredParams: ['name'],
|
||||
pathParams: ['name'],
|
||||
context: self
|
||||
};
|
||||
return apirequest_1.default(parameters, callback);
|
||||
},
|
||||
spans: {
|
||||
/**
|
||||
* cloudtrace.projects.traces.spans.create
|
||||
*
|
||||
* @desc Creates a new Span.
|
||||
*
|
||||
* @alias cloudtrace.projects.traces.spans.create
|
||||
* @memberOf! cloudtrace(v2)
|
||||
*
|
||||
* @param {object} params Parameters for request
|
||||
* @param {string} params.name The resource name of the span in the following format: projects/[PROJECT_ID]traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project. [SPAN_ID] is a unique identifier for a span within a trace, assigned when the span is created.
|
||||
* @param {cloudtrace(v2).Span} params.resource Request body data
|
||||
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
|
||||
* @param {callback} callback The callback that handles the response.
|
||||
* @return {object} Request object
|
||||
*/
|
||||
create: function (params, options, callback) {
|
||||
if (typeof options === 'function') {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
options || (options = {});
|
||||
const rootUrl = options.rootUrl || 'https://cloudtrace.googleapis.com/';
|
||||
const parameters = {
|
||||
options: Object.assign({
|
||||
url: (rootUrl + '/v2/{name}').replace(/([^:]\/)\/+/g, '$1'),
|
||||
method: 'PUT'
|
||||
}, options),
|
||||
params: params,
|
||||
requiredParams: ['name'],
|
||||
pathParams: ['name'],
|
||||
context: self
|
||||
};
|
||||
return apirequest_1.default(parameters, callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
module.exports = Cloudtrace;
|
||||
//# sourceMappingURL=v2.js.map
|
||||
1
backend/node_modules/googleapis/apis/cloudtrace/v2.js.map
generated
vendored
Normal file
1
backend/node_modules/googleapis/apis/cloudtrace/v2.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"v2.js","sourceRoot":"","sources":["v2.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,0BAA0B;AAE1B,qDAAoD;AAEpD;;;;;;;;;;;;;;;GAeG;AACH,oBAAoB,OAAO;IACzB,MAAM,IAAI,GAAG,IAAI,CAAC;IAClB,IAAI,CAAC,QAAQ,GAAG,OAAO,IAAI,EAAE,CAAC;IAE9B,IAAI,CAAC,QAAQ,GAAG;QACd,MAAM,EAAE;YAEN;;;;;;;;;;;;;;eAcG;YACH,UAAU,EAAE,UAAU,MAAM,EAAE,OAAO,EAAE,QAAQ;gBAC7C,EAAE,CAAC,CAAC,OAAO,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC;oBAClC,QAAQ,GAAG,OAAO,CAAC;oBACnB,OAAO,GAAG,EAAE,CAAC;gBACf,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;gBAE1B,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,oCAAoC,CAAC;gBAExE,MAAM,UAAU,GAAG;oBACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;wBACrB,GAAG,EAAE,CAAC,OAAO,GA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backend/node_modules/googleapis/apis/cloudtrace/v2.ts
generated
vendored
Normal file
@@ -0,0 +1,346 @@
|
||||
/**
|
||||
* Copyright 2015 Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* jshint maxlen: false */
|
||||
|
||||
import createAPIRequest from '../../lib/apirequest';
|
||||
|
||||
/**
|
||||
* Stackdriver Trace API
|
||||
*
|
||||
* Send and retrieve trace data from Stackdriver Trace. Data is generated and available by default for all App Engine applications. Data from other applications can be written to Stackdriver Trace for display, reporting, and analysis.
|
||||
|
||||
*
|
||||
* @example
|
||||
* const google = require('googleapis');
|
||||
* const cloudtrace = google.cloudtrace('v2');
|
||||
*
|
||||
* @namespace cloudtrace
|
||||
* @type {Function}
|
||||
* @version v2
|
||||
* @variation v2
|
||||
* @param {object=} options Options for Cloudtrace
|
||||
*/
|
||||
function Cloudtrace(options) { // eslint-disable-line
|
||||
const self = this;
|
||||
self._options = options || {};
|
||||
|
||||
self.projects = {
|
||||
traces: {
|
||||
|
||||
/**
|
||||
* cloudtrace.projects.traces.batchWrite
|
||||
*
|
||||
* @desc Sends new spans to Stackdriver Trace or updates existing traces. If the name of a trace that you send matches that of an existing trace, new spans are added to the existing trace. Attempt to update existing spans results undefined behavior. If the name does not match, a new trace is created with given set of spans.
|
||||
*
|
||||
* @alias cloudtrace.projects.traces.batchWrite
|
||||
* @memberOf! cloudtrace(v2)
|
||||
*
|
||||
* @param {object} params Parameters for request
|
||||
* @param {string} params.name Required. Name of the project where the spans belong. The format is `projects/PROJECT_ID`.
|
||||
* @param {cloudtrace(v2).BatchWriteSpansRequest} params.resource Request body data
|
||||
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
|
||||
* @param {callback} callback The callback that handles the response.
|
||||
* @return {object} Request object
|
||||
*/
|
||||
batchWrite: function (params, options, callback) {
|
||||
if (typeof options === 'function') {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
options || (options = {});
|
||||
|
||||
const rootUrl = options.rootUrl || 'https://cloudtrace.googleapis.com/';
|
||||
|
||||
const parameters = {
|
||||
options: Object.assign({
|
||||
url: (rootUrl + '/v2/{name}/traces:batchWrite').replace(/([^:]\/)\/+/g, '$1'),
|
||||
method: 'POST'
|
||||
}, options),
|
||||
params: params,
|
||||
requiredParams: ['name'],
|
||||
pathParams: ['name'],
|
||||
context: self
|
||||
};
|
||||
|
||||
return createAPIRequest(parameters, callback);
|
||||
},
|
||||
spans: {
|
||||
|
||||
/**
|
||||
* cloudtrace.projects.traces.spans.create
|
||||
*
|
||||
* @desc Creates a new Span.
|
||||
*
|
||||
* @alias cloudtrace.projects.traces.spans.create
|
||||
* @memberOf! cloudtrace(v2)
|
||||
*
|
||||
* @param {object} params Parameters for request
|
||||
* @param {string} params.name The resource name of the span in the following format: projects/[PROJECT_ID]traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project. [SPAN_ID] is a unique identifier for a span within a trace, assigned when the span is created.
|
||||
* @param {cloudtrace(v2).Span} params.resource Request body data
|
||||
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
|
||||
* @param {callback} callback The callback that handles the response.
|
||||
* @return {object} Request object
|
||||
*/
|
||||
create: function (params, options, callback) {
|
||||
if (typeof options === 'function') {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
options || (options = {});
|
||||
|
||||
const rootUrl = options.rootUrl || 'https://cloudtrace.googleapis.com/';
|
||||
|
||||
const parameters = {
|
||||
options: Object.assign({
|
||||
url: (rootUrl + '/v2/{name}').replace(/([^:]\/)\/+/g, '$1'),
|
||||
method: 'PUT'
|
||||
}, options),
|
||||
params: params,
|
||||
requiredParams: ['name'],
|
||||
pathParams: ['name'],
|
||||
context: self
|
||||
};
|
||||
|
||||
return createAPIRequest(parameters, callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef Annotation
|
||||
* @memberOf! cloudtrace(v2)
|
||||
* @type object
|
||||
* @property {cloudtrace(v2).Attributes} attributes A set of attributes on the annotation. There is a limit of 4 attributes
|
||||
per Annotation.
|
||||
* @property {cloudtrace(v2).TruncatableString} description A user-supplied message describing the event. The maximum length for
|
||||
the description is 256 bytes.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef AttributeValue
|
||||
* @memberOf! cloudtrace(v2)
|
||||
* @type object
|
||||
* @property {boolean} boolValue A Boolean value represented by `true` or `false`.
|
||||
* @property {string} intValue A 64-bit signed integer.
|
||||
* @property {cloudtrace(v2).TruncatableString} stringValue A string up to 256 bytes long.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Attributes
|
||||
* @memberOf! cloudtrace(v2)
|
||||
* @type object
|
||||
* @property {object} attributeMap The set of attributes. Each attribute's key can be up to 128 bytes
|
||||
long. The value can be a string up to 256 bytes, an integer, or the
|
||||
Boolean values `true` and `false`. For example:
|
||||
|
||||
"/instance_id": "my-instance"
|
||||
"/http/user_agent": ""
|
||||
"/http/request_bytes": 300
|
||||
"abc.com/myattribute": true
|
||||
* @property {integer} droppedAttributesCount The number of attributes that were discarded. Attributes can be discarded
|
||||
because their keys are too long or because there are too many attributes.
|
||||
If this value is 0 then all attributes are valid.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef BatchWriteSpansRequest
|
||||
* @memberOf! cloudtrace(v2)
|
||||
* @type object
|
||||
* @property {cloudtrace(v2).Span[]} spans A collection of spans.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Empty
|
||||
* @memberOf! cloudtrace(v2)
|
||||
* @type object
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Link
|
||||
* @memberOf! cloudtrace(v2)
|
||||
* @type object
|
||||
* @property {cloudtrace(v2).Attributes} attributes A set of attributes on the link. There is a limit of 32 attributes per
|
||||
link.
|
||||
* @property {string} spanId `SPAN_ID` identifies a span within a trace.
|
||||
* @property {string} traceId `TRACE_ID` identifies a trace within a project.
|
||||
* @property {string} type The relationship of the current span relative to the linked span.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Links
|
||||
* @memberOf! cloudtrace(v2)
|
||||
* @type object
|
||||
* @property {integer} droppedLinksCount The number of dropped links after the maximum size was enforced. If
|
||||
this value is 0, then no links were dropped.
|
||||
* @property {cloudtrace(v2).Link[]} link A collection of links.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Module
|
||||
* @memberOf! cloudtrace(v2)
|
||||
* @type object
|
||||
* @property {cloudtrace(v2).TruncatableString} buildId A unique identifier for the module, usually a hash of its
|
||||
contents (up to 128 bytes).
|
||||
* @property {cloudtrace(v2).TruncatableString} module For example: main binary, kernel modules, and dynamic libraries
|
||||
such as libc.so, sharedlib.so (up to 256 bytes).
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef NetworkEvent
|
||||
* @memberOf! cloudtrace(v2)
|
||||
* @type object
|
||||
* @property {string} compressedMessageSize The number of compressed bytes sent or received.
|
||||
* @property {string} messageId An identifier for the message, which must be unique in this span.
|
||||
* @property {string} time For sent messages, this is the time at which the first bit was sent.
|
||||
For received messages, this is the time at which the last bit was
|
||||
received.
|
||||
* @property {string} type Type of NetworkEvent. Indicates whether the RPC message was sent or
|
||||
received.
|
||||
* @property {string} uncompressedMessageSize The number of uncompressed bytes sent or received.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Span
|
||||
* @memberOf! cloudtrace(v2)
|
||||
* @type object
|
||||
* @property {cloudtrace(v2).Attributes} attributes A set of attributes on the span. There is a limit of 32 attributes per
|
||||
span.
|
||||
* @property {integer} childSpanCount An optional number of child spans that were generated while this span
|
||||
was active. If set, allows implementation to detect missing child spans.
|
||||
* @property {cloudtrace(v2).TruncatableString} displayName A description of the span's operation (up to 128 bytes).
|
||||
Stackdriver Trace displays the description in the
|
||||
{% dynamic print site_values.console_name %}.
|
||||
For example, the display name can be a qualified method name or a file name
|
||||
and a line number where the operation is called. A best practice is to use
|
||||
the same display name within an application and at the same call point.
|
||||
This makes it easier to correlate spans in different traces.
|
||||
* @property {string} endTime The end time of the span. On the client side, this is the time kept by
|
||||
the local machine where the span execution ends. On the server side, this
|
||||
is the time when the server application handler stops running.
|
||||
* @property {cloudtrace(v2).Links} links A maximum of 128 links are allowed per Span.
|
||||
* @property {string} name The resource name of the span in the following format:
|
||||
|
||||
projects/[PROJECT_ID]traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project.
|
||||
[SPAN_ID] is a unique identifier for a span within a trace,
|
||||
assigned when the span is created.
|
||||
* @property {string} parentSpanId The [SPAN_ID] of this span's parent span. If this is a root span,
|
||||
then this field must be empty.
|
||||
* @property {boolean} sameProcessAsParentSpan A highly recommended but not required flag that identifies when a trace
|
||||
crosses a process boundary. True when the parent_span belongs to the
|
||||
same process as the current span.
|
||||
* @property {string} spanId The [SPAN_ID] portion of the span's resource name.
|
||||
* @property {cloudtrace(v2).StackTrace} stackTrace Stack trace captured at the start of the span.
|
||||
* @property {string} startTime The start time of the span. On the client side, this is the time kept by
|
||||
the local machine where the span execution starts. On the server side, this
|
||||
is the time when the server's application handler starts running.
|
||||
* @property {cloudtrace(v2).Status} status An optional final status for this span.
|
||||
* @property {cloudtrace(v2).TimeEvents} timeEvents The included time events. There can be up to 32 annotations and 128 network
|
||||
events per span.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef StackFrame
|
||||
* @memberOf! cloudtrace(v2)
|
||||
* @type object
|
||||
* @property {string} columnNumber The column number where the function call appears, if available.
|
||||
This is important in JavaScript because of its anonymous functions.
|
||||
* @property {cloudtrace(v2).TruncatableString} fileName The name of the source file where the function call appears (up to 256
|
||||
bytes).
|
||||
* @property {cloudtrace(v2).TruncatableString} functionName The fully-qualified name that uniquely identifies the function or
|
||||
method that is active in this frame (up to 1024 bytes).
|
||||
* @property {string} lineNumber The line number in `file_name` where the function call appears.
|
||||
* @property {cloudtrace(v2).Module} loadModule The binary module from where the code was loaded.
|
||||
* @property {cloudtrace(v2).TruncatableString} originalFunctionName An un-mangled function name, if `function_name` is
|
||||
[mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can
|
||||
be fully-qualified (up to 1024 bytes).
|
||||
* @property {cloudtrace(v2).TruncatableString} sourceVersion The version of the deployed source code (up to 128 bytes).
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef StackFrames
|
||||
* @memberOf! cloudtrace(v2)
|
||||
* @type object
|
||||
* @property {integer} droppedFramesCount The number of stack frames that were dropped because there
|
||||
were too many stack frames.
|
||||
If this value is 0, then no stack frames were dropped.
|
||||
* @property {cloudtrace(v2).StackFrame[]} frame Stack frames in this call stack.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef StackTrace
|
||||
* @memberOf! cloudtrace(v2)
|
||||
* @type object
|
||||
* @property {cloudtrace(v2).StackFrames} stackFrames Stack frames in this stack trace. A maximum of 128 frames are allowed.
|
||||
* @property {string} stackTraceHashId The hash ID is used to conserve network bandwidth for duplicate
|
||||
stack traces within a single trace.
|
||||
|
||||
Often multiple spans will have identical stack traces.
|
||||
The first occurrence of a stack trace should contain both the
|
||||
`stackFrame` content and a value in `stackTraceHashId`.
|
||||
|
||||
Subsequent spans within the same request can refer
|
||||
to that stack trace by only setting `stackTraceHashId`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Status
|
||||
* @memberOf! cloudtrace(v2)
|
||||
* @type object
|
||||
* @property {integer} code The status code, which should be an enum value of google.rpc.Code.
|
||||
* @property {object[]} details A list of messages that carry the error details. There is a common set of
|
||||
message types for APIs to use.
|
||||
* @property {string} message A developer-facing error message, which should be in English. Any
|
||||
user-facing error message should be localized and sent in the
|
||||
google.rpc.Status.details field, or localized by the client.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef TimeEvent
|
||||
* @memberOf! cloudtrace(v2)
|
||||
* @type object
|
||||
* @property {cloudtrace(v2).Annotation} annotation Text annotation with a set of attributes.
|
||||
* @property {cloudtrace(v2).NetworkEvent} networkEvent An event describing an RPC message sent/received on the network.
|
||||
* @property {string} time The timestamp indicating the time the event occurred.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef TimeEvents
|
||||
* @memberOf! cloudtrace(v2)
|
||||
* @type object
|
||||
* @property {integer} droppedAnnotationsCount The number of dropped annotations in all the included time events.
|
||||
If the value is 0, then no annotations were dropped.
|
||||
* @property {integer} droppedNetworkEventsCount The number of dropped network events in all the included time events.
|
||||
If the value is 0, then no network events were dropped.
|
||||
* @property {cloudtrace(v2).TimeEvent[]} timeEvent A collection of `TimeEvent`s.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef TruncatableString
|
||||
* @memberOf! cloudtrace(v2)
|
||||
* @type object
|
||||
* @property {integer} truncatedByteCount The number of bytes removed from the original string. If this
|
||||
value is 0, then the string was not shortened.
|
||||
* @property {string} value The shortened string. For example, if the original string was 500
|
||||
bytes long and the limit of the string was 128 bytes, then this
|
||||
value contains the first 128 bytes of the 500-byte string. Note that
|
||||
truncation always happens on the character boundary, to ensure that
|
||||
truncated string is still valid UTF8. In case of multi-byte characters,
|
||||
size of truncated string can be less than truncation limit.
|
||||
*/
|
||||
export = Cloudtrace;
|
||||
Reference in New Issue
Block a user