waterdrop 2.8.9 → 2.8.10

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: 6d6b4d4ba3d3fe608324d53cf91c1d07278e810369ec9cf140520d9b065a30c1
4
- data.tar.gz: b661659c9aa6facfe8eaf2b29eecd809937dbaf2b15557673c257e09f9a0f357
3
+ metadata.gz: 8ed8d57d7b79987870f918e97b3ffeee07c6c68b75a506bd11f29abe8778f21f
4
+ data.tar.gz: 86fe1bdb3d1963ef3783a254dbf0c7ae3ad61dc5608eeca5a41dcc2bbd454c1b
5
5
  SHA512:
6
- metadata.gz: 6d4f5323e204d8c9d8ae2f0d1eea282b1096ed1c28554bb8e46038b08679c554ebae21b9a1c7546a8c2ad5db0ca1876a882318b04aab2b671973a012364e3276
7
- data.tar.gz: 2a6b018f76dd052016352af3878d29522ea5a0d1c8fba1edfa453bfd084bdfa2a7e9e20ec57fd0bc8e6de0ea3117b200fd5450bde022a7e233dc5b5461da4455
6
+ metadata.gz: 22949a9ec65e4e6c0532ad469747989c4971de5320c705cf704371440b2d21b6edd83504eb77e56192ec0043c04334c91892813f3b1d01418e88d1f996064949
7
+ data.tar.gz: 9cecd0e2e56209d14eac2c896d9f2086973874de78e478e758404eb31d17e1b9abcf66e54011a1e9341dad215bac5de8fdafcc29ef38e0a6c8f43ca8eb82a301
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # WaterDrop changelog
2
2
 
3
+ ## 2.8.10 (2025-09-25)
4
+ - [Enhancement] Add `#close` alias for `WaterDrop::ConnectionPool#shutdown` to align with producer API for consistent interface across both individual producers and connection pools.
5
+ - [Enhancement] Add `WaterDrop.monitor` method as the preferred alias for `WaterDrop.instrumentation` to align with per-producer API naming convention. The `instrumentation` method remains available as a deprecated alias for backward compatibility.
6
+
3
7
  ## 2.8.9 (2025-09-23)
4
8
  - [Enhancement] Add connection pool lifecycle events to global instrumentation for improved observability. Events include `connection_pool.created`, `connection_pool.setup`, `connection_pool.shutdown`, `connection_pool.reload`, and `connection_pool.reloaded`.
5
9
  - [Enhancement] Add default connection pool transactional direct API.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- waterdrop (2.8.9)
4
+ waterdrop (2.8.10)
5
5
  karafka-core (>= 2.4.9, < 3.0.0)
6
6
  karafka-rdkafka (>= 0.20.0)
7
7
  zeitwerk (~> 2.3)
@@ -126,6 +126,11 @@ module WaterDrop
126
126
  )
127
127
  end
128
128
 
129
+ # Alias for shutdown to align with producer API
130
+ # WaterDrop producers use #close, so we alias connection pool #shutdown to #close
131
+ # for API consistency across both individual producers and connection pools
132
+ alias close shutdown
133
+
129
134
  # Reload the global connection pool
130
135
  def reload
131
136
  return unless @default_pool
@@ -244,6 +249,11 @@ module WaterDrop
244
249
  )
245
250
  end
246
251
 
252
+ # Alias for shutdown to align with producer API
253
+ # WaterDrop producers use #close, so we alias connection pool #shutdown to #close
254
+ # for API consistency across both individual producers and connection pools
255
+ alias close shutdown
256
+
247
257
  # Reload all connections in the pool
248
258
  # Useful for configuration changes or error recovery
249
259
  def reload
@@ -3,5 +3,5 @@
3
3
  # WaterDrop library
4
4
  module WaterDrop
5
5
  # Current WaterDrop version
6
- VERSION = '2.8.9'
6
+ VERSION = '2.8.10'
7
7
  end
data/lib/waterdrop.rb CHANGED
@@ -17,7 +17,7 @@ module WaterDrop
17
17
  Pathname.new(File.expand_path('..', __dir__))
18
18
  end
19
19
 
20
- # @return [WaterDrop::Instrumentation::ClassMonitor] global instrumentation monitor for
20
+ # @return [WaterDrop::Instrumentation::ClassMonitor] global monitor for
21
21
  # class-level event subscriptions. This allows external libraries to subscribe to WaterDrop
22
22
  # lifecycle events without needing producer instance references.
23
23
  #
@@ -25,13 +25,16 @@ module WaterDrop
25
25
  # instance events
26
26
  #
27
27
  # @example Subscribe to producer creation events
28
- # WaterDrop.instrumentation.subscribe('producer.created') do |event|
28
+ # WaterDrop.monitor.subscribe('producer.created') do |event|
29
29
  # producer = event[:producer]
30
30
  # # Configure producer or add middleware
31
31
  # end
32
- def instrumentation
32
+ def monitor
33
33
  @instrumentation ||= Instrumentation::ClassMonitor.new
34
34
  end
35
+
36
+ # @deprecated Use #monitor instead. This method is provided for backward compatibility only.
37
+ alias instrumentation monitor
35
38
  end
36
39
  end
37
40
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waterdrop
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.9
4
+ version: 2.8.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld