Module: Google::Cloud

Defined in:
lib/google-cloud-debugger.rb,
lib/google/cloud/debugger.rb,
lib/google/cloud/debugger/v2.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/v2/credentials.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/breakpoint/validator.rb,
lib/google/cloud/debugger/request_quota_manager.rb,
lib/google/cloud/debugger/v2/controller2_client.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, 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_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)

    Name for the debuggee application. Optional.

  • service_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
    • https://www.googleapis.com/auth/logging.admin
  • 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:



119
120
121
122
123
124
125
126
127
128
129
# File 'lib/google-cloud-debugger.rb', line 119

def self.debugger project_id = nil, credentials = nil, service_name: nil,
                  service_version: nil, scope: nil, timeout: nil,
                  client_config: 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,
                              client_config: client_config
end

Instance Method Details

#debugger(service_name: nil, service_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:

  • service_name (String)

    Name for the debuggee application. Optional.

  • service_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
    • https://www.googleapis.com/auth/logging.admin
  • 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:



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

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