Module: Google::Cloud

Defined in:
lib/google-cloud-debugger.rb,
lib/google/cloud/debugger.rb,
lib/google/cloud/debugger/agent.rb,
lib/google/cloud/debugger/rails.rb,
lib/google/cloud/debugger/tracer.rb,
lib/google/cloud/debugger/backoff.rb,
lib/google/cloud/debugger/project.rb,
lib/google/cloud/debugger/service.rb,
lib/google/cloud/debugger/version.rb,
lib/google/cloud/debugger/debuggee.rb,
lib/google/cloud/debugger/logpoint.rb,
lib/google/cloud/debugger/snappoint.rb,
lib/google/cloud/debugger/breakpoint.rb,
lib/google/cloud/debugger/middleware.rb,
lib/google/cloud/debugger/credentials.rb,
lib/google/cloud/debugger/transmitter.rb,
lib/google/cloud/debugger/breakpoint_manager.rb,
lib/google/cloud/debugger/breakpoint/variable.rb,
lib/google/cloud/debugger/breakpoint/evaluator.rb,
lib/google/cloud/debugger/breakpoint/validator.rb,
lib/google/cloud/debugger/request_quota_manager.rb,
lib/google/cloud/debugger/breakpoint/stack_frame.rb,
lib/google/cloud/debugger/breakpoint/status_message.rb,
lib/google/cloud/debugger/breakpoint/variable_table.rb,
lib/google/cloud/debugger/breakpoint/source_location.rb,
lib/google/cloud/debugger/debuggee/app_uniquifier_generator.rb

Defined Under Namespace

Modules: Debugger

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.debugger(project_id = nil, credentials = nil, service_name: nil, service_version: nil, scope: nil, timeout: nil) ⇒ Google::Cloud::Debugger::Project

Creates a new debugger object for instrumenting Stackdriver Debugger for an application. Each call creates a new debugger agent with independent connection service.

For more information on connecting to Google Cloud see the Authentication Guide.

Examples:

require "google/cloud"

debugger = Google::Cloud.debugger

debugger.start

Parameters:

  • project_id (String) (defaults to: nil)

    Project identifier for the Stackdriver Debugger service you are connecting to. If not present, the default project for the credentials is used.

  • credentials (String, Hash, Google::Auth::Credentials) (defaults to: nil)

    The path to the keyfile as a String, the contents of the keyfile as a Hash, or a Google::Auth::Credentials object. (See Google::Cloud::Debugger::Credentials)

  • service_name (String) (defaults to: nil)

    Name for the debuggee application. Optional.

  • service_version (String) (defaults to: nil)

    Version identifier for the debuggee

  • scope (String, Array<String>) (defaults to: nil)

    The OAuth 2.0 scopes controlling the set of resources and operations that the connection can access. See Using OAuth 2.0 to Access Google APIs.

    The default scope is:

    • https://www.googleapis.com/auth/cloud_debugger
    • https://www.googleapis.com/auth/logging.admin
  • timeout (Integer) (defaults to: nil)

    Default timeout to use in requests. Optional.

Returns:



114
115
116
117
118
119
120
121
122
# File 'lib/google-cloud-debugger.rb', line 114

def self.debugger project_id = nil, credentials = nil, service_name: nil,
                  service_version: nil, scope: nil, timeout: nil
  require "google/cloud/debugger"
  Google::Cloud::Debugger.new project_id: project_id,
                              credentials: credentials,
                              service_name: service_name,
                              service_version: service_version,
                              scope: scope, timeout: timeout
end

Instance Method Details

#debugger(service_name: nil, service_version: nil, scope: nil, timeout: nil) ⇒ Google::Cloud::Debugger::Project

Creates a new debugger object for instrumenting Stackdriver Debugger for an application. Each call creates a new debugger agent with independent connection service.

For more information on connecting to Google Cloud see the Authentication Guide.

Examples:

require "google/cloud"

gcloud = Google::Cloud.new
debugger = gcloud.debugger

debugger.start

The default scope can be overridden with the scope option:

require "google/cloud"

gcloud  = Google::Cloud.new
platform_scope = "https://www.googleapis.com/auth/cloud-platform"
debugger = gcloud.debugger scope: platform_scope

Parameters:

  • service_name (String) (defaults to: nil)

    Name for the debuggee application. Optional.

  • service_version (String) (defaults to: nil)

    Version identifier for the debuggee application. Optional.

  • scope (String, Array<String>) (defaults to: nil)

    The OAuth 2.0 scopes controlling the set of resources and operations that the connection can access. See Using OAuth 2.0 to Access Google APIs.

    The default scope is:

    • https://www.googleapis.com/auth/cloud_debugger
    • https://www.googleapis.com/auth/logging.admin
  • timeout (Integer) (defaults to: nil)

    Default timeout to use in requests. Optional.

Returns:



69
70
71
72
73
74
75
# File 'lib/google-cloud-debugger.rb', line 69

def debugger service_name: nil, service_version: nil, scope: nil, timeout: nil
  Google::Cloud.debugger @project, @keyfile,
                         service_name: service_name,
                         service_version: service_version,
                         scope: scope,
                         timeout: (timeout || @timeout)
end