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

0.46.0 (latest) 0.45.0 0.44.1 0.43.0 0.42.2 0.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

```ruby
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"
```