Cloud Trace API - Class Google::Cloud::Trace::Credentials (v0.45.0)
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"
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-10 UTC."],[],[]]