google-cloud-bigtable-v2 1.3.0 → 1.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c852dc1de947fb99936ea7d02fa91037fb4edb48b435d34d9f71f0cb4f7c92ad
4
- data.tar.gz: 28f31be47dba167271381efbec59b19a5356f9853cfd90a43127d295516cb8b4
3
+ metadata.gz: f46df90b74ac97fb8d07d83301dfa95787565d8f0712cb69b176bef8bfd6c56a
4
+ data.tar.gz: 8d2f8b8a26aa1bc26d7371a26f25f9a68cede8bfd32836d76809ce361f5dea52
5
5
  SHA512:
6
- metadata.gz: 4f04d05ef4e5b76ee01d9adb2f47fb8c894b840783352681a2ed358482be23fafa2e3a501900de3ec02ac4b9db266d161462ed6c5ad922cb5e6ef6cf4b791050
7
- data.tar.gz: cfdeb131e62f1d265ac8dd87fb9776cc37954e12b5fb2dea2eab993cd495d9bef9ec27f66a7bacb0218b1776fe05102def0b61cd1cfaf0d09ca18d0d920ff342
6
+ metadata.gz: 7a87ca7406560463150bb1bce7b31602fb40de1ba6a5f327ac751406ae0bcac6bfde52efcb0422bd7c46e4de52e255d3fc639d952e6f170fb1a59d39179be219
7
+ data.tar.gz: bd3c5af36f00148175926e0b54565985ba695e043c24d0697c70d4f181a2ad736324ea1a7724469ee6423d923b779b650bca7ed5aa88f9b329f1cd31cfb1f763
data/README.md CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/bigtable)
44
44
  for general usage information.
45
45
 
46
- ## Enabling Logging
47
-
48
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
-
54
- Configuring a Ruby stdlib logger:
46
+ ## Debug Logging
47
+
48
+ This library comes with opt-in Debug Logging that can help you troubleshoot
49
+ your application's integration with the API. When logging is activated, key
50
+ events such as requests and responses, along with data payloads and metadata
51
+ such as headers and client configuration, are logged to the standard error
52
+ stream.
53
+
54
+ **WARNING:** Client Library Debug Logging includes your data payloads in
55
+ plaintext, which could include sensitive data such as PII for yourself or your
56
+ customers, private keys, or other security data that could be compromising if
57
+ leaked. Always practice good data hygiene with your application logs, and follow
58
+ the principle of least access. Google also recommends that Client Library Debug
59
+ Logging be enabled only temporarily during active debugging, and not used
60
+ permanently in production.
61
+
62
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
64
+ list of client library gem names. This will select the default logging behavior,
65
+ which writes logs to the standard error stream. On a local workstation, this may
66
+ result in logs appearing on the console. When running on a Google Cloud hosting
67
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
+ results in logs appearing alongside your application logs in the
69
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
+
71
+ You can customize logging by modifying the `logger` configuration when
72
+ constructing a client object. For example:
55
73
 
56
74
  ```ruby
75
+ require "google/cloud/bigtable/v2"
57
76
  require "logger"
58
77
 
59
- module MyLogger
60
- LOGGER = Logger.new $stderr, level: Logger::WARN
61
- def logger
62
- LOGGER
63
- end
64
- end
65
-
66
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
67
- module GRPC
68
- extend MyLogger
78
+ client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config|
79
+ config.logger = Logger.new "my-app.log"
69
80
  end
70
81
  ```
71
82
 
72
-
73
83
  ## Google Cloud Samples
74
84
 
75
85
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
@@ -176,8 +176,28 @@ module Google
176
176
  universe_domain: @config.universe_domain,
177
177
  channel_args: @config.channel_args,
178
178
  interceptors: @config.interceptors,
179
- channel_pool_config: @config.channel_pool
179
+ channel_pool_config: @config.channel_pool,
180
+ logger: @config.logger
180
181
  )
