google-cloud-debugger 0.35.2 → 0.40.0
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/AUTHENTICATION.md +2 -1
- data/CHANGELOG.md +47 -0
- data/OVERVIEW.md +28 -59
- data/TROUBLESHOOTING.md +2 -8
- data/ext/google/cloud/debugger/debugger_c/tracer.c +8 -33
- data/lib/google-cloud-debugger.rb +13 -15
- data/lib/google/cloud/debugger.rb +18 -16
- data/lib/google/cloud/debugger/breakpoint.rb +8 -8
- data/lib/google/cloud/debugger/breakpoint/evaluator.rb +1 -1
- data/lib/google/cloud/debugger/breakpoint/source_location.rb +3 -3
- data/lib/google/cloud/debugger/breakpoint/stack_frame.rb +5 -5
- data/lib/google/cloud/debugger/breakpoint/status_message.rb +4 -6
- data/lib/google/cloud/debugger/breakpoint/variable.rb +5 -5
- data/lib/google/cloud/debugger/credentials.rb +9 -6
- data/lib/google/cloud/debugger/debuggee.rb +4 -4
- data/lib/google/cloud/debugger/service.rb +25 -66
- data/lib/google/cloud/debugger/version.rb +1 -1
- metadata +12 -70
- data/lib/google/cloud/debugger/v2.rb +0 -243
- data/lib/google/cloud/debugger/v2/controller2_client.rb +0 -370
- data/lib/google/cloud/debugger/v2/controller2_client_config.json +0 -41
- data/lib/google/cloud/debugger/v2/credentials.rb +0 -42
- data/lib/google/cloud/debugger/v2/debugger2_client.rb +0 -478
- data/lib/google/cloud/debugger/v2/debugger2_client_config.json +0 -51
- data/lib/google/cloud/debugger/v2/doc/google/devtools/clouddebugger/v2/controller.rb +0 -91
- data/lib/google/cloud/debugger/v2/doc/google/devtools/clouddebugger/v2/data.rb +0 -443
- data/lib/google/cloud/debugger/v2/doc/google/devtools/clouddebugger/v2/debugger.rb +0 -151
- data/lib/google/cloud/debugger/v2/doc/google/devtools/source/v1/source_context.rb +0 -162
- data/lib/google/cloud/debugger/v2/doc/google/protobuf/empty.rb +0 -29
- data/lib/google/cloud/debugger/v2/doc/google/protobuf/timestamp.rb +0 -113
- data/lib/google/devtools/clouddebugger/v2/controller_pb.rb +0 -50
- data/lib/google/devtools/clouddebugger/v2/controller_services_pb.rb +0 -98
- data/lib/google/devtools/clouddebugger/v2/data_pb.rb +0 -108
- data/lib/google/devtools/clouddebugger/v2/debugger_pb.rb +0 -77
- data/lib/google/devtools/clouddebugger/v2/debugger_services_pb.rb +0 -66
- data/lib/google/devtools/source/v1/source_context_pb.rb +0 -90
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b4ce08aa3118de8cc2a1afe7874ca26f6d97a7922f84471caef85fe0aed3640
|
4
|
+
data.tar.gz: a6bc54a758686120fe5898e69179994e3325e72adf5c9e3b8ef4b0b010a5c9d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 150edcd3b7d9c16480900ac16d22925eaf08c1629ac40c601d308da5e3db74237dbacd6510c9357861650d8fe519239c53c361448e3f6d005058313c1e442909
|
7
|
+
data.tar.gz: ce89d0b2545e87b7587b8887a6eafe1dead96614616437ce2709f60a83780a38607990687caf74398a219093d019f68bcd615aac469e1b35efec732c71141508
|
data/AUTHENTICATION.md
CHANGED
@@ -76,7 +76,8 @@ The environment variables that google-cloud-debugger checks for project ID are:
|
|
76
76
|
1. `DEBUGGER_PROJECT`
|
77
77
|
2. `GOOGLE_CLOUD_PROJECT`
|
78
78
|
|
79
|
-
The environment variables that google-cloud-debugger checks for credentials are
|
79
|
+
The environment variables that google-cloud-debugger checks for credentials are
|
80
|
+
configured on `Google::Cloud::Debugger::V2::Debugger::Credentials`:
|
80
81
|
|
81
82
|
1. `DEBUGGER_CREDENTIALS` - Path to JSON file, or JSON contents
|
82
83
|
2. `DEBUGGER_KEYFILE` - Path to JSON file, or JSON contents
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,52 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 0.40.0 / 2020-07-21
|
4
|
+
|
5
|
+
This is a major update that removes the "low-level" client interface code, and
|
6
|
+
instead adds the new `google-cloud-debugger-v2` gem as a dependency.
|
7
|
+
The new dependency is a rewritten low-level client, produced by a next-
|
8
|
+
generation client code generator, with improved performance and stability.
|
9
|
+
|
10
|
+
This change should have no effect on the high-level interface that most users
|
11
|
+
will use. The one exception is that the (mostly undocumented) `client_config`
|
12
|
+
argument, for adjusting low-level parameters such as RPC retry settings on
|
13
|
+
client objects, has been removed. If you need to adjust these parameters, use
|
14
|
+
the configuration interface in `google-cloud-debugger-v2`.
|
15
|
+
|
16
|
+
Substantial changes have been made in the low-level interfaces, however. If you
|
17
|
+
are using the low-level classes under the `Google::Cloud::Debugger::V2` module,
|
18
|
+
please review the docs for the new `google-cloud-debugger-v2` gem. In
|
19
|
+
particular:
|
20
|
+
|
21
|
+
* Some classes have been renamed, notably the client class itself.
|
22
|
+
* The client constructor takes a configuration block instead of configuration
|
23
|
+
keyword arguments.
|
24
|
+
* All RPC method arguments are now keyword arguments.
|
25
|
+
|
26
|
+
### 0.36.3 / 2020-07-06
|
27
|
+
|
28
|
+
#### Bug Fixes
|
29
|
+
|
30
|
+
* Fix segfaults on Ruby 2.7
|
31
|
+
|
32
|
+
### 0.36.2 / 2020-05-28
|
33
|
+
|
34
|
+
#### Documentation
|
35
|
+
|
36
|
+
* Fix a few broken links
|
37
|
+
|
38
|
+
### 0.36.1 / 2020-05-19
|
39
|
+
|
40
|
+
#### Bug Fixes
|
41
|
+
|
42
|
+
* Adjusted some default timeout and retry settings
|
43
|
+
|
44
|
+
### 0.36.0 / 2020-03-11
|
45
|
+
|
46
|
+
#### Features
|
47
|
+
|
48
|
+
* Support separate project setting for quota/billing
|
49
|
+
|
3
50
|
### 0.35.2 / 2020-01-23
|
4
51
|
|
5
52
|
#### Documentation
|
data/OVERVIEW.md
CHANGED
@@ -147,12 +147,9 @@ For further information on the Debugger API, see
|
|
147
147
|
```ruby
|
148
148
|
require "google/cloud/debugger/v2"
|
149
149
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
controller2_client = Controller2Client.new
|
154
|
-
debuggee = Debuggee.new
|
155
|
-
response = controller2_client.register_debuggee(debuggee)
|
150
|
+
controller_client = Google::Cloud::Debugger::V2::Controller::Client.new
|
151
|
+
debuggee = Google::Cloud::Debugger::V2::Debuggee.new
|
152
|
+
response = controller_client.register_debuggee debuggee: debuggee
|
156
153
|
debuggee_id = response.debuggee.id
|
157
154
|
```
|
158
155
|
See [Stackdriver Debugger Debuggee
|
@@ -163,23 +160,18 @@ Upon successful registration, the response debuggee object will contain a
|
|
163
160
|
debuggee_id that's later needed to interact with the other Stackdriver Debugger
|
164
161
|
API.
|
165
162
|
|
166
|
-
See {Google::Cloud::Debugger::V2::Controller2Client} for details.
|
167
|
-
|
168
163
|
### List Active Breakpoints
|
169
164
|
|
170
165
|
```ruby
|
171
166
|
require "google/cloud/debugger/v2"
|
172
167
|
|
173
|
-
|
174
|
-
controller2_client = Controller2Client.new
|
168
|
+
controller_client = Google::Cloud::Debugger::V2::Controller::Client.new
|
175
169
|
|
176
170
|
debuggee_id = ''
|
177
|
-
response =
|
171
|
+
response = controller_client.list_active_breakpoints debuggee_id: debuggee_id
|
178
172
|
breakpoints = response.breakpoints
|
179
173
|
```
|
180
174
|
|
181
|
-
See {Google::Cloud::Debugger::V2::Controller2Client} for details.
|
182
|
-
|
183
175
|
### Update Active Breakpoint
|
184
176
|
|
185
177
|
Users can send custom snapshots for active breakpoints using this API.
|
@@ -187,110 +179,87 @@ Users can send custom snapshots for active breakpoints using this API.
|
|
187
179
|
```ruby
|
188
180
|
require "google/cloud/debugger/v2"
|
189
181
|
|
190
|
-
|
191
|
-
Controller2Client = Google::Cloud::Debugger::V2::Controller2Client
|
192
|
-
|
193
|
-
controller2_client = Controller2Client.new
|
182
|
+
controller_client = Google::Cloud::Debugger::V2::Controller::Client.new
|
194
183
|
debuggee_id = ''
|
195
|
-
breakpoint = Breakpoint.new
|
196
|
-
response =
|
197
|
-
|
184
|
+
breakpoint = Google::Cloud::Debugger::V2::Breakpoint.new
|
185
|
+
response = controller_client.update_active_breakpoint(
|
186
|
+
debuggee_id: debuggee_id, breakpoint: breakpoint)
|
198
187
|
```
|
199
188
|
|
200
189
|
See [Stackdriver Debugger Breakpoint
|
201
190
|
doc](https://cloud.google.com/debugger/api/reference/rpc/google.devtools.clouddebugger.v2#google.devtools.clouddebugger.v2.Breakpoint)
|
202
191
|
for all available fields for breakpoint.
|
203
192
|
|
204
|
-
See {Google::Cloud::Debugger::V2::Controller2Client} for details.
|
205
|
-
|
206
193
|
### Set Breakpoint
|
207
194
|
|
208
195
|
```ruby
|
209
196
|
require "google/cloud/debugger/v2"
|
210
197
|
|
211
|
-
|
212
|
-
Debugger2Client = Google::Cloud::Debugger::V2::Debugger2Client
|
213
|
-
|
214
|
-
debugger2_client = Debugger2Client.new
|
198
|
+
debugger_client = Google::Cloud::Debugger::V2::Debugger::Client.new
|
215
199
|
debuggee_id = ''
|
216
|
-
breakpoint = Breakpoint.new
|
200
|
+
breakpoint = Google::Cloud::Debugger::V2::Breakpoint.new
|
217
201
|
client_version = ''
|
218
|
-
response =
|
219
|
-
|
202
|
+
response = debugger_client.set_breakpoint(
|
203
|
+
debuggee_id: debuggee_id, breakpoint: breakpoint,
|
204
|
+
client_version: client_version)
|
220
205
|
```
|
221
206
|
|
222
207
|
See [Stackdriver Debugger Breakpoint
|
223
208
|
doc](https://cloud.google.com/debugger/api/reference/rpc/google.devtools.clouddebugger.v2#google.devtools.clouddebugger.v2.Breakpoint)
|
224
209
|
for fields needed to specify breakpoint location.
|
225
210
|
|
226
|
-
See {Google::Cloud::Debugger::V2::Debugger2Client} for details.
|
227
|
-
|
228
211
|
### Get Breakpoint
|
229
212
|
|
230
213
|
```ruby
|
231
214
|
require "google/cloud/debugger/v2"
|
232
215
|
|
233
|
-
|
234
|
-
|
235
|
-
debugger2_client = Debugger2Client.new
|
216
|
+
debugger_client = Google::Cloud::Debugger::V2::Debugger::Client.new
|
236
217
|
debuggee_id = ''
|
237
218
|
breakpoint_id = ''
|
238
219
|
client_version = ''
|
239
|
-
response =
|
240
|
-
|
220
|
+
response = debugger_client.get_breakpoint(
|
221
|
+
debuggee_id: debuggee_id, breakpoint_id: breakpoint_id,
|
222
|
+
client_version: client_version)
|
241
223
|
```
|
242
224
|
|
243
|
-
See {Google::Cloud::Debugger::V2::Debugger2Client} for details.
|
244
|
-
|
245
225
|
### Delete Breakpoint
|
246
226
|
|
247
227
|
```ruby
|
248
228
|
require "google/cloud/debugger/v2"
|
249
229
|
|
250
|
-
|
251
|
-
|
252
|
-
debugger2_client = Debugger2Client.new
|
230
|
+
debugger_client = Google::Cloud::Debugger::V2::Debugger::Client.new
|
253
231
|
debuggee_id = ''
|
254
232
|
breakpoint_id = ''
|
255
233
|
client_version = ''
|
256
|
-
|
257
|
-
debuggee_id, breakpoint_id,
|
234
|
+
debugger_client.delete_breakpoint(
|
235
|
+
debuggee_id: debuggee_id, breakpoint_id: breakpoint_id,
|
236
|
+
client_version: client_version)
|
258
237
|
```
|
259
238
|
|
260
|
-
See {Google::Cloud::Debugger::V2::Debugger2Client} for details.
|
261
|
-
|
262
239
|
### List Breakpoints
|
263
240
|
|
264
241
|
```ruby
|
265
242
|
require "google/cloud/debugger/v2"
|
266
243
|
|
267
|
-
|
268
|
-
|
269
|
-
Debugger2Client = Google::Cloud::Debugger::V2::Debugger2Client
|
270
|
-
|
271
|
-
debugger2_client = Debugger2Client.new
|
244
|
+
debugger_client = Google::Cloud::Debugger::V2::Debugger::Client.new
|
272
245
|
debuggee_id = ''
|
273
246
|
client_version = ''
|
274
|
-
response =
|
247
|
+
response = debugger_client.list_breakpoints(
|
248
|
+
debuggee_id: debuggee_id, client_version: client_version)
|
275
249
|
```
|
276
250
|
|
277
|
-
See {Google::Cloud::Debugger::V2::Debugger2Client} for details.
|
278
|
-
|
279
251
|
### List Debuggees
|
280
252
|
|
281
253
|
```ruby
|
282
254
|
require "google/cloud/debugger/v2"
|
283
255
|
|
284
|
-
|
285
|
-
|
286
|
-
debugger2_client = Debugger2Client.new
|
256
|
+
debugger_client = Google::Cloud::Debugger::V2::Debugger::Client.new
|
287
257
|
project = ''
|
288
258
|
client_version = ''
|
289
|
-
response =
|
259
|
+
response = debugger_client.list_debuggees(
|
260
|
+
project: project, client_version: client_version)
|
290
261
|
```
|
291
262
|
|
292
|
-
See {Google::Cloud::Debugger::V2::Debugger2Client} for details.
|
293
|
-
|
294
263
|
## Additional information
|
295
264
|
|
296
265
|
Stackdriver Debugger can be configured to use gRPC's logging. To learn more, see
|
data/TROUBLESHOOTING.md
CHANGED
@@ -24,14 +24,8 @@ improved, *please* create a new issue on GitHub so we can talk about it.
|
|
24
24
|
|
25
25
|
- [New issue][gh-ruby]
|
26
26
|
|
27
|
-
Or, you can ask questions on the [Google Cloud Platform Slack][slack-ruby]. You
|
28
|
-
can use the "ruby" channel for general Ruby questions, or use the
|
29
|
-
"google-cloud-ruby" channel if you have questions about this gem in particular.
|
30
|
-
|
31
27
|
[so-ruby]: http://stackoverflow.com/questions/tagged/google-cloud-platform+ruby+debugger
|
32
28
|
|
33
|
-
[gh-search-ruby]: https://github.com/
|
34
|
-
|
35
|
-
[gh-ruby]: https://github.com/googlecloudplatform/google-cloud-ruby/issues/new
|
29
|
+
[gh-search-ruby]: https://github.com/googleapis/google-cloud-ruby/issues?q=label%3A%22api%3A+debugger%22
|
36
30
|
|
37
|
-
[
|
31
|
+
[gh-ruby]: https://github.com/googleapis/google-cloud-ruby/issues/new
|
@@ -208,25 +208,19 @@ line_trace_callback(rb_event_flag_t event, VALUE data, VALUE obj, ID mid, VALUE
|
|
208
208
|
static VALUE
|
209
209
|
disable_line_trace_for_thread(VALUE thread)
|
210
210
|
{
|
211
|
-
VALUE thread_variables_hash;
|
212
211
|
VALUE line_trace_set;
|
213
|
-
ID locals_id;
|
214
212
|
ID line_trace_thread_id;
|
215
|
-
VALUE line_trace_thread_flag;
|
216
213
|
|
217
|
-
CONST_ID(locals_id, "locals");
|
218
214
|
CONST_ID(line_trace_thread_id, "gcloud_line_trace_set");
|
219
|
-
line_trace_thread_flag = ID2SYM(line_trace_thread_id);
|
220
215
|
|
221
216
|
if (!RTEST(thread)) {
|
222
217
|
thread = rb_thread_current();
|
223
218
|
}
|
224
|
-
|
225
|
-
line_trace_set = rb_hash_aref(thread_variables_hash, line_trace_thread_flag);
|
219
|
+
line_trace_set = rb_ivar_get(thread, line_trace_thread_id);
|
226
220
|
|
227
221
|
if (RTEST(line_trace_set)) {
|
228
222
|
rb_thread_remove_event_hook(thread, line_trace_callback);
|
229
|
-
|
223
|
+
rb_ivar_set(thread, line_trace_thread_id, Qfalse);
|
230
224
|
}
|
231
225
|
|
232
226
|
return Qnil;
|
@@ -241,23 +235,17 @@ static VALUE
|
|
241
235
|
enable_line_trace_for_thread(VALUE self)
|
242
236
|
{
|
243
237
|
VALUE current_thread;
|
244
|
-
VALUE thread_variables_hash;
|
245
238
|
VALUE line_trace_set;
|
246
|
-
ID locals_id;
|
247
239
|
ID line_trace_thread_id;
|
248
|
-
VALUE line_trace_thread_flag;
|
249
240
|
|
250
|
-
CONST_ID(locals_id, "locals");
|
251
241
|
CONST_ID(line_trace_thread_id, "gcloud_line_trace_set");
|
252
|
-
line_trace_thread_flag = ID2SYM(line_trace_thread_id);
|
253
242
|
|
254
243
|
current_thread = rb_thread_current();
|
255
|
-
|
256
|
-
line_trace_set = rb_hash_aref(thread_variables_hash, line_trace_thread_flag);
|
244
|
+
line_trace_set = rb_ivar_get(current_thread, line_trace_thread_id);
|
257
245
|
|
258
246
|
if (!RTEST(line_trace_set)) {
|
259
247
|
rb_thread_add_event_hook(current_thread, line_trace_callback, RUBY_EVENT_LINE, self);
|
260
|
-
|
248
|
+
rb_ivar_set(current_thread, line_trace_thread_id, Qtrue);
|
261
249
|
}
|
262
250
|
|
263
251
|
return Qnil;
|
@@ -331,25 +319,19 @@ return_trace_callback(void *data, rb_trace_arg_t *trace_arg)
|
|
331
319
|
static VALUE
|
332
320
|
disable_return_trace_for_thread(VALUE thread)
|
333
321
|
{
|
334
|
-
VALUE thread_variables_hash;
|
335
322
|
VALUE return_trace_set;
|
336
|
-
ID locals_id;
|
337
323
|
ID return_trace_thread_id;
|
338
|
-
VALUE return_trace_thread_flag;
|
339
324
|
|
340
|
-
CONST_ID(locals_id, "locals");
|
341
325
|
CONST_ID(return_trace_thread_id, "gcloud_return_trace_set");
|
342
|
-
return_trace_thread_flag = ID2SYM(return_trace_thread_id);
|
343
326
|
|
344
327
|
if (!RTEST(thread)) {
|
345
328
|
thread = rb_thread_current();
|
346
329
|
}
|
347
|
-
|
348
|
-
return_trace_set = rb_hash_aref(thread_variables_hash, return_trace_thread_flag);
|
330
|
+
return_trace_set = rb_ivar_get(thread, return_trace_thread_id);
|
349
331
|
|
350
332
|
if (RTEST(return_trace_set)) {
|
351
333
|
rb_thread_remove_event_hook(thread, (rb_event_hook_func_t)return_trace_callback);
|
352
|
-
|
334
|
+
rb_ivar_set(thread, return_trace_thread_id, Qfalse);
|
353
335
|
}
|
354
336
|
|
355
337
|
return Qnil;
|
@@ -364,24 +346,17 @@ static VALUE
|
|
364
346
|
enable_return_trace_for_thread(VALUE self)
|
365
347
|
{
|
366
348
|
VALUE current_thread;
|
367
|
-
VALUE thread_variables_hash;
|
368
349
|
VALUE return_trace_set;
|
369
|
-
|
370
|
-
ID locals_id;
|
371
350
|
ID return_trace_thread_id;
|
372
|
-
VALUE return_trace_thread_flag;
|
373
351
|
|
374
|
-
CONST_ID(locals_id, "locals");
|
375
352
|
CONST_ID(return_trace_thread_id, "gcloud_return_trace_set");
|
376
|
-
return_trace_thread_flag = ID2SYM(return_trace_thread_id);
|
377
353
|
|
378
354
|
current_thread = rb_thread_current();
|
379
|
-
|
380
|
-
return_trace_set = rb_hash_aref(thread_variables_hash, return_trace_thread_flag);
|
355
|
+
return_trace_set = rb_ivar_get(current_thread, return_trace_thread_id);
|
381
356
|
|
382
357
|
if (!RTEST(return_trace_set)) {
|
383
358
|
rb_thread_add_event_hook2(current_thread, (rb_event_hook_func_t)return_trace_callback, RETURN_TRACEPOINT_EVENTS, self, RUBY_EVENT_HOOK_FLAG_RAW_ARG | RUBY_EVENT_HOOK_FLAG_SAFE);
|
384
|
-
|
359
|
+
rb_ivar_set(current_thread, return_trace_thread_id, Qtrue);
|
385
360
|
}
|
386
361
|
|
387
362
|
return Qnil;
|
@@ -48,8 +48,6 @@ module Google
|
|
48
48
|
# * `https://www.googleapis.com/auth/logging.admin`
|
49
49
|
#
|
50
50
|
# @param [Integer] timeout Default timeout to use in requests. Optional.
|
51
|
-
# @param [Hash] client_config A hash of values to override the default
|
52
|
-
# behavior of the API client. Optional.
|
53
51
|
#
|
54
52
|
# @return [Google::Cloud::Debugger::Project]
|
55
53
|
#
|
@@ -68,14 +66,12 @@ module Google
|
|
68
66
|
# platform_scope = "https://www.googleapis.com/auth/cloud-platform"
|
69
67
|
# debugger = gcloud.debugger scope: platform_scope
|
70
68
|
#
|
71
|
-
def debugger service_name: nil, service_version: nil, scope: nil,
|
72
|
-
timeout: nil, client_config: nil
|
69
|
+
def debugger service_name: nil, service_version: nil, scope: nil, timeout: nil
|
73
70
|
Google::Cloud.debugger @project, @keyfile,
|
74
71
|
service_name: service_name,
|
75
72
|
service_version: service_version,
|
76
73
|
scope: scope,
|
77
|
-
timeout: (timeout || @timeout)
|
78
|
-
client_config: client_config
|
74
|
+
timeout: (timeout || @timeout)
|
79
75
|
end
|
80
76
|
|
81
77
|
##
|
@@ -105,8 +101,6 @@ module Google
|
|
105
101
|
# * `https://www.googleapis.com/auth/logging.admin`
|
106
102
|
#
|
107
103
|
# @param [Integer] timeout Default timeout to use in requests. Optional.
|
108
|
-
# @param [Hash] client_config A hash of values to override the default
|
109
|
-
# behavior of the API client. Optional.
|
110
104
|
#
|
111
105
|
# @return [Google::Cloud::Debugger::Project]
|
112
106
|
#
|
@@ -118,15 +112,13 @@ module Google
|
|
118
112
|
# debugger.start
|
119
113
|
#
|
120
114
|
def self.debugger project_id = nil, credentials = nil, service_name: nil,
|
121
|
-
service_version: nil, scope: nil, timeout: nil
|
122
|
-
client_config: nil
|
115
|
+
service_version: nil, scope: nil, timeout: nil
|
123
116
|
require "google/cloud/debugger"
|
124
117
|
Google::Cloud::Debugger.new project_id: project_id,
|
125
118
|
credentials: credentials,
|
126
119
|
service_name: service_name,
|
127
120
|
service_version: service_version,
|
128
|
-
scope: scope, timeout: timeout
|
129
|
-
client_config: client_config
|
121
|
+
scope: scope, timeout: timeout
|
130
122
|
end
|
131
123
|
end
|
132
124
|
end
|
@@ -160,6 +152,13 @@ Google::Cloud.configure.add_config! :debugger do |config|
|
|
160
152
|
default_version = Google::Cloud::Config.deferred do
|
161
153
|
ENV["DEBUGGER_SERVICE_VERSION"]
|
162
154
|
end
|
155
|
+
default_scopes = [
|
156
|
+
"https://www.googleapis.com/auth/cloud-platform",
|
157
|
+
"https://www.googleapis.com/auth/cloud_debugger",
|
158
|
+
"https://www.googleapis.com/auth/logging.admin",
|
159
|
+
"https://www.googleapis.com/auth/logging.read",
|
160
|
+
"https://www.googleapis.com/auth/logging.write"
|
161
|
+
]
|
163
162
|
|
164
163
|
config.add_field! :project_id, default_project, match: String, allow_nil: true
|
165
164
|
config.add_alias! :project, :project_id
|
@@ -173,10 +172,9 @@ Google::Cloud.configure.add_config! :debugger do |config|
|
|
173
172
|
match: String, allow_nil: true
|
174
173
|
config.add_field! :app_root, nil, match: String
|
175
174
|
config.add_field! :root, nil, match: String
|
176
|
-
config.add_field! :scope,
|
175
|
+
config.add_field! :scope, default_scopes, match: [String, Array]
|
177
176
|
config.add_field! :timeout, nil, match: Integer
|
178
|
-
config.add_field! :
|
179
|
-
config.add_field! :endpoint, nil, match: String
|
177
|
+
config.add_field! :endpoint, "clouddebugger.googleapis.com", match: String
|
180
178
|
config.add_field! :allow_mutating_methods, false
|
181
179
|
config.add_field! :evaluation_time_limit, 0.05, match: Numeric
|
182
180
|
config.add_field! :on_error, nil, match: Proc
|