Cloud Trace API - Class Google::Cloud::Trace::Credentials (v0.41.4)

Reference documentation and code samples for the Cloud Trace API class Google::Cloud::Trace::Credentials.

Credentials

Represents the authentication and authorization used to connect to the Stackdriver Trace API.

Inherits

  • Google::Cloud::Trace::V1::TraceService::Credentials

Example

require "google/cloud/trace"

keyfile = "/path/to/keyfile.json"
creds = Google::Cloud::Trace::Credentials.new keyfile

trace = Google::Cloud::Trace.new(
  project_id: "my-project",
  credentials: creds
)

trace.project_id #=> "my-project"