google-cloud-profiler-v2 0.8.0 → 0.10.1
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 +72 -101
- data/README.md +2 -2
- data/lib/google/cloud/profiler/v2/export_service/client.rb +37 -10
- data/lib/google/cloud/profiler/v2/export_service/rest/client.rb +39 -9
- data/lib/google/cloud/profiler/v2/export_service/rest/service_stub.rb +23 -2
- data/lib/google/cloud/profiler/v2/profiler_service/client.rb +60 -17
- data/lib/google/cloud/profiler/v2/profiler_service/rest/client.rb +62 -16
- data/lib/google/cloud/profiler/v2/profiler_service/rest/service_stub.rb +23 -2
- data/lib/google/cloud/profiler/v2/profiler_service/rest.rb +2 -3
- data/lib/google/cloud/profiler/v2/profiler_service.rb +2 -3
- data/lib/google/cloud/profiler/v2/version.rb +1 -1
- data/lib/google/devtools/cloudprofiler/v2/profiler_pb.rb +4 -2
- data/lib/google/devtools/cloudprofiler/v2/profiler_services_pb.rb +20 -6
- data/proto_docs/google/api/client.rb +5 -0
- data/proto_docs/google/devtools/cloudprofiler/v2/profiler.rb +5 -1
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- metadata +7 -118
|
@@ -30,11 +30,16 @@ module Google
|
|
|
30
30
|
# Manage the collection of continuous profiling data provided by profiling
|
|
31
31
|
# agents running in the cloud or by an offline provider of profiling data.
|
|
32
32
|
#
|
|
33
|
-
#
|
|
34
|
-
#
|
|
35
|
-
# * Profiles can be created in either online or offline mode, see below.
|
|
33
|
+
# __The APIs listed in this service are intended for use within our profiler
|
|
34
|
+
# agents only.__
|
|
36
35
|
#
|
|
37
36
|
class Client
|
|
37
|
+
# @private
|
|
38
|
+
API_VERSION = ""
|
|
39
|
+
|
|
40
|
+
# @private
|
|
41
|
+
DEFAULT_ENDPOINT_TEMPLATE = "cloudprofiler.$UNIVERSE_DOMAIN$"
|
|
42
|
+
|
|
38
43
|
include Paths
|
|
39
44
|
|
|
40
45
|
# @private
|
|
@@ -106,6 +111,15 @@ module Google
|
|
|
106
111
|
@config
|
|
107
112
|
end
|
|
108
113
|
|
|
114
|
+
##
|
|
115
|
+
# The effective universe domain
|
|
116
|
+
#
|
|
117
|
+
# @return [String]
|
|
118
|
+
#
|
|
119
|
+
def universe_domain
|
|
120
|
+
@profiler_service_stub.universe_domain
|
|
121
|
+
end
|
|
122
|
+
|
|
109
123
|
##
|
|
110
124
|
# Create a new ProfilerService client object.
|
|
111
125
|
#
|
|
@@ -139,8 +153,9 @@ module Google
|
|
|
139
153
|
credentials = @config.credentials
|
|
140
154
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
141
155
|
# but only if the default endpoint does not have a region prefix.
|
|
142
|
-
enable_self_signed_jwt = @config.endpoint
|
|
143
|
-
|
|
156
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
157
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
158
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
144
159
|
credentials ||= Credentials.default scope: @config.scope,
|
|
145
160
|
enable_self_signed_jwt: enable_self_signed_jwt
|
|
146
161
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
@@ -151,8 +166,10 @@ module Google
|
|
|
151
166
|
|
|
152
167
|
@profiler_service_stub = ::Gapic::ServiceStub.new(
|
|
153
168
|
::Google::Cloud::Profiler::V2::ProfilerService::Stub,
|
|
154
|
-
credentials:
|
|
155
|
-
endpoint:
|
|
169
|
+
credentials: credentials,
|
|
170
|
+
endpoint: @config.endpoint,
|
|
171
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
172
|
+
universe_domain: @config.universe_domain,
|
|
156
173
|
channel_args: @config.channel_args,
|
|
157
174
|
interceptors: @config.interceptors,
|
|
158
175
|
channel_pool_config: @config.channel_pool
|
|
@@ -164,6 +181,11 @@ module Google
|
|
|
164
181
|
##
|
|
165
182
|
# CreateProfile creates a new profile resource in the online mode.
|
|
166
183
|
#
|
|
184
|
+
# _Direct use of this API is discouraged, please use a [supported
|
|
185
|
+
# profiler
|
|
186
|
+
# agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
|
|
187
|
+
# instead for profile collection._
|
|
188
|
+
#
|
|
167
189
|
# The server ensures that the new profiles are created at a constant rate per
|
|
168
190
|
# deployment, so the creation request may hang for some time until the next
|
|
169
191
|
# profile session is available.
|
|
@@ -232,10 +254,11 @@ module Google
|
|
|
232
254
|
# Customize the options with defaults
|
|
233
255
|
metadata = @config.rpcs.create_profile.metadata.to_h
|
|
234
256
|
|
|
235
|
-
# Set x-goog-api-client
|
|
257
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
236
258
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
237
259
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
238
260
|
gapic_version: ::Google::Cloud::Profiler::V2::VERSION
|
|
261
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
239
262
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
240
263
|
|
|
241
264
|
header_params = {}
|
|
@@ -263,9 +286,14 @@ module Google
|
|
|
263
286
|
end
|
|
264
287
|
|
|
265
288
|
##
|
|
266
|
-
# CreateOfflineProfile creates a new profile resource in the offline
|
|
267
|
-
# The client provides the profile to create along with the profile
|
|
268
|
-
# server records it.
|
|
289
|
+
# CreateOfflineProfile creates a new profile resource in the offline
|
|
290
|
+
# mode. The client provides the profile to create along with the profile
|
|
291
|
+
# bytes, the server records it.
|
|
292
|
+
#
|
|
293
|
+
# _Direct use of this API is discouraged, please use a [supported
|
|
294
|
+
# profiler
|
|
295
|
+
# agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
|
|
296
|
+
# instead for profile collection._
|
|
269
297
|
#
|
|
270
298
|
# @overload create_offline_profile(request, options = nil)
|
|
271
299
|
# Pass arguments to `create_offline_profile` via a request object, either of type
|
|
@@ -321,10 +349,11 @@ module Google
|
|
|
321
349
|
# Customize the options with defaults
|
|
322
350
|
metadata = @config.rpcs.create_offline_profile.metadata.to_h
|
|
323
351
|
|
|
324
|
-
# Set x-goog-api-client
|
|
352
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
325
353
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
326
354
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
327
355
|
gapic_version: ::Google::Cloud::Profiler::V2::VERSION
|
|
356
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
328
357
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
329
358
|
|
|
330
359
|
header_params = {}
|
|
@@ -357,6 +386,11 @@ module Google
|
|
|
357
386
|
# offline mode is currently not supported: the profile content must be
|
|
358
387
|
# provided at the time of the profile creation.
|
|
359
388
|
#
|
|
389
|
+
# _Direct use of this API is discouraged, please use a [supported
|
|
390
|
+
# profiler
|
|
391
|
+
# agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
|
|
392
|
+
# instead for profile collection._
|
|
393
|
+
#
|
|
360
394
|
# @overload update_profile(request, options = nil)
|
|
361
395
|
# Pass arguments to `update_profile` via a request object, either of type
|
|
362
396
|
# {::Google::Cloud::Profiler::V2::UpdateProfileRequest} or an equivalent Hash.
|
|
@@ -414,10 +448,11 @@ module Google
|
|
|
414
448
|
# Customize the options with defaults
|
|
415
449
|
metadata = @config.rpcs.update_profile.metadata.to_h
|
|
416
450
|
|
|
417
|
-
# Set x-goog-api-client
|
|
451
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
418
452
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
419
453
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
420
454
|
gapic_version: ::Google::Cloud::Profiler::V2::VERSION
|
|
455
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
421
456
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
422
457
|
|
|
423
458
|
header_params = {}
|
|
@@ -474,9 +509,9 @@ module Google
|
|
|
474
509
|
# end
|
|
475
510
|
#
|
|
476
511
|
# @!attribute [rw] endpoint
|
|
477
|
-
#
|
|
478
|
-
#
|
|
479
|
-
# @return [::String]
|
|
512
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
513
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
514
|
+
# @return [::String,nil]
|
|
480
515
|
# @!attribute [rw] credentials
|
|
481
516
|
# Credentials to send with calls. You may provide any of the following types:
|
|
482
517
|
# * (`String`) The path to a service account key file in JSON format
|
|
@@ -522,13 +557,20 @@ module Google
|
|
|
522
557
|
# @!attribute [rw] quota_project
|
|
523
558
|
# A separate project against which to charge quota.
|
|
524
559
|
# @return [::String]
|
|
560
|
+
# @!attribute [rw] universe_domain
|
|
561
|
+
# The universe domain within which to make requests. This determines the
|
|
562
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
563
|
+
# universe (usually the default "googleapis.com" universe).
|
|
564
|
+
# @return [::String,nil]
|
|
525
565
|
#
|
|
526
566
|
class Configuration
|
|
527
567
|
extend ::Gapic::Config
|
|
528
568
|
|
|
569
|
+
# @private
|
|
570
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
529
571
|
DEFAULT_ENDPOINT = "cloudprofiler.googleapis.com"
|
|
530
572
|
|
|
531
|
-
config_attr :endpoint,
|
|
573
|
+
config_attr :endpoint, nil, ::String, nil
|
|
532
574
|
config_attr :credentials, nil do |value|
|
|
533
575
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
|
534
576
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
|
@@ -543,6 +585,7 @@ module Google
|
|
|
543
585
|
config_attr :metadata, nil, ::Hash, nil
|
|
544
586
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
545
587
|
config_attr :quota_project, nil, ::String, nil
|
|
588
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
546
589
|
|
|
547
590
|
# @private
|
|
548
591
|
def initialize parent_config = nil
|
|
@@ -32,11 +32,16 @@ module Google
|
|
|
32
32
|
# Manage the collection of continuous profiling data provided by profiling
|
|
33
33
|
# agents running in the cloud or by an offline provider of profiling data.
|
|
34
34
|
#
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
# * Profiles can be created in either online or offline mode, see below.
|
|
35
|
+
# __The APIs listed in this service are intended for use within our profiler
|
|
36
|
+
# agents only.__
|
|
38
37
|
#
|
|
39
38
|
class Client
|
|
39
|
+
# @private
|
|
40
|
+
API_VERSION = ""
|
|
41
|
+
|
|
42
|
+
# @private
|
|
43
|
+
DEFAULT_ENDPOINT_TEMPLATE = "cloudprofiler.$UNIVERSE_DOMAIN$"
|
|
44
|
+
|
|
40
45
|
include Paths
|
|
41
46
|
|
|
42
47
|
# @private
|
|
@@ -108,6 +113,15 @@ module Google
|
|
|
108
113
|
@config
|
|
109
114
|
end
|
|
110
115
|
|
|
116
|
+
##
|
|
117
|
+
# The effective universe domain
|
|
118
|
+
#
|
|
119
|
+
# @return [String]
|
|
120
|
+
#
|
|
121
|
+
def universe_domain
|
|
122
|
+
@profiler_service_stub.universe_domain
|
|
123
|
+
end
|
|
124
|
+
|
|
111
125
|
##
|
|
112
126
|
# Create a new ProfilerService REST client object.
|
|
113
127
|
#
|
|
@@ -135,8 +149,9 @@ module Google
|
|
|
135
149
|
credentials = @config.credentials
|
|
136
150
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
137
151
|
# but only if the default endpoint does not have a region prefix.
|
|
138
|
-
enable_self_signed_jwt = @config.endpoint
|
|
139
|
-
|
|
152
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
153
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
154
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
140
155
|
credentials ||= Credentials.default scope: @config.scope,
|
|
141
156
|
enable_self_signed_jwt: enable_self_signed_jwt
|
|
142
157
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
@@ -146,7 +161,12 @@ module Google
|
|
|
146
161
|
@quota_project_id = @config.quota_project
|
|
147
162
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
148
163
|
|
|
149
|
-
@profiler_service_stub = ::Google::Cloud::Profiler::V2::ProfilerService::Rest::ServiceStub.new
|
|
164
|
+
@profiler_service_stub = ::Google::Cloud::Profiler::V2::ProfilerService::Rest::ServiceStub.new(
|
|
165
|
+
endpoint: @config.endpoint,
|
|
166
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
167
|
+
universe_domain: @config.universe_domain,
|
|
168
|
+
credentials: credentials
|
|
169
|
+
)
|
|
150
170
|
end
|
|
151
171
|
|
|
152
172
|
# Service calls
|
|
@@ -154,6 +174,11 @@ module Google
|
|
|
154
174
|
##
|
|
155
175
|
# CreateProfile creates a new profile resource in the online mode.
|
|
156
176
|
#
|
|
177
|
+
# _Direct use of this API is discouraged, please use a [supported
|
|
178
|
+
# profiler
|
|
179
|
+
# agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
|
|
180
|
+
# instead for profile collection._
|
|
181
|
+
#
|
|
157
182
|
# The server ensures that the new profiles are created at a constant rate per
|
|
158
183
|
# deployment, so the creation request may hang for some time until the next
|
|
159
184
|
# profile session is available.
|
|
@@ -221,12 +246,13 @@ module Google
|
|
|
221
246
|
# Customize the options with defaults
|
|
222
247
|
call_metadata = @config.rpcs.create_profile.metadata.to_h
|
|
223
248
|
|
|
224
|
-
# Set x-goog-api-client
|
|
249
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
225
250
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
226
251
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
227
252
|
gapic_version: ::Google::Cloud::Profiler::V2::VERSION,
|
|
228
253
|
transports_version_send: [:rest]
|
|
229
254
|
|
|
255
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
230
256
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
231
257
|
|
|
232
258
|
options.apply_defaults timeout: @config.rpcs.create_profile.timeout,
|
|
@@ -246,9 +272,14 @@ module Google
|
|
|
246
272
|
end
|
|
247
273
|
|
|
248
274
|
##
|
|
249
|
-
# CreateOfflineProfile creates a new profile resource in the offline
|
|
250
|
-
# The client provides the profile to create along with the profile
|
|
251
|
-
# server records it.
|
|
275
|
+
# CreateOfflineProfile creates a new profile resource in the offline
|
|
276
|
+
# mode. The client provides the profile to create along with the profile
|
|
277
|
+
# bytes, the server records it.
|
|
278
|
+
#
|
|
279
|
+
# _Direct use of this API is discouraged, please use a [supported
|
|
280
|
+
# profiler
|
|
281
|
+
# agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
|
|
282
|
+
# instead for profile collection._
|
|
252
283
|
#
|
|
253
284
|
# @overload create_offline_profile(request, options = nil)
|
|
254
285
|
# Pass arguments to `create_offline_profile` via a request object, either of type
|
|
@@ -303,12 +334,13 @@ module Google
|
|
|
303
334
|
# Customize the options with defaults
|
|
304
335
|
call_metadata = @config.rpcs.create_offline_profile.metadata.to_h
|
|
305
336
|
|
|
306
|
-
# Set x-goog-api-client
|
|
337
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
307
338
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
308
339
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
309
340
|
gapic_version: ::Google::Cloud::Profiler::V2::VERSION,
|
|
310
341
|
transports_version_send: [:rest]
|
|
311
342
|
|
|
343
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
312
344
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
313
345
|
|
|
314
346
|
options.apply_defaults timeout: @config.rpcs.create_offline_profile.timeout,
|
|
@@ -333,6 +365,11 @@ module Google
|
|
|
333
365
|
# offline mode is currently not supported: the profile content must be
|
|
334
366
|
# provided at the time of the profile creation.
|
|
335
367
|
#
|
|
368
|
+
# _Direct use of this API is discouraged, please use a [supported
|
|
369
|
+
# profiler
|
|
370
|
+
# agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
|
|
371
|
+
# instead for profile collection._
|
|
372
|
+
#
|
|
336
373
|
# @overload update_profile(request, options = nil)
|
|
337
374
|
# Pass arguments to `update_profile` via a request object, either of type
|
|
338
375
|
# {::Google::Cloud::Profiler::V2::UpdateProfileRequest} or an equivalent Hash.
|
|
@@ -389,12 +426,13 @@ module Google
|
|
|
389
426
|
# Customize the options with defaults
|
|
390
427
|
call_metadata = @config.rpcs.update_profile.metadata.to_h
|
|
391
428
|
|
|
392
|
-
# Set x-goog-api-client
|
|
429
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
393
430
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
394
431
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
395
432
|
gapic_version: ::Google::Cloud::Profiler::V2::VERSION,
|
|
396
433
|
transports_version_send: [:rest]
|
|
397
434
|
|
|
435
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
398
436
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
399
437
|
|
|
400
438
|
options.apply_defaults timeout: @config.rpcs.update_profile.timeout,
|
|
@@ -443,9 +481,9 @@ module Google
|
|
|
443
481
|
# end
|
|
444
482
|
#
|
|
445
483
|
# @!attribute [rw] endpoint
|
|
446
|
-
#
|
|
447
|
-
#
|
|
448
|
-
# @return [::String]
|
|
484
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
485
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
486
|
+
# @return [::String,nil]
|
|
449
487
|
# @!attribute [rw] credentials
|
|
450
488
|
# Credentials to send with calls. You may provide any of the following types:
|
|
451
489
|
# * (`String`) The path to a service account key file in JSON format
|
|
@@ -482,13 +520,20 @@ module Google
|
|
|
482
520
|
# @!attribute [rw] quota_project
|
|
483
521
|
# A separate project against which to charge quota.
|
|
484
522
|
# @return [::String]
|
|
523
|
+
# @!attribute [rw] universe_domain
|
|
524
|
+
# The universe domain within which to make requests. This determines the
|
|
525
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
526
|
+
# universe (usually the default "googleapis.com" universe).
|
|
527
|
+
# @return [::String,nil]
|
|
485
528
|
#
|
|
486
529
|
class Configuration
|
|
487
530
|
extend ::Gapic::Config
|
|
488
531
|
|
|
532
|
+
# @private
|
|
533
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
489
534
|
DEFAULT_ENDPOINT = "cloudprofiler.googleapis.com"
|
|
490
535
|
|
|
491
|
-
config_attr :endpoint,
|
|
536
|
+
config_attr :endpoint, nil, ::String, nil
|
|
492
537
|
config_attr :credentials, nil do |value|
|
|
493
538
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
|
494
539
|
allowed.any? { |klass| klass === value }
|
|
@@ -500,6 +545,7 @@ module Google
|
|
|
500
545
|
config_attr :metadata, nil, ::Hash, nil
|
|
501
546
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
502
547
|
config_attr :quota_project, nil, ::String, nil
|
|
548
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
503
549
|
|
|
504
550
|
# @private
|
|
505
551
|
def initialize parent_config = nil
|
|
@@ -30,16 +30,37 @@ module Google
|
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
|
31
31
|
#
|
|
32
32
|
class ServiceStub
|
|
33
|
-
def initialize endpoint:, credentials:
|
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
|
34
34
|
# These require statements are intentionally placed here to initialize
|
|
35
35
|
# the REST modules only when it's required.
|
|
36
36
|
require "gapic/rest"
|
|
37
37
|
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
39
|
+
endpoint_template: endpoint_template,
|
|
40
|
+
universe_domain: universe_domain,
|
|
41
|
+
credentials: credentials,
|
|
39
42
|
numeric_enums: true,
|
|
40
43
|
raise_faraday_errors: false
|
|
41
44
|
end
|
|
42
45
|
|
|
46
|
+
##
|
|
47
|
+
# The effective universe domain
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
#
|
|
51
|
+
def universe_domain
|
|
52
|
+
@client_stub.universe_domain
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
##
|
|
56
|
+
# The effective endpoint
|
|
57
|
+
#
|
|
58
|
+
# @return [String]
|
|
59
|
+
#
|
|
60
|
+
def endpoint
|
|
61
|
+
@client_stub.endpoint
|
|
62
|
+
end
|
|
63
|
+
|
|
43
64
|
##
|
|
44
65
|
# Baseline implementation for the create_profile REST call
|
|
45
66
|
#
|
|
@@ -34,9 +34,8 @@ module Google
|
|
|
34
34
|
# Manage the collection of continuous profiling data provided by profiling
|
|
35
35
|
# agents running in the cloud or by an offline provider of profiling data.
|
|
36
36
|
#
|
|
37
|
-
#
|
|
38
|
-
#
|
|
39
|
-
# * Profiles can be created in either online or offline mode, see below.
|
|
37
|
+
# __The APIs listed in this service are intended for use within our profiler
|
|
38
|
+
# agents only.__
|
|
40
39
|
#
|
|
41
40
|
# To load this service and instantiate a REST client:
|
|
42
41
|
#
|
|
@@ -35,9 +35,8 @@ module Google
|
|
|
35
35
|
# Manage the collection of continuous profiling data provided by profiling
|
|
36
36
|
# agents running in the cloud or by an offline provider of profiling data.
|
|
37
37
|
#
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
# * Profiles can be created in either online or offline mode, see below.
|
|
38
|
+
# __The APIs listed in this service are intended for use within our profiler
|
|
39
|
+
# agents only.__
|
|
41
40
|
#
|
|
42
41
|
# @example Load this service and instantiate a gRPC client
|
|
43
42
|
#
|
|
@@ -10,15 +10,16 @@ require 'google/api/field_behavior_pb'
|
|
|
10
10
|
require 'google/api/resource_pb'
|
|
11
11
|
require 'google/protobuf/duration_pb'
|
|
12
12
|
require 'google/protobuf/field_mask_pb'
|
|
13
|
+
require 'google/protobuf/timestamp_pb'
|
|
13
14
|
|
|
14
15
|
|
|
15
|
-
descriptor_data = "\n/google/devtools/cloudprofiler/v2/profiler.proto\x12 google.devtools.cloudprofiler.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\"\xdf\x01\n\x14\x43reateProfileRequest\x12@\n\x06parent\x18\x04 \x01(\tB0\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12@\n\ndeployment\x18\x01 \x01(\x0b\x32,.google.devtools.cloudprofiler.v2.Deployment\x12\x43\n\x0cprofile_type\x18\x02 \x03(\x0e\x32-.google.devtools.cloudprofiler.v2.ProfileType\"\x9b\x01\n\x1b\x43reateOfflineProfileRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12:\n\x07profile\x18\x02 \x01(\x0b\x32).google.devtools.cloudprofiler.v2.Profile\"\x83\x01\n\x14UpdateProfileRequest\x12:\n\x07profile\x18\x01 \x01(\x0b\x32).google.devtools.cloudprofiler.v2.Profile\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\
|
|
16
|
+
descriptor_data = "\n/google/devtools/cloudprofiler/v2/profiler.proto\x12 google.devtools.cloudprofiler.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdf\x01\n\x14\x43reateProfileRequest\x12@\n\x06parent\x18\x04 \x01(\tB0\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12@\n\ndeployment\x18\x01 \x01(\x0b\x32,.google.devtools.cloudprofiler.v2.Deployment\x12\x43\n\x0cprofile_type\x18\x02 \x03(\x0e\x32-.google.devtools.cloudprofiler.v2.ProfileType\"\x9b\x01\n\x1b\x43reateOfflineProfileRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12:\n\x07profile\x18\x02 \x01(\x0b\x32).google.devtools.cloudprofiler.v2.Profile\"\x83\x01\n\x14UpdateProfileRequest\x12:\n\x07profile\x18\x01 \x01(\x0b\x32).google.devtools.cloudprofiler.v2.Profile\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xee\x03\n\x07Profile\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x43\n\x0cprofile_type\x18\x02 \x01(\x0e\x32-.google.devtools.cloudprofiler.v2.ProfileType\x12@\n\ndeployment\x18\x03 \x01(\x0b\x32,.google.devtools.cloudprofiler.v2.Deployment\x12+\n\x08\x64uration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\rprofile_bytes\x18\x05 \x01(\x0c\x42\x03\xe0\x41\x04\x12J\n\x06labels\x18\x06 \x03(\x0b\x32\x35.google.devtools.cloudprofiler.v2.Profile.LabelsEntryB\x03\xe0\x41\x04\x12\x33\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:P\xea\x41M\n$cloudprofiler.googleapis.com/Profile\x12%projects/{project}/profiles/{profile}\"\xa9\x01\n\nDeployment\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x0e\n\x06target\x18\x02 \x01(\t\x12H\n\x06labels\x18\x03 \x03(\x0b\x32\x38.google.devtools.cloudprofiler.v2.Deployment.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x81\x01\n\x13ListProfilesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x86\x01\n\x14ListProfilesResponse\x12;\n\x08profiles\x18\x01 \x03(\x0b\x32).google.devtools.cloudprofiler.v2.Profile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x10skipped_profiles\x18\x03 \x01(\x05*\x84\x01\n\x0bProfileType\x12\x1c\n\x18PROFILE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x43PU\x10\x01\x12\x08\n\x04WALL\x10\x02\x12\x08\n\x04HEAP\x10\x03\x12\x0b\n\x07THREADS\x10\x04\x12\x0e\n\nCONTENTION\x10\x05\x12\r\n\tPEAK_HEAP\x10\x06\x12\x0e\n\nHEAP_ALLOC\x10\x07\x32\xfe\x05\n\x0fProfilerService\x12\x9f\x01\n\rCreateProfile\x12\x36.google.devtools.cloudprofiler.v2.CreateProfileRequest\x1a).google.devtools.cloudprofiler.v2.Profile\"+\x82\xd3\xe4\x93\x02%\" /v2/{parent=projects/*}/profiles:\x01*\x12\xd2\x01\n\x14\x43reateOfflineProfile\x12=.google.devtools.cloudprofiler.v2.CreateOfflineProfileRequest\x1a).google.devtools.cloudprofiler.v2.Profile\"P\xda\x41\x0eparent,profile\x82\xd3\xe4\x93\x02\x39\"./v2/{parent=projects/*}/profiles:createOffline:\x07profile\x12\xc3\x01\n\rUpdateProfile\x12\x36.google.devtools.cloudprofiler.v2.UpdateProfileRequest\x1a).google.devtools.cloudprofiler.v2.Profile\"O\xda\x41\x13profile,update_mask\x82\xd3\xe4\x93\x02\x33\x32(/v2/{profile.name=projects/*/profiles/*}:\x07profile\x1a\xad\x01\xca\x41\x1c\x63loudprofiler.googleapis.com\xd2\x41\x8a\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.write2\xf2\x02\n\rExportService\x12\xb0\x01\n\x0cListProfiles\x12\x35.google.devtools.cloudprofiler.v2.ListProfilesRequest\x1a\x36.google.devtools.cloudprofiler.v2.ListProfilesResponse\"1\xda\x41\x06parent\x82\xd3\xe4\x93\x02\"\x12 /v2/{parent=projects/*}/profiles\x1a\xad\x01\xca\x41\x1c\x63loudprofiler.googleapis.com\xd2\x41\x8a\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.writeB\xd4\x01\n$com.google.devtools.cloudprofiler.v2B\rProfilerProtoP\x01ZGcloud.google.com/go/cloudprofiler/apiv2/cloudprofilerpb;cloudprofilerpb\xaa\x02\x18Google.Cloud.Profiler.V2\xca\x02\x18Google\\Cloud\\Profiler\\V2\xea\x02\x1bGoogle::Cloud::Profiler::V2b\x06proto3"
|
|
16
17
|
|
|
17
18
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
18
19
|
|
|
19
20
|
begin
|
|
20
21
|
pool.add_serialized_file(descriptor_data)
|
|
21
|
-
rescue TypeError
|
|
22
|
+
rescue TypeError
|
|
22
23
|
# Compatibility code: will be removed in the next major version.
|
|
23
24
|
require 'google/protobuf/descriptor_pb'
|
|
24
25
|
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
|
@@ -29,6 +30,7 @@ rescue TypeError => e
|
|
|
29
30
|
imports = [
|
|
30
31
|
["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
|
31
32
|
["google.protobuf.Duration", "google/protobuf/duration.proto"],
|
|
33
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
|
32
34
|
]
|
|
33
35
|
imports.each do |type_name, expected_filename|
|
|
34
36
|
import_file = pool.lookup(type_name).file_descriptor
|
|
@@ -27,9 +27,8 @@ module Google
|
|
|
27
27
|
# Manage the collection of continuous profiling data provided by profiling
|
|
28
28
|
# agents running in the cloud or by an offline provider of profiling data.
|
|
29
29
|
#
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
-
# * Profiles can be created in either online or offline mode, see below.
|
|
30
|
+
# __The APIs listed in this service are intended for use within our profiler
|
|
31
|
+
# agents only.__
|
|
33
32
|
class Service
|
|
34
33
|
|
|
35
34
|
include ::GRPC::GenericService
|
|
@@ -40,6 +39,11 @@ module Google
|
|
|
40
39
|
|
|
41
40
|
# CreateProfile creates a new profile resource in the online mode.
|
|
42
41
|
#
|
|
42
|
+
# _Direct use of this API is discouraged, please use a [supported
|
|
43
|
+
# profiler
|
|
44
|
+
# agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
|
|
45
|
+
# instead for profile collection._
|
|
46
|
+
#
|
|
43
47
|
# The server ensures that the new profiles are created at a constant rate per
|
|
44
48
|
# deployment, so the creation request may hang for some time until the next
|
|
45
49
|
# profile session is available.
|
|
@@ -53,14 +57,24 @@ module Google
|
|
|
53
57
|
# "google.rpc.retryinfo-bin".
|
|
54
58
|
#
|
|
55
59
|
rpc :CreateProfile, ::Google::Cloud::Profiler::V2::CreateProfileRequest, ::Google::Cloud::Profiler::V2::Profile
|
|
56
|
-
# CreateOfflineProfile creates a new profile resource in the offline
|
|
57
|
-
# The client provides the profile to create along with the profile
|
|
58
|
-
# server records it.
|
|
60
|
+
# CreateOfflineProfile creates a new profile resource in the offline
|
|
61
|
+
# mode. The client provides the profile to create along with the profile
|
|
62
|
+
# bytes, the server records it.
|
|
63
|
+
#
|
|
64
|
+
# _Direct use of this API is discouraged, please use a [supported
|
|
65
|
+
# profiler
|
|
66
|
+
# agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
|
|
67
|
+
# instead for profile collection._
|
|
59
68
|
rpc :CreateOfflineProfile, ::Google::Cloud::Profiler::V2::CreateOfflineProfileRequest, ::Google::Cloud::Profiler::V2::Profile
|
|
60
69
|
# UpdateProfile updates the profile bytes and labels on the profile resource
|
|
61
70
|
# created in the online mode. Updating the bytes for profiles created in the
|
|
62
71
|
# offline mode is currently not supported: the profile content must be
|
|
63
72
|
# provided at the time of the profile creation.
|
|
73
|
+
#
|
|
74
|
+
# _Direct use of this API is discouraged, please use a [supported
|
|
75
|
+
# profiler
|
|
76
|
+
# agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
|
|
77
|
+
# instead for profile collection._
|
|
64
78
|
rpc :UpdateProfile, ::Google::Cloud::Profiler::V2::UpdateProfileRequest, ::Google::Cloud::Profiler::V2::Profile
|
|
65
79
|
end
|
|
66
80
|
|
|
@@ -21,6 +21,7 @@ module Google
|
|
|
21
21
|
module Api
|
|
22
22
|
# Required information for every language.
|
|
23
23
|
# @!attribute [rw] reference_docs_uri
|
|
24
|
+
# @deprecated This field is deprecated and may be removed in the next major version update.
|
|
24
25
|
# @return [::String]
|
|
25
26
|
# Link to automatically generated reference documentation. Example:
|
|
26
27
|
# https://cloud.google.com/nodejs/docs/reference/asset/latest
|
|
@@ -117,6 +118,10 @@ module Google
|
|
|
117
118
|
# @return [::String]
|
|
118
119
|
# Optional link to proto reference documentation. Example:
|
|
119
120
|
# https://cloud.google.com/pubsub/lite/docs/reference/rpc
|
|
121
|
+
# @!attribute [rw] rest_reference_documentation_uri
|
|
122
|
+
# @return [::String]
|
|
123
|
+
# Optional link to REST reference documentation. Example:
|
|
124
|
+
# https://cloud.google.com/pubsub/lite/docs/reference/rest
|
|
120
125
|
class Publishing
|
|
121
126
|
include ::Google::Protobuf::MessageExts
|
|
122
127
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -96,6 +96,10 @@ module Google
|
|
|
96
96
|
# Input only. Labels associated to this specific profile. These labels will
|
|
97
97
|
# get merged with the deployment labels for the final data set. See
|
|
98
98
|
# documentation on deployment labels for validation rules and limits.
|
|
99
|
+
# @!attribute [r] start_time
|
|
100
|
+
# @return [::Google::Protobuf::Timestamp]
|
|
101
|
+
# Output only. Start time for the profile.
|
|
102
|
+
# This output is only present in response from the ListProfiles method.
|
|
99
103
|
class Profile
|
|
100
104
|
include ::Google::Protobuf::MessageExts
|
|
101
105
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -162,7 +166,7 @@ module Google
|
|
|
162
166
|
# @return [::Integer]
|
|
163
167
|
# The maximum number of items to return.
|
|
164
168
|
# Default page_size is 1000.
|
|
165
|
-
# Max limit is
|
|
169
|
+
# Max limit is 1000.
|
|
166
170
|
# @!attribute [rw] page_token
|
|
167
171
|
# @return [::String]
|
|
168
172
|
# The token to continue pagination and get profiles from a particular page.
|