182
+
183
+ @bigtable_stub.stub_logger&.info do |entry|
184
+ entry.set_system_name
185
+ entry.set_service
186
+ entry.message = "Created client for #{entry.service}"
187
+ entry.set_credentials_fields credentials
188
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
189
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
190
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
191
+ end
192
+ end
193
+
194
+ ##
195
+ # The logger used for request/response debug logging.
196
+ #
197
+ # @return [Logger]
198
+ #
199
+ def logger
200
+ @bigtable_stub.logger
181
201
  end
182
202
 
183
203
  # Service calls
@@ -312,7 +332,6 @@ module Google
312
332
 
313
333
  @bigtable_stub.call_rpc :read_rows, request, options: options do |response, operation|
314
334
  yield response, operation if block_given?
315
- return response
316
335
  end
317
336
  rescue ::GRPC::BadStatus => e
318
337
  raise ::Google::Cloud::Error.from_error(e)
@@ -424,7 +443,6 @@ module Google
424
443
 
425
444
  @bigtable_stub.call_rpc :sample_row_keys, request, options: options do |response, operation|
426
445
  yield response, operation if block_given?
427
- return response
428
446
  end
429
447
  rescue ::GRPC::BadStatus => e
430
448
  raise ::Google::Cloud::Error.from_error(e)
@@ -538,7 +556,6 @@ module Google
538
556
 
539
557
  @bigtable_stub.call_rpc :mutate_row, request, options: options do |response, operation|
540
558
  yield response, operation if block_given?
541
- return response
542
559
  end
543
560
  rescue ::GRPC::BadStatus => e
544
561
  raise ::Google::Cloud::Error.from_error(e)
@@ -656,7 +673,6 @@ module Google
656
673
 
657
674
  @bigtable_stub.call_rpc :mutate_rows, request, options: options do |response, operation|
658
675
  yield response, operation if block_given?
659
- return response
660
676
  end
661
677
  rescue ::GRPC::BadStatus => e
662
678
  raise ::Google::Cloud::Error.from_error(e)
@@ -783,7 +799,6 @@ module Google
783
799
 
784
800
  @bigtable_stub.call_rpc :check_and_mutate_row, request, options: options do |response, operation|
785
801
  yield response, operation if block_given?
786
- return response
787
802
  end
788
803
  rescue ::GRPC::BadStatus => e
789
804
  raise ::Google::Cloud::Error.from_error(e)
@@ -879,7 +894,6 @@ module Google
879
894
 
880
895
  @bigtable_stub.call_rpc :ping_and_warm, request, options: options do |response, operation|
881
896
  yield response, operation if block_given?
882
- return response
883
897
  end
884
898
  rescue ::GRPC::BadStatus => e
885
899
  raise ::Google::Cloud::Error.from_error(e)
@@ -997,7 +1011,6 @@ module Google
997
1011
 
998
1012
  @bigtable_stub.call_rpc :read_modify_write_row, request, options: options do |response, operation|
999
1013
  yield response, operation if block_given?
1000
- return response
1001
1014
  end
1002
1015
  rescue ::GRPC::BadStatus => e
1003
1016
  raise ::Google::Cloud::Error.from_error(e)
@@ -1096,7 +1109,6 @@ module Google
1096
1109
 
1097
1110
  @bigtable_stub.call_rpc :generate_initial_change_stream_partitions, request, options: options do |response, operation|
1098
1111
  yield response, operation if block_given?
1099
- return response
1100
1112
  end
1101
1113
  rescue ::GRPC::BadStatus => e
1102
1114
  raise ::Google::Cloud::Error.from_error(e)
@@ -1220,7 +1232,6 @@ module Google
1220
1232
 
1221
1233
  @bigtable_stub.call_rpc :read_change_stream, request, options: options do |response, operation|
1222
1234
  yield response, operation if block_given?
1223
- return response
1224
1235
  end
