google-cloud-debugger 0.32.2 → 0.32.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +10 -1
- data/README.md +21 -12
- data/lib/google-cloud-debugger.rb +5 -4
- data/lib/google/cloud/debugger.rb +3 -323
- data/lib/google/cloud/debugger/middleware.rb +3 -3
- data/lib/google/cloud/debugger/rails.rb +2 -1
- data/lib/google/cloud/debugger/v2.rb +6 -0
- data/lib/google/cloud/debugger/v2/controller2_client.rb +2 -0
- data/lib/google/cloud/debugger/v2/credentials.rb +1 -0
- data/lib/google/cloud/debugger/v2/debugger2_client.rb +2 -0
- data/lib/google/cloud/debugger/v2/doc/google/devtools/clouddebugger/v2/controller.rb +1 -0
- data/lib/google/cloud/debugger/v2/doc/google/devtools/clouddebugger/v2/data.rb +1 -0
- data/lib/google/cloud/debugger/v2/doc/google/devtools/clouddebugger/v2/debugger.rb +1 -0
- data/lib/google/cloud/debugger/v2/doc/google/devtools/source/v1/source_context.rb +1 -0
- data/lib/google/cloud/debugger/v2/doc/google/protobuf/empty.rb +1 -0
- data/lib/google/cloud/debugger/v2/doc/google/protobuf/timestamp.rb +9 -6
- data/lib/google/cloud/debugger/version.rb +1 -1
- data/lib/google/devtools/clouddebugger/v2/controller_pb.rb +1 -0
- data/lib/google/devtools/clouddebugger/v2/controller_services_pb.rb +1 -0
- data/lib/google/devtools/clouddebugger/v2/data_pb.rb +1 -0
- data/lib/google/devtools/clouddebugger/v2/debugger_pb.rb +1 -0
- data/lib/google/devtools/clouddebugger/v2/debugger_services_pb.rb +1 -0
- data/lib/google/devtools/source/v1/source_context_pb.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7059138deab6099684889719b6af36b209492140bc3785b0fe530fce128d9211
|
|
4
|
+
data.tar.gz: e2b0dc554a33bf6b435ac24a0f93c6338c9db3a5e46bcf8fe7d9db89e7daca98
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b2299fac639c19c388e84f8e522388a8b175d22a522b1f60ea372102dbfc4a6767b2f6094ba69af40d5dec1e2cbb256655adfdf6474516d3c6a52b12eb6a162
|
|
7
|
+
data.tar.gz: efb19ac91c9b94fc6df8ae4af497bc20fb9d3edb96b6b554093e989d2db5ae7b74eb77f34c785f9f280d9db38ef3a91aa2bcb270a1f1014ea90a1e7589338258
|
data/.yardopts
CHANGED
|
@@ -3,7 +3,16 @@
|
|
|
3
3
|
--exclude _pb\.rb$
|
|
4
4
|
--markup markdown
|
|
5
5
|
--markup-provider redcarpet
|
|
6
|
+
--main OVERVIEW.md
|
|
6
7
|
|
|
7
8
|
./lib/**/*.rb
|
|
8
9
|
-
|
|
9
|
-
|
|
10
|
+
OVERVIEW.md
|
|
11
|
+
AUTHENTICATION.md
|
|
12
|
+
INSTRUMENTATION.md
|
|
13
|
+
LOGGING.md
|
|
14
|
+
CONTRIBUTING.md
|
|
15
|
+
TROUBLESHOOTING.md
|
|
16
|
+
CHANGELOG.md
|
|
17
|
+
CODE_OF_CONDUCT.md
|
|
18
|
+
LICENSE
|
data/README.md
CHANGED
|
@@ -8,7 +8,7 @@ your application, including test, development, and production. The Ruby
|
|
|
8
8
|
debugger adds minimal request latency, typically less than 50ms, and only when
|
|
9
9
|
application state is captured. In most cases, this is not noticeable by users.
|
|
10
10
|
|
|
11
|
-
- [google-cloud-debugger documentation](http://googlecloudplatform.github.io/google-cloud-ruby
|
|
11
|
+
- [google-cloud-debugger documentation](http://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-debugger/latest)
|
|
12
12
|
- [google-cloud-debugger on RubyGems](https://rubygems.org/gems/google-cloud-debugger)
|
|
13
13
|
- [Stackdriver Debugger documentation](https://cloud.google.com/debugger/docs/)
|
|
14
14
|
|
|
@@ -175,7 +175,7 @@ Google::Cloud::Debugger.new(project_id: "your-project-id",
|
|
|
175
175
|
|
|
176
176
|
This library also supports the other authentication methods provided by the
|
|
177
177
|
`google-cloud-ruby` suite. Instructions and configuration options are covered
|
|
178
|
-
in the [Authentication Guide](https://googlecloudplatform.github.io/google-cloud-ruby
|
|
178
|
+
in the [Authentication Guide](https://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-debugger/latest/file.AUTHENTICATION).
|
|
179
179
|
|
|
180
180
|
### Using the Debugger
|
|
181
181
|
|
|
@@ -219,12 +219,12 @@ agent.
|
|
|
219
219
|
You can customize the behavior of the Stackdriver Debugger agent. This includes
|
|
220
220
|
setting the Google Cloud project and authentication, and customizing the
|
|
221
221
|
behavior of the debugger itself, such as side effect protection and data
|
|
222
|
-
size limits. See [agent configuration](../stackdriver/
|
|
222
|
+
size limits. See [agent configuration](../stackdriver/CONFIGURATION.md)
|
|
223
223
|
for a list of possible configuration options.
|
|
224
224
|
|
|
225
225
|
## Enabling Logging
|
|
226
226
|
|
|
227
|
-
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below, or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby
|
|
227
|
+
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below, or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-logging/latest/Google/Cloud/Logging/Logger) that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
|
228
228
|
|
|
229
229
|
Configuring a Ruby stdlib logger:
|
|
230
230
|
|
|
@@ -249,9 +249,9 @@ end
|
|
|
249
249
|
This library is supported on Ruby 2.3+.
|
|
250
250
|
|
|
251
251
|
Google provides official support for Ruby versions that are actively supported
|
|
252
|
-
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
|
253
|
-
|
|
254
|
-
|
|
252
|
+
by Ruby Core—that is, Ruby versions that are either in normal maintenance or in
|
|
253
|
+
security maintenance, and not end of life. Currently, this means Ruby 2.3 and
|
|
254
|
+
later. Older versions of Ruby _may_ still work, but are unsupported and not
|
|
255
255
|
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
|
|
256
256
|
about the Ruby support schedule.
|
|
257
257
|
|
|
@@ -263,15 +263,24 @@ and the public API should not be considered stable.
|
|
|
263
263
|
|
|
264
264
|
Contributions to this library are always welcome and highly encouraged.
|
|
265
265
|
|
|
266
|
-
See the [Contributing
|
|
266
|
+
See the [Contributing
|
|
267
|
+
Guide](https://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-debugger/latest/file.CONTRIBUTING)
|
|
268
|
+
for more information on how to get started.
|
|
267
269
|
|
|
268
|
-
Please note that this project is released with a Contributor Code of Conduct. By
|
|
270
|
+
Please note that this project is released with a Contributor Code of Conduct. By
|
|
271
|
+
participating in this project you agree to abide by its terms. See [Code of
|
|
272
|
+
Conduct](https://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-debugger/latest/file.CODE_OF_CONDUCT)
|
|
273
|
+
for more information.
|
|
269
274
|
|
|
270
275
|
## License
|
|
271
276
|
|
|
272
|
-
This library is licensed under Apache 2.0. Full license text is available in
|
|
277
|
+
This library is licensed under Apache 2.0. Full license text is available in
|
|
278
|
+
[LICENSE](https://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-debugger/latest/file.LICENSE).
|
|
273
279
|
|
|
274
280
|
## Support
|
|
275
281
|
|
|
276
|
-
Please [report bugs at the project on
|
|
277
|
-
|
|
282
|
+
Please [report bugs at the project on
|
|
283
|
+
Github](https://github.com/GoogleCloudPlatform/google-cloud-ruby/issues). Don't
|
|
284
|
+
hesitate to [ask
|
|
285
|
+
questions](http://stackoverflow.com/questions/tagged/google-cloud-platform+ruby)
|
|
286
|
+
about the client or APIs on [StackOverflow](http://stackoverflow.com).
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
+
|
|
15
16
|
##
|
|
16
17
|
# This file is here to be autorequired by bundler, so that the
|
|
17
18
|
# Google::Cloud.debugger and Google::Cloud#debugger methods can be available,
|
|
@@ -30,8 +31,8 @@ module Google
|
|
|
30
31
|
# an application. Each call creates a new debugger agent with independent
|
|
31
32
|
# connection service.
|
|
32
33
|
#
|
|
33
|
-
# For more information on connecting to Google Cloud see the
|
|
34
|
-
# Guide
|
|
34
|
+
# For more information on connecting to Google Cloud see the
|
|
35
|
+
# {file:AUTHENTICATION.md Authentication Guide}.
|
|
35
36
|
#
|
|
36
37
|
# @param [String] service_name Name for the debuggee application. Optional.
|
|
37
38
|
# @param [String] service_version Version identifier for the debuggee
|
|
@@ -82,8 +83,8 @@ module Google
|
|
|
82
83
|
# an application. Each call creates a new debugger agent with independent
|
|
83
84
|
# connection service.
|
|
84
85
|
#
|
|
85
|
-
# For more information on connecting to Google Cloud see the
|
|
86
|
-
# Guide
|
|
86
|
+
# For more information on connecting to Google Cloud see the
|
|
87
|
+
# {file:AUTHENTICATION.md Authentication Guide}.
|
|
87
88
|
#
|
|
88
89
|
# @param [String] project_id Project identifier for the Stackdriver Debugger
|
|
89
90
|
# service you are connecting to. If not present, the default project for
|
|
@@ -33,326 +33,7 @@ module Google
|
|
|
33
33
|
# analyze the production state of your application and understand the
|
|
34
34
|
# behavior of your code in production.
|
|
35
35
|
#
|
|
36
|
-
#
|
|
37
|
-
# Debugger Documentation](https://cloud.google.com/debugger/docs/).
|
|
38
|
-
#
|
|
39
|
-
# The Stackdriver Debugger Ruby library, `google-cloud-debugger`, provides:
|
|
40
|
-
#
|
|
41
|
-
# * Easy-to-use debugger instrumentation that reports state data, such as
|
|
42
|
-
# value of program variables and the call stack, to Stackdriver Debugger
|
|
43
|
-
# when the code at a breakpoint location is executed in your Ruby
|
|
44
|
-
# application. See the [instrumenting your app](#instrumenting-your-app)
|
|
45
|
-
# section for how to debug your application, in both development and
|
|
46
|
-
# production.
|
|
47
|
-
# * An idiomatic Ruby API for registerying debuggee application, and
|
|
48
|
-
# querying or manipulating breakpoints in registered Ruby debuggee
|
|
49
|
-
# application. See [Debugger API](#stackdriver-debugger-api) section for
|
|
50
|
-
# an introduction to Stackdriver Debugger API.
|
|
51
|
-
#
|
|
52
|
-
# ## Instrumenting Your App
|
|
53
|
-
#
|
|
54
|
-
# This instrumentation library provides the following features to help you
|
|
55
|
-
# debug your applications in production:
|
|
56
|
-
#
|
|
57
|
-
# * Automatic application registration. It facilitates multiple running
|
|
58
|
-
# instances of same version of application when hosted in production.
|
|
59
|
-
# * A background debugger agent that runs side-by-side with your
|
|
60
|
-
# application that automatically collects state data when code is
|
|
61
|
-
# executed at breakpoint locations.
|
|
62
|
-
# * A Rack middleware and Railtie that automatically manages the debugger
|
|
63
|
-
# agent for Ruby on Rails and other Rack-based Ruby applications.
|
|
64
|
-
#
|
|
65
|
-
# When this library is configured in your running application, and the
|
|
66
|
-
# source code and breakpoints are setup through the Google Cloud Console,
|
|
67
|
-
# You'll be able to
|
|
68
|
-
# [interact](https://cloud.google.com/debugger/docs/debugging) with your
|
|
69
|
-
# application in real time through the [Stackdriver Debugger
|
|
70
|
-
# UI](https://console.cloud.google.com/debug?_ga=1.84295834.280814654.1476313407).
|
|
71
|
-
# This library also integrates with Google App Engine Flexible to make
|
|
72
|
-
# debuggee application configuration more seemless.
|
|
73
|
-
#
|
|
74
|
-
# Note that when no breakpoints are created, the debugger agent consumes
|
|
75
|
-
# very little resource and has no interference with the running application.
|
|
76
|
-
# Once breakpoints are created and depends on where the breakpoints are
|
|
77
|
-
# located, the debugger agent may add a little latency onto each request.
|
|
78
|
-
# The application performance will be back to normal after all breakpoints
|
|
79
|
-
# are finished being evaluated. Be aware the more breakpoints are created,
|
|
80
|
-
# or the harder to reach the breakpoints, the more resource the debugger
|
|
81
|
-
# agent would need to consume.
|
|
82
|
-
#
|
|
83
|
-
# ### Using instrumentation with Ruby on Rails
|
|
84
|
-
#
|
|
85
|
-
# To install application instrumentation in your Ruby on Rails app, add this
|
|
86
|
-
# gem, `google-cloud-debugger`, to your Gemfile and update your bundle. Then
|
|
87
|
-
# add the following line to your `config/application.rb` file:
|
|
88
|
-
#
|
|
89
|
-
# ```ruby
|
|
90
|
-
# require "google/cloud/debugger/rails"
|
|
91
|
-
# ```
|
|
92
|
-
#
|
|
93
|
-
# This will load a Railtie that automatically integrates with the Rails
|
|
94
|
-
# framework by injecting a Rack middleware. The Railtie also takes in the
|
|
95
|
-
# following Rails configuration as parameter of the debugger agent
|
|
96
|
-
# initialization:
|
|
97
|
-
#
|
|
98
|
-
# ```ruby
|
|
99
|
-
# # Explicitly enable or disable Stackdriver Debugger Agent
|
|
100
|
-
# config.google_cloud.use_debugger = true
|
|
101
|
-
# # Shared Google Cloud Platform project identifier
|
|
102
|
-
# config.google_cloud.project_id = "gcloud-project"
|
|
103
|
-
# # Google Cloud Platform project identifier for Stackdriver Debugger only
|
|
104
|
-
# config.google_cloud.debugger.project_id = "debugger-project"
|
|
105
|
-
# # Shared Google Cloud authentication json file
|
|
106
|
-
# config.google_cloud.keyfile = "/path/to/keyfile.json"
|
|
107
|
-
# # Google Cloud authentication json file for Stackdriver Debugger only
|
|
108
|
-
# config.google_cloud.debugger.keyfile = "/path/to/debugger/keyfile.json"
|
|
109
|
-
# # Stackdriver Debugger Agent service name identifier
|
|
110
|
-
# config.google_cloud.debugger.service_name = "my-ruby-app"
|
|
111
|
-
# # Stackdriver Debugger Agent service version identifier
|
|
112
|
-
# config.google_cloud.debugger.service_version = "v1"
|
|
113
|
-
# ```
|
|
114
|
-
#
|
|
115
|
-
# See the {Google::Cloud::Debugger::Railtie} class for more information.
|
|
116
|
-
#
|
|
117
|
-
# ### Using instrumentation with Sinatra
|
|
118
|
-
#
|
|
119
|
-
# To install application instrumentation in your Sinatra app, add this gem,
|
|
120
|
-
# `google-cloud-debugger`, to your Gemfile and update your bundle. Then add
|
|
121
|
-
# the following lines to your main application Ruby file:
|
|
122
|
-
#
|
|
123
|
-
# ```ruby
|
|
124
|
-
# require "google/cloud/debugger"
|
|
125
|
-
# use Google::Cloud::Debugger::Middleware
|
|
126
|
-
# ```
|
|
127
|
-
#
|
|
128
|
-
# This will install the debugger middleware in your application.
|
|
129
|
-
#
|
|
130
|
-
# Configuration parameters may also be passed in as arguments to Middleware.
|
|
131
|
-
# ```ruby
|
|
132
|
-
# require "google/cloud/debugger"
|
|
133
|
-
# use Google::Cloud::Debugger::Middleware project: "debugger-project-id",
|
|
134
|
-
# keyfile: "/path/to/keyfile.json",
|
|
135
|
-
# service_name: "my-ruby-app",
|
|
136
|
-
# service_version: "v1"
|
|
137
|
-
# ```
|
|
138
|
-
#
|
|
139
|
-
# ### Using instrumentation with other Rack-based frameworks
|
|
140
|
-
#
|
|
141
|
-
# To install application instrumentation in an app using another Rack-based
|
|
142
|
-
# web framework, add this gem, `google-cloud-debugger`, to your Gemfile and
|
|
143
|
-
# update your bundle. Then add install the debugger middleware in your
|
|
144
|
-
# middleware stack. In most cases, this means adding these lines to your
|
|
145
|
-
# `config.ru` Rack configuration file:
|
|
146
|
-
#
|
|
147
|
-
# ```ruby
|
|
148
|
-
# require "google/cloud/debugger"
|
|
149
|
-
# use Google::Cloud::Debugger::Middleware
|
|
150
|
-
# ```
|
|
151
|
-
#
|
|
152
|
-
# Some web frameworks have an alternate mechanism for modifying the
|
|
153
|
-
# middleware stack. Consult your web framework's documentation for more
|
|
154
|
-
# information.
|
|
155
|
-
#
|
|
156
|
-
# ### The Stackdriver diagnostics suite
|
|
157
|
-
#
|
|
158
|
-
# The debugger library is part of the Stackdriver diagnostics suite, which
|
|
159
|
-
# also includes error reporting, log analysis, and tracing analysis. If you
|
|
160
|
-
# include the `stackdriver` gem in your Gemfile, this debugger library will
|
|
161
|
-
# be included automatically. In addition, if you include the `stackdriver`
|
|
162
|
-
# gem in an application using Ruby On Rails, the Railties will be installed
|
|
163
|
-
# automatically. See the documentation for the "stackdriver" gem
|
|
164
|
-
# for more details.
|
|
165
|
-
#
|
|
166
|
-
# ## Stackdriver Debugger API
|
|
167
|
-
#
|
|
168
|
-
# This library also includes an easy to use Ruby client for the
|
|
169
|
-
# Stackdriver Debugger API. This API provides calls to register debuggee
|
|
170
|
-
# application, as well as creating or modifying breakpoints.
|
|
171
|
-
#
|
|
172
|
-
# For further information on the Debugger API, see
|
|
173
|
-
# {Google::Cloud::Debugger::Project}
|
|
174
|
-
#
|
|
175
|
-
# ### Registering debuggee application
|
|
176
|
-
#
|
|
177
|
-
# ```ruby
|
|
178
|
-
# require "google/cloud/debugger/v2"
|
|
179
|
-
#
|
|
180
|
-
# Controller2Client = Google::Cloud::Debugger::V2::Controller2Client
|
|
181
|
-
# Debuggee = Google::Devtools::Clouddebugger::V2::Debuggee
|
|
182
|
-
#
|
|
183
|
-
# controller2_client = Controller2Client.new
|
|
184
|
-
# debuggee = Debuggee.new
|
|
185
|
-
# response = controller2_client.register_debuggee(debuggee)
|
|
186
|
-
# debuggee_id = response.debuggee.id
|
|
187
|
-
# ```
|
|
188
|
-
# See [Stackdriver Debugger Debuggee
|
|
189
|
-
# doc](https://cloud.google.com/debugger/api/reference/rpc/google.devtools.clouddebugger.v2#google.devtools.clouddebugger.v2.Debuggee)
|
|
190
|
-
# on fields necessary for registerying a debuggee.
|
|
191
|
-
#
|
|
192
|
-
# Upon successful registration, the response debuggee object will contain
|
|
193
|
-
# a debuggee_id that's later needed to interact with the other Stackdriver
|
|
194
|
-
# Debugger API.
|
|
195
|
-
#
|
|
196
|
-
# See {Google::Cloud::Debugger::V2::Controller2Client} for details.
|
|
197
|
-
#
|
|
198
|
-
# ### List Active Breakpoints
|
|
199
|
-
#
|
|
200
|
-
# ```ruby
|
|
201
|
-
# require "google/cloud/debugger/v2"
|
|
202
|
-
#
|
|
203
|
-
# Controller2Client = Google::Cloud::Debugger::V2::Controller2Client
|
|
204
|
-
# controller2_client = Controller2Client.new
|
|
205
|
-
#
|
|
206
|
-
# debuggee_id = ''
|
|
207
|
-
# response = controller2_client.list_active_breakpoints(debuggee_id)
|
|
208
|
-
# breakpoints = response.breakpoints
|
|
209
|
-
# ```
|
|
210
|
-
#
|
|
211
|
-
# See {Google::Cloud::Debugger::V2::Controller2Client} for details.
|
|
212
|
-
#
|
|
213
|
-
# ### Update Active Breakpoint
|
|
214
|
-
#
|
|
215
|
-
# Users can send custom snapshots for active breakpoints using this API.
|
|
216
|
-
#
|
|
217
|
-
# ```ruby
|
|
218
|
-
# require "google/cloud/debugger/v2"
|
|
219
|
-
#
|
|
220
|
-
# Breakpoint = Google::Devtools::Clouddebugger::V2::Breakpoint
|
|
221
|
-
# Controller2Client = Google::Cloud::Debugger::V2::Controller2Client
|
|
222
|
-
#
|
|
223
|
-
# controller2_client = Controller2Client.new
|
|
224
|
-
# debuggee_id = ''
|
|
225
|
-
# breakpoint = Breakpoint.new
|
|
226
|
-
# response =
|
|
227
|
-
# controller2_client.update_active_breakpoint(debuggee_id, breakpoint)
|
|
228
|
-
# ```
|
|
229
|
-
#
|
|
230
|
-
# See [Stackdriver Debugger Breakpoint
|
|
231
|
-
# doc](https://cloud.google.com/debugger/api/reference/rpc/google.devtools.clouddebugger.v2#google.devtools.clouddebugger.v2.Breakpoint)
|
|
232
|
-
# for all available fields for breakpoint.
|
|
233
|
-
#
|
|
234
|
-
# See {Google::Cloud::Debugger::V2::Controller2Client} for details.
|
|
235
|
-
#
|
|
236
|
-
# ### Set Breakpoint
|
|
237
|
-
#
|
|
238
|
-
# ```ruby
|
|
239
|
-
# require "google/cloud/debugger/v2"
|
|
240
|
-
#
|
|
241
|
-
# Breakpoint = Google::Devtools::Clouddebugger::V2::Breakpoint
|
|
242
|
-
# Debugger2Client = Google::Cloud::Debugger::V2::Debugger2Client
|
|
243
|
-
#
|
|
244
|
-
# debugger2_client = Debugger2Client.new
|
|
245
|
-
# debuggee_id = ''
|
|
246
|
-
# breakpoint = Breakpoint.new
|
|
247
|
-
# client_version = ''
|
|
248
|
-
# response = debugger2_client.set_breakpoint(
|
|
249
|
-
# debuggee_id, breakpoint, client_version)
|
|
250
|
-
# ```
|
|
251
|
-
#
|
|
252
|
-
# See [Stackdriver Debugger Breakpoint
|
|
253
|
-
# doc](https://cloud.google.com/debugger/api/reference/rpc/google.devtools.clouddebugger.v2#google.devtools.clouddebugger.v2.Breakpoint)
|
|
254
|
-
# for fields needed to specify breakpoint location.
|
|
255
|
-
#
|
|
256
|
-
# See {Google::Cloud::Debugger::V2::Debugger2Client} for details.
|
|
257
|
-
#
|
|
258
|
-
# ### Get Breakpoint
|
|
259
|
-
#
|
|
260
|
-
# ```ruby
|
|
261
|
-
# require "google/cloud/debugger/v2"
|
|
262
|
-
#
|
|
263
|
-
# Debugger2Client = Google::Cloud::Debugger::V2::Debugger2Client
|
|
264
|
-
#
|
|
265
|
-
# debugger2_client = Debugger2Client.new
|
|
266
|
-
# debuggee_id = ''
|
|
267
|
-
# breakpoint_id = ''
|
|
268
|
-
# client_version = ''
|
|
269
|
-
# response = debugger2_client.get_breakpoint(
|
|
270
|
-
# debuggee_id, breakpoint_id, client_version)
|
|
271
|
-
# ```
|
|
272
|
-
#
|
|
273
|
-
# See {Google::Cloud::Debugger::V2::Debugger2Client} for details.
|
|
274
|
-
#
|
|
275
|
-
# ### Delete Breakpoint
|
|
276
|
-
#
|
|
277
|
-
# ```ruby
|
|
278
|
-
# require "google/cloud/debugger/v2"
|
|
279
|
-
#
|
|
280
|
-
# Debugger2Client = Google::Cloud::Debugger::V2::Debugger2Client
|
|
281
|
-
#
|
|
282
|
-
# debugger2_client = Debugger2Client.new
|
|
283
|
-
# debuggee_id = ''
|
|
284
|
-
# breakpoint_id = ''
|
|
285
|
-
# client_version = ''
|
|
286
|
-
# debugger2_client.delete_breakpoint(
|
|
287
|
-
# debuggee_id, breakpoint_id, client_version)
|
|
288
|
-
# ```
|
|
289
|
-
#
|
|
290
|
-
# See {Google::Cloud::Debugger::V2::Debugger2Client} for details.
|
|
291
|
-
#
|
|
292
|
-
# ### List Breakpoints
|
|
293
|
-
#
|
|
294
|
-
# ```ruby
|
|
295
|
-
# require "google/cloud/debugger/v2"
|
|
296
|
-
#
|
|
297
|
-
# Debugger2Client = Google::Cloud::Debugger::V2::Debugger2Client
|
|
298
|
-
#
|
|
299
|
-
# Debugger2Client = Google::Cloud::Debugger::V2::Debugger2Client
|
|
300
|
-
#
|
|
301
|
-
# debugger2_client = Debugger2Client.new
|
|
302
|
-
# debuggee_id = ''
|
|
303
|
-
# client_version = ''
|
|
304
|
-
# response = debugger2_client.list_breakpoints(debuggee_id, client_version)
|
|
305
|
-
# ```
|
|
306
|
-
#
|
|
307
|
-
# See {Google::Cloud::Debugger::V2::Debugger2Client} for details.
|
|
308
|
-
#
|
|
309
|
-
# ### List Debuggees
|
|
310
|
-
#
|
|
311
|
-
# ```ruby
|
|
312
|
-
# require "google/cloud/debugger/v2"
|
|
313
|
-
#
|
|
314
|
-
# Debugger2Client = Google::Cloud::Debugger::V2::Debugger2Client
|
|
315
|
-
#
|
|
316
|
-
# debugger2_client = Debugger2Client.new
|
|
317
|
-
# project = ''
|
|
318
|
-
# client_version = ''
|
|
319
|
-
# response = debugger2_client.list_debuggees(project, client_version)
|
|
320
|
-
# ```
|
|
321
|
-
#
|
|
322
|
-
# See {Google::Cloud::Debugger::V2::Debugger2Client} for details.
|
|
323
|
-
#
|
|
324
|
-
# ## Enabling Logging
|
|
325
|
-
#
|
|
326
|
-
# To enable logging for this library, set the logger for the underlying
|
|
327
|
-
# [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. The
|
|
328
|
-
# logger that you set may be a Ruby stdlib
|
|
329
|
-
# [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html)
|
|
330
|
-
# as shown below, or a
|
|
331
|
-
# [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
|
332
|
-
# that will write logs to [Stackdriver
|
|
333
|
-
# Logging](https://cloud.google.com/logging/). See
|
|
334
|
-
# [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
|
335
|
-
# and the gRPC
|
|
336
|
-
# [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb)
|
|
337
|
-
# for additional information.
|
|
338
|
-
#
|
|
339
|
-
# Configuring a Ruby stdlib logger:
|
|
340
|
-
#
|
|
341
|
-
# ```ruby
|
|
342
|
-
# require "logger"
|
|
343
|
-
#
|
|
344
|
-
# module MyLogger
|
|
345
|
-
# LOGGER = Logger.new $stderr, level: Logger::WARN
|
|
346
|
-
# def logger
|
|
347
|
-
# LOGGER
|
|
348
|
-
# end
|
|
349
|
-
# end
|
|
350
|
-
#
|
|
351
|
-
# # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
|
352
|
-
# module GRPC
|
|
353
|
-
# extend MyLogger
|
|
354
|
-
# end
|
|
355
|
-
# ```
|
|
36
|
+
# See {file:OVERVIEW.md Debugger Overview}.
|
|
356
37
|
#
|
|
357
38
|
module Debugger
|
|
358
39
|
# rubocop:disable all
|
|
@@ -363,8 +44,7 @@ module Google
|
|
|
363
44
|
# connection service.
|
|
364
45
|
#
|
|
365
46
|
# For more information on connecting to Google Cloud see the
|
|
366
|
-
#
|
|
367
|
-
# Guide](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/guides/authentication).
|
|
47
|
+
# {file:AUTHENTICATION.md Authentication Guide}.
|
|
368
48
|
#
|
|
369
49
|
# @param [String] project_id Project identifier for the Stackdriver
|
|
370
50
|
# Debugger service you are connecting to. If not present, the default
|
|
@@ -469,7 +149,7 @@ module Google
|
|
|
469
149
|
# expression evaluation. Defaults to 0.05.
|
|
470
150
|
#
|
|
471
151
|
# See the [Configuration
|
|
472
|
-
# Guide](https://googlecloudplatform.github.io/google-cloud-ruby
|
|
152
|
+
# Guide](https://googlecloudplatform.github.io/google-cloud-ruby/docs/stackdriver/latest/file.INSTRUMENTATION_CONFIGURATION)
|
|
473
153
|
# for full configuration parameters.
|
|
474
154
|
#
|
|
475
155
|
# @return [Google::Cloud::Config] The configuration object the
|
|
@@ -97,9 +97,9 @@ module Google
|
|
|
97
97
|
# @param [Google::Cloud::Debugger::Project] debugger A debugger to be
|
|
98
98
|
# used by this middleware. If not given, will construct a new one
|
|
99
99
|
# using the other parameters.
|
|
100
|
-
# @param [Hash]
|
|
101
|
-
#
|
|
102
|
-
# Guide](https://googlecloudplatform.github.io/google-cloud-ruby
|
|
100
|
+
# @param [Hash] kwargs Hash of configuration settings. Used for backward
|
|
101
|
+
# API compatibility. See the [Configuration
|
|
102
|
+
# Guide](https://googlecloudplatform.github.io/google-cloud-ruby/docs/stackdriver/latest/file.INSTRUMENTATION_CONFIGURATION)
|
|
103
103
|
# for the prefered way to set configuration parameters.
|
|
104
104
|
#
|
|
105
105
|
# @return [Google::Cloud::Debugger::Middleware] A new
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
+
|
|
15
16
|
require "google/cloud/debugger"
|
|
16
17
|
|
|
17
18
|
module Google
|
|
@@ -33,7 +34,7 @@ module Google
|
|
|
33
34
|
#
|
|
34
35
|
# The Railtie should also initialize a debugger to be used by the
|
|
35
36
|
# Middleware. See the [Configuration
|
|
36
|
-
# Guide](https://googlecloudplatform.github.io/google-cloud-ruby
|
|
37
|
+
# Guide](https://googlecloudplatform.github.io/google-cloud-ruby/docs/stackdriver/latest/file.INSTRUMENTATION_CONFIGURATION)
|
|
37
38
|
# on how to configure the Railtie and Middleware.
|
|
38
39
|
#
|
|
39
40
|
class Railtie < ::Rails::Railtie
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
+
|
|
15
16
|
require "google/cloud/debugger/v2/debugger2_client"
|
|
16
17
|
require "google/cloud/debugger/v2/controller2_client"
|
|
17
18
|
|
|
@@ -37,6 +38,11 @@ module Google
|
|
|
37
38
|
# 3. [Enable the Stackdriver Debugger API.](https://console.cloud.google.com/apis/library/clouddebugger.googleapis.com)
|
|
38
39
|
# 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
|
39
40
|
#
|
|
41
|
+
# ### Installation
|
|
42
|
+
# ```
|
|
43
|
+
# $ gem install google-cloud-debugger
|
|
44
|
+
# ```
|
|
45
|
+
#
|
|
40
46
|
# ### Next Steps
|
|
41
47
|
# - Read the [Stackdriver Debugger API Product documentation][Product Documentation]
|
|
42
48
|
# to learn more about the product and see How-to Guides.
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
# For the short term, the refresh process will only be runnable by Google
|
|
20
20
|
# engineers.
|
|
21
21
|
|
|
22
|
+
|
|
22
23
|
require "json"
|
|
23
24
|
require "pathname"
|
|
24
25
|
|
|
@@ -55,6 +56,7 @@ module Google
|
|
|
55
56
|
# @!attribute [r] controller2_stub
|
|
56
57
|
# @return [Google::Devtools::Clouddebugger::V2::Controller2::Stub]
|
|
57
58
|
class Controller2Client
|
|
59
|
+
# @private
|
|
58
60
|
attr_reader :controller2_stub
|
|
59
61
|
|
|
60
62
|
# The default address of the service.
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
# For the short term, the refresh process will only be runnable by Google
|
|
20
20
|
# engineers.
|
|
21
21
|
|
|
22
|
+
|
|
22
23
|
require "json"
|
|
23
24
|
require "pathname"
|
|
24
25
|
|
|
@@ -47,6 +48,7 @@ module Google
|
|
|
47
48
|
# @!attribute [r] debugger2_stub
|
|
48
49
|
# @return [Google::Devtools::Clouddebugger::V2::Debugger2::Stub]
|
|
49
50
|
class Debugger2Client
|
|
51
|
+
# @private
|
|
50
52
|
attr_reader :debugger2_stub
|
|
51
53
|
|
|
52
54
|
# The default address of the service.
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
+
|
|
15
16
|
module Google
|
|
16
17
|
module Protobuf
|
|
17
18
|
# A Timestamp represents a point in time independent of any time zone
|
|
@@ -72,12 +73,14 @@ module Google
|
|
|
72
73
|
#
|
|
73
74
|
# In JSON format, the Timestamp type is encoded as a string in the
|
|
74
75
|
# [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
|
|
75
|
-
# format is "{year}
|
|
76
|
-
# where {year} is always expressed using four digits while {month}, {day},
|
|
77
|
-
# {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
|
|
76
|
+
# format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z"
|
|
77
|
+
# where \\{year} is always expressed using four digits while \\{month}, \\{day},
|
|
78
|
+
# \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional
|
|
78
79
|
# seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
|
|
79
80
|
# are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
|
|
80
|
-
# is required
|
|
81
|
+
# is required. A proto3 JSON serializer should always use UTC (as indicated by
|
|
82
|
+
# "Z") when printing the Timestamp type and a proto3 JSON parser should be
|
|
83
|
+
# able to accept both UTC and other timezones (as indicated by an offset).
|
|
81
84
|
#
|
|
82
85
|
# For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
|
|
83
86
|
# 01:30 UTC on January 15, 2017.
|
|
@@ -88,8 +91,8 @@ module Google
|
|
|
88
91
|
# to this format using [+strftime+](https://docs.python.org/2/library/time.html#time.strftime)
|
|
89
92
|
# with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
|
|
90
93
|
# can use the Joda Time's [+ISODateTimeFormat.dateTime()+](
|
|
91
|
-
# http://joda-time
|
|
92
|
-
# to obtain a formatter capable of generating timestamps in this format.
|
|
94
|
+
# http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
|
|
95
|
+
# ) to obtain a formatter capable of generating timestamps in this format.
|
|
93
96
|
# @!attribute [rw] seconds
|
|
94
97
|
# @return [Integer]
|
|
95
98
|
# Represents seconds of UTC time since Unix epoch
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google-cloud-debugger
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.32.
|
|
4
|
+
version: 0.32.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Heng Xiong
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-09-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: binding_of_caller
|