Module: Google::Cloud
- Defined in:
- lib/google-cloud-trace.rb,
lib/google/cloud/trace.rb,
lib/google/cloud/trace/span.rb,
lib/google/cloud/trace/rails.rb,
lib/google/cloud/trace/utils.rb,
lib/google/cloud/trace/errors.rb,
lib/google/cloud/trace/project.rb,
lib/google/cloud/trace/service.rb,
lib/google/cloud/trace/version.rb,
lib/google/cloud/trace/label_key.rb,
lib/google/cloud/trace/span_kind.rb,
lib/google/cloud/trace/middleware.rb,
lib/google/cloud/trace/result_set.rb,
lib/google/cloud/trace/credentials.rb,
lib/google/cloud/trace/time_sampler.rb,
lib/google/cloud/trace/trace_record.rb,
lib/google/cloud/trace/notifications.rb,
lib/google/cloud/trace/async_reporter.rb,
lib/google/cloud/trace/faraday_middleware.rb
Defined Under Namespace
Modules: Trace
Class Method Summary collapse
-
.trace(project_id = nil, credentials = nil, scope: nil, timeout: nil) ⇒ Google::Cloud::Trace::Project
Creates a new object for connecting to the Stackdriver Trace service.
Instance Method Summary collapse
-
#trace(scope: nil, timeout: nil) ⇒ Google::Cloud::Trace::Project
Creates a new object for connecting to the Stackdriver Trace service.
Class Method Details
.trace(project_id = nil, credentials = nil, scope: nil, timeout: nil) ⇒ Google::Cloud::Trace::Project
Creates a new object for connecting to the Stackdriver Trace service. Each call creates a new connection.
For more information on connecting to Google Cloud see the Authentication Guide.
102 103 104 105 106 107 108 109 110 111 |
# File 'lib/google-cloud-trace.rb', line 102 def self.trace project_id = nil, credentials = nil, scope: nil, timeout: nil require "google/cloud/trace" Google::Cloud::Trace.new project_id: project_id, credentials: credentials, scope: scope, timeout: timeout end |
Instance Method Details
#trace(scope: nil, timeout: nil) ⇒ Google::Cloud::Trace::Project
Creates a new object for connecting to the Stackdriver Trace service. Each call creates a new connection.
For more information on connecting to Google Cloud see the Authentication Guide.
60 61 62 63 64 |
# File 'lib/google-cloud-trace.rb', line 60 def trace scope: nil, timeout: nil timeout ||= @timeout Google::Cloud.trace @project, @keyfile, scope: scope, timeout: timeout end |