1225
1236
  rescue ::GRPC::BadStatus => e
1226
1237
  raise ::Google::Cloud::Error.from_error(e)
@@ -1351,7 +1362,6 @@ module Google
1351
1362
 
1352
1363
  @bigtable_stub.call_rpc :execute_query, request, options: options do |response, operation|
1353
1364
  yield response, operation if block_given?
1354
- return response
1355
1365
  end
1356
1366
  rescue ::GRPC::BadStatus => e
1357
1367
  raise ::Google::Cloud::Error.from_error(e)
@@ -1440,6 +1450,11 @@ module Google
1440
1450
  # default endpoint URL. The default value of nil uses the environment
1441
1451
  # universe (usually the default "googleapis.com" universe).
1442
1452
  # @return [::String,nil]
1453
+ # @!attribute [rw] logger
1454
+ # A custom logger to use for request/response debug logging, or the value
1455
+ # `:default` (the default) to construct a default logger, or `nil` to
1456
+ # explicitly disable logging.
1457
+ # @return [::Logger,:default,nil]
1443
1458
  #
1444
1459
  class Configuration
1445
1460
  extend ::Gapic::Config
@@ -1464,6 +1479,7 @@ module Google
1464
1479
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1465
1480
  config_attr :quota_project, nil, ::String, nil
1466
1481
  config_attr :universe_domain, nil, ::String, nil
1482
+ config_attr :logger, :default, ::Logger, nil, :default
1467
1483
 
1468
1484
  # @private
1469
1485
  def initialize parent_config = nil
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Bigtable
23
23
  module V2
24
- VERSION = "1.3.0"
24
+ VERSION = "1.4.0"
25
25
  end
26
26
  end
27
27
  end
@@ -215,6 +215,12 @@ module Google
215
215
  # enabled. By default, asynchronous REST clients will not be generated.
216
216
  # This feature will be enabled by default 1 month after launching the
217
217
  # feature in preview packages.
218
+ # @!attribute [rw] protobuf_pythonic_types_enabled
219
+ # @return [::Boolean]
220
+ # Enables generation of protobuf code using new types that are more
221
+ # Pythonic which are included in `protobuf>=5.29.x`. This feature will be
222
+ # enabled by default 1 month after launching the feature in preview
223
+ # packages.
218
224
  class ExperimentalFeatures
219
225
  include ::Google::Protobuf::MessageExts
220
226
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -300,9 +306,28 @@ module Google
300
306
  # @!attribute [rw] common
301
307
  # @return [::Google::Api::CommonLanguageSettings]
302
308
  # Some settings.
309
+ # @!attribute [rw] renamed_services
310
+ # @return [::Google::Protobuf::Map{::String => ::String}]
311
+ # Map of service names to renamed services. Keys are the package relative
312
+ # service names and values are the name to be used for the service client
313
+ # and call options.
314
+ #
315
+ # publishing:
316
+ # go_settings:
317
+ # renamed_services:
318
+ # Publisher: TopicAdmin
303
319
  class GoSettings
304
320
  include ::Google::Protobuf::MessageExts
305
321
  extend ::Google::Protobuf::MessageExts::ClassMethods
322
+
323
+ # @!attribute [rw] key
324
+ # @return [::String]
325
+ # @!attribute [rw] value
326
+ # @return [::String]
327
+ class RenamedServicesEntry
328
+ include ::Google::Protobuf::MessageExts
329
+ extend ::Google::Protobuf::MessageExts::ClassMethods
330
+ end
306
331
  end
307
332
 
308
333
  # Describes the generator configuration for a method.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigtable-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-13 00:00:00.000000000 Z
11
+ date: 2024-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.21.1
19
+ version: 0.24.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.21.1
29
+ version: 0.24.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
- rubygems_version: 3.5.22
112
+ rubygems_version: 3.5.23
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: API for reading and writing the contents of Bigtable tables associated with