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/project.rb,
lib/google/cloud/debugger/service.rb,
lib/google/cloud/debugger/version.rb,
lib/google/cloud/debugger/debuggee.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/v2/debugger2_client.rb,
lib/google/cloud/debugger/breakpoint/evaluator.rb,
lib/google/cloud/debugger/v2/controller2_client.rb,
lib/google/cloud/debugger/breakpoint/stack_frame.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 = nil, keyfile = nil, module_name: nil, module_version: nil, scope: nil, timeout: nil, client_config: 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 (String) (defaults to: nil)

    Project identifier for the Stackdriver Debugger service you are connecting to.

  • keyfile (String, Hash) (defaults to: nil)

    Keyfile downloaded from Google Cloud. If file path the file must be readable.

  • module_name (String)

    Name for the debuggee application. Optional.

  • module_version (String)

    Version identifier for the debuggee

  • scope (String, Array<String>)

    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
  • timeout (Integer)

    Default timeout to use in requests. Optional.

  • client_config (Hash)

    A hash of values to override the default behavior of the API client. Optional.

Returns:



110
111
112
113
114
115
116
117
118
119
# File 'lib/google-cloud-debugger.rb', line 110

def self.debugger project = nil, keyfile = nil, module_name: nil,
                  module_version: nil, scope: nil, timeout: nil,
                  client_config: nil
  require "google/cloud/debugger"
  Google::Cloud::Debugger.new project: project, keyfile: keyfile,
                              module_name: module_name,
                              module_version: module_version,
                              scope: scope, timeout: timeout,
                              client_config: client_config
end

Instance Method Details

#debugger(module_name: nil, module_version: nil, scope: nil, timeout: nil, client_config: 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:

  • module_name (String)

    Name for the debuggee application. Optional.

  • module_version (String)

    Version identifier for the debuggee application. Optional.

  • scope (String, Array<String>)

    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
  • timeout (Integer)

    Default timeout to use in requests. Optional.

  • client_config (Hash)

    A hash of values to override the default behavior of the API client. Optional.

Returns:



66
67
68
69
70
71
72
73
# File 'lib/google-cloud-debugger.rb', line 66

def debugger module_name: nil, module_version: nil, scope: nil,
             timeout: nil, client_config: nil
  Google::Cloud.debugger @project, @keyfile, module_name: module_name,
                                             module_version: module_version,
                                             scope: scope,
                                             timeout: (timeout || @timeout),
                                             client_config: client_config
end