6.0.0 • Published 5 years ago

@datafire/google_cloudtrace v6.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@datafire/google_cloudtrace

Client library for Cloud Trace API

Installation and Usage

npm install --save @datafire/google_cloudtrace
let google_cloudtrace = require('@datafire/google_cloudtrace').create({
  access_token: "",
  refresh_token: "",
  client_id: "",
  client_secret: "",
  redirect_uri: ""
});

.then(data => {
  console.log(data);
});

Description

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 OpenCensus.

Actions

oauthCallback

Exchange the code passed to your redirect URI for an access_token

google_cloudtrace.oauthCallback({
  "code": ""
}, context)

Input

  • input object
    • code required string

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

oauthRefresh

Exchange a refresh_token for an access_token

google_cloudtrace.oauthRefresh(null, context)

Input

This action has no parameters

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

cloudtrace.projects.traceSinks.delete

Deletes a sink.

google_cloudtrace.cloudtrace.projects.traceSinks.delete({
  "name": ""
}, context)

Input

  • input object
    • name required string: Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/PROJECT_NUMBER/traceSinks/SINK_ID" Example: "projects/12345/traceSinks/my-sink-id".
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: 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.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: 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.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

cloudtrace.projects.traceSinks.get

Get a trace sink by name under the parent resource (GCP project).

google_cloudtrace.cloudtrace.projects.traceSinks.get({
  "name": ""
}, context)

Input

  • input object
    • name required string: Required. The resource name of the sink: "projects/PROJECT_NUMBER/traceSinks/SINK_ID" Example: "projects/12345/traceSinks/my-sink-id".
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: 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.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: 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.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

cloudtrace.projects.traceSinks.patch

Updates a sink. This method updates fields in the existing sink according to the provided update mask. The sink's name cannot be changed nor any output-only fields (e.g. the writer_identity).

google_cloudtrace.cloudtrace.projects.traceSinks.patch({
  "name": ""
}, context)

Input

  • input object
    • name required string: Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/PROJECT_NUMBER/traceSinks/SINK_ID" Example: "projects/12345/traceSinks/my-sink-id".
    • updateMask string: Required. Field mask that specifies the fields in trace_sink that are to be updated. A sink field is overwritten if, and only if, it is in the update mask. name and writer_identity fields cannot be updated. An empty updateMask is considered an error. For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask Example: updateMask=output_config.
    • body TraceSink
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: 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.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: 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.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

cloudtrace.projects.traceSinks.list

List all sinks for the parent resource (GCP project).

google_cloudtrace.cloudtrace.projects.traceSinks.list({
  "parent": ""
}, context)

Input

  • input object
    • parent required string: Required. The parent resource whose sinks are to be listed (currently only project parent resources are supported): "projects/PROJECT_ID"
    • pageSize integer: Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.
    • pageToken string: Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: 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.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: 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.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

cloudtrace.projects.traceSinks.create

Creates a sink that exports trace spans to a destination. The export of newly-ingested traces begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export traces only from the resource owning the sink (the 'parent').

google_cloudtrace.cloudtrace.projects.traceSinks.create({
  "parent": ""
}, context)

Input

  • input object
    • parent required string: Required. The resource in which to create the sink (currently only project sinks are supported): "projects/PROJECT_ID" Examples: "projects/my-trace-project", "projects/123456789".
    • body TraceSink
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: 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.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: 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.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

Definitions

Empty

  • Empty object: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for Empty is empty JSON object {}.

ListTraceSinksResponse

  • ListTraceSinksResponse object: Result returned from ListTraceSinks.
    • nextPageToken string: If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken.
    • sinks array: A list of sinks.

OutputConfig

  • OutputConfig object: OutputConfig contains a destination for writing trace data.
    • destination string: The destination for writing trace data. Currently only BigQuery is supported. E.g.: "bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET"

TraceSink

  • TraceSink object: Describes a sink used to export traces to a BigQuery dataset. The sink must be created within a project.
    • name string: Required. The canonical sink resource name, unique within the project. Must be of the form: project/PROJECT_NUMBER/traceSinks/SINK_ID. E.g.: "projects/12345/traceSinks/my-project-trace-sink". Sink identifiers are limited to 256 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods.
    • outputConfig OutputConfig
    • writerIdentity string: Output only. A service account name for exporting the data. This field is set by sinks.create and sinks.update. The service account will need to be granted write access to the destination specified in the output configuration, see Granting access for a resource. To create tables and write data this account will need the dataEditor role. Read more about roles in the BigQuery documentation. E.g.: "service-00000001@00000002.iam.gserviceaccount.com"
6.0.0

5 years ago

5.0.0

7 years ago

4.0.0

7 years ago

3.0.0

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago