waterdrop 2.0.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/.github/workflows/ci.yml +33 -6
  4. data/.ruby-version +1 -1
  5. data/CHANGELOG.md +80 -0
  6. data/Gemfile +0 -2
  7. data/Gemfile.lock +36 -87
  8. data/MIT-LICENSE +18 -0
  9. data/README.md +180 -46
  10. data/certs/mensfeld.pem +21 -21
  11. data/config/errors.yml +29 -5
  12. data/docker-compose.yml +2 -1
  13. data/lib/{water_drop → waterdrop}/config.rb +47 -19
  14. data/lib/waterdrop/contracts/config.rb +40 -0
  15. data/lib/waterdrop/contracts/message.rb +60 -0
  16. data/lib/waterdrop/instrumentation/callbacks/delivery.rb +30 -0
  17. data/lib/waterdrop/instrumentation/callbacks/error.rb +36 -0
  18. data/lib/waterdrop/instrumentation/callbacks/statistics.rb +41 -0
  19. data/lib/waterdrop/instrumentation/callbacks/statistics_decorator.rb +77 -0
  20. data/lib/waterdrop/instrumentation/callbacks_manager.rb +39 -0
  21. data/lib/{water_drop/instrumentation/stdout_listener.rb → waterdrop/instrumentation/logger_listener.rb} +17 -26
  22. data/lib/waterdrop/instrumentation/monitor.rb +20 -0
  23. data/lib/{water_drop/instrumentation/monitor.rb → waterdrop/instrumentation/notifications.rb} +12 -13
  24. data/lib/waterdrop/instrumentation/vendors/datadog/dashboard.json +1 -0
  25. data/lib/waterdrop/instrumentation/vendors/datadog/listener.rb +210 -0
  26. data/lib/waterdrop/instrumentation.rb +20 -0
  27. data/lib/waterdrop/patches/rdkafka/bindings.rb +42 -0
  28. data/lib/waterdrop/patches/rdkafka/producer.rb +28 -0
  29. data/lib/{water_drop → waterdrop}/producer/async.rb +2 -2
  30. data/lib/{water_drop → waterdrop}/producer/buffer.rb +15 -8
  31. data/lib/waterdrop/producer/builder.rb +28 -0
  32. data/lib/{water_drop → waterdrop}/producer/sync.rb +2 -2
  33. data/lib/{water_drop → waterdrop}/producer.rb +29 -15
  34. data/lib/{water_drop → waterdrop}/version.rb +1 -1
  35. data/lib/waterdrop.rb +33 -2
  36. data/waterdrop.gemspec +12 -10
  37. data.tar.gz.sig +0 -0
  38. metadata +64 -97
  39. metadata.gz.sig +0 -0
  40. data/.github/FUNDING.yml +0 -1
  41. data/LICENSE +0 -165
  42. data/lib/water_drop/contracts/config.rb +0 -26
  43. data/lib/water_drop/contracts/message.rb +0 -41
  44. data/lib/water_drop/instrumentation.rb +0 -7
  45. data/lib/water_drop/producer/builder.rb +0 -63
  46. data/lib/water_drop/producer/statistics_decorator.rb +0 -71
  47. data/lib/water_drop.rb +0 -30
  48. /data/lib/{water_drop → waterdrop}/contracts.rb +0 -0
  49. /data/lib/{water_drop → waterdrop}/errors.rb +0 -0
  50. /data/lib/{water_drop → waterdrop}/producer/dummy_client.rb +0 -0
  51. /data/lib/{water_drop → waterdrop}/producer/status.rb +0 -0
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WaterDrop
4
+ # Patches to external components
5
+ module Patches
6
+ # Rdkafka related patches
7
+ module Rdkafka
8
+ # Rdkafka::Producer patches
9
+ module Producer
10
+ # Adds a method that allows us to get the native kafka producer name
11
+ # @return [String] producer instance name
12
+ def name
13
+ unless @_native
14
+ version = ::Gem::Version.new(::Rdkafka::VERSION)
15
+ change = ::Gem::Version.new('0.12.0')
16
+ # 0.12.0 changed how the native producer client reference works.
17
+ # This code supports both older and newer versions of rdkafka
18
+ @_native = version >= change ? @client.native : @native_kafka
19
+ end
20
+
21
+ ::Rdkafka::Bindings.rd_kafka_name(@_native)
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+
28
+ ::Rdkafka::Producer.include ::WaterDrop::Patches::Rdkafka::Producer
@@ -19,7 +19,7 @@ module WaterDrop
19
19
 
20
20
  @monitor.instrument(
21
21
  'message.produced_async',
22
- producer: self,
22
+ producer_id: id,
23
23
  message: message
24
24
  ) { client.produce(**message) }
25
25
  end
@@ -40,7 +40,7 @@ module WaterDrop
40
40
 
41
41
  @monitor.instrument(
42
42
  'messages.produced_async',
43
- producer: self,
43
+ producer_id: id,
44
44
  messages: messages
45
45
  ) do
46
46
  messages.map { |message| client.produce(**message) }
@@ -23,8 +23,9 @@ module WaterDrop
23
23
 
24
24
  @monitor.instrument(
25
25
  'message.buffered',
26
- producer: self,
27
- message: message
26
+ producer_id: id,
27
+ message: message,
28
+ buffer: @messages
28
29
  ) { @messages << message }
29
30
  end
30
31
 
@@ -40,8 +41,9 @@ module WaterDrop
40
41
 
41
42
  @monitor.instrument(
42
43
  'messages.buffered',
43
- producer: self,
44
- messages: messages
44
+ producer_id: id,
45
+ messages: messages,
46
+ buffer: @messages
45
47
  ) do
46
48
  messages.each { |message| @messages << message }
47
49
  messages
@@ -56,7 +58,7 @@ module WaterDrop
56
58
 
57
59
  @monitor.instrument(
58
60
  'buffer.flushed_async',
59
- producer: self,
61
+ producer_id: id,
60
62
  messages: @messages
61
63
  ) { flush(false) }
62
64
  end
@@ -69,7 +71,7 @@ module WaterDrop
69
71
 
70
72
  @monitor.instrument(
71
73
  'buffer.flushed_sync',
72
- producer: self,
74
+ producer_id: id,
73
75
  messages: @messages
74
76
  ) { flush(true) }
75
77
  end
@@ -103,8 +105,13 @@ module WaterDrop
103
105
  )
104
106
  end
105
107
  rescue *RESCUED_ERRORS => e
106
- key = sync ? 'buffer.flushed_sync.error' : 'buffer.flush_async.error'
107
- @monitor.instrument(key, producer: self, error: e, dispatched: dispatched)
108
+ @monitor.instrument(
109
+ 'error.occurred',
110
+ error: e,
111
+ producer_id: id,
112
+ dispatched: dispatched,
113
+ type: sync ? 'buffer.flushed_sync.error' : 'buffer.flush_async.error'
114
+ )
108
115
 
109
116
  raise Errors::FlushFailureError.new(dispatched)
110
117
  end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WaterDrop
4
+ class Producer
5
+ # Class used to construct the rdkafka producer client
6
+ class Builder
7
+ # @param producer [Producer] not yet configured producer for which we want to
8
+ # build the client
9
+ # @param config [Object] dry-configurable based configuration object
10
+ # @return [Rdkafka::Producer, Producer::DummyClient] raw rdkafka producer or a dummy producer
11
+ # when we don't want to dispatch any messages
12
+ def call(producer, config)
13
+ return DummyClient.new unless config.deliver
14
+
15
+ client = Rdkafka::Config.new(config.kafka.to_h).producer
16
+
17
+ # This callback is not global and is per client, thus we do not have to wrap it with a
18
+ # callbacks manager to make it work
19
+ client.delivery_callback = Instrumentation::Callbacks::Delivery.new(
20
+ producer.id,
21
+ config.monitor
22
+ )
23
+
24
+ client
25
+ end
26
+ end
27
+ end
28
+ end
@@ -21,7 +21,7 @@ module WaterDrop
21
21
 
22
22
  @monitor.instrument(
23
23
  'message.produced_sync',
24
- producer: self,
24
+ producer_id: id,
25
25
  message: message
26
26
  ) do
27
27
  client
@@ -49,7 +49,7 @@ module WaterDrop
49
49
  ensure_active!
50
50
  messages.each { |message| validate_message!(message) }
51
51
 
52
- @monitor.instrument('messages.produced_sync', producer: self, messages: messages) do
52
+ @monitor.instrument('messages.produced_sync', producer_id: id, messages: messages) do
53
53
  messages
54
54
  .map { |message| client.produce(**message) }
55
55
  .map! do |handler|
@@ -70,15 +70,29 @@ module WaterDrop
70
70
 
71
71
  # We undefine all the finalizers, in case it was a fork, so the finalizers from the parent
72
72
  # process don't leak
73
- ObjectSpace.undefine_finalizer(self)
73
+ ObjectSpace.undefine_finalizer(id)
74
74
  # Finalizer tracking is needed for handling shutdowns gracefully.
75
75
  # I don't expect everyone to remember about closing all the producers all the time, thus
76
76
  # this approach is better. Although it is still worth keeping in mind, that this will
77
- # block GC from removing a no longer used producer unless closed properly
78
- ObjectSpace.define_finalizer(self, proc { close })
77
+ # block GC from removing a no longer used producer unless closed properly but at least
78
+ # won't crash the VM upon closing the process
79
+ ObjectSpace.define_finalizer(id, proc { close })
79
80
 
80
81
  @pid = Process.pid
81
82
  @client = Builder.new.call(self, @config)
83
+
84
+ # Register statistics runner for this particular type of callbacks
85
+ ::WaterDrop::Instrumentation.statistics_callbacks.add(
86
+ @id,
87
+ Instrumentation::Callbacks::Statistics.new(@id, @client.name, @config.monitor)
88
+ )
89
+
90
+ # Register error tracking callback
91
+ ::WaterDrop::Instrumentation.error_callbacks.add(
92
+ @id,
93
+ Instrumentation::Callbacks::Error.new(@id, @client.name, @config.monitor)
94
+ )
95
+
82
96
  @status.connected!
83
97
  end
84
98
 
@@ -92,21 +106,27 @@ module WaterDrop
92
106
 
93
107
  @monitor.instrument(
94
108
  'producer.closed',
95
- producer: self
109
+ producer_id: id
96
110
  ) do
97
111
  @status.closing!
98
112
 
99
113
  # No need for auto-gc if everything got closed by us
100
114
  # This should be used only in case a producer was not closed properly and forgotten
101
- ObjectSpace.undefine_finalizer(self)
115
+ ObjectSpace.undefine_finalizer(id)
102
116
 
103
- # Flush has it's own buffer mutex but even if it is blocked, flushing can still happen
117
+ # Flush has its own buffer mutex but even if it is blocked, flushing can still happen
104
118
  # as we close the client after the flushing (even if blocked by the mutex)
105
- flush(false)
119
+ flush(true)
106
120
 
107
121
  # We should not close the client in several threads the same time
108
122
  # It is safe to run it several times but not exactly the same moment
109
- client.close
123
+ # We also mark it as closed only if it was connected, if not, it would trigger a new
124
+ # connection that anyhow would be immediately closed
125
+ client.close if @client
126
+
127
+ # Remove callbacks runners that were registered
128
+ ::WaterDrop::Instrumentation.statistics_callbacks.delete(@id)
129
+ ::WaterDrop::Instrumentation.error_callbacks.delete(@id)
110
130
 
111
131
  @status.closed!
112
132
  end
@@ -130,13 +150,7 @@ module WaterDrop
130
150
  # @param message [Hash] message we want to send
131
151
  # @raise [Karafka::Errors::MessageInvalidError]
132
152
  def validate_message!(message)
133
- result = @contract.call(message)
134
- return if result.success?
135
-
136
- raise Errors::MessageInvalidError, [
137
- result.errors.to_h,
138
- message
139
- ]
153
+ @contract.validate!(message, Errors::MessageInvalidError)
140
154
  end
141
155
  end
142
156
  end
@@ -3,5 +3,5 @@
3
3
  # WaterDrop library
4
4
  module WaterDrop
5
5
  # Current WaterDrop version
6
- VERSION = '2.0.0'
6
+ VERSION = '2.4.0'
7
7
  end
data/lib/waterdrop.rb CHANGED
@@ -1,4 +1,35 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # This file is used as a compatibility step
4
- require 'water_drop'
3
+ # External components
4
+ # delegate should be removed because we don't need it, we just add it because of ruby-kafka
5
+ %w[
6
+ karafka-core
7
+ forwardable
8
+ rdkafka
9
+ json
10
+ zeitwerk
11
+ securerandom
12
+ ].each { |lib| require lib }
13
+
14
+ # WaterDrop library
15
+ module WaterDrop
16
+ class << self
17
+ # @return [String] root path of this gem
18
+ def gem_root
19
+ Pathname.new(File.expand_path('..', __dir__))
20
+ end
21
+ end
22
+ end
23
+
24
+ loader = Zeitwerk::Loader.for_gem
25
+ loader.inflector.inflect('waterdrop' => 'WaterDrop')
26
+ # Do not load vendors instrumentation components. Those need to be required manually if needed
27
+ loader.ignore("#{__dir__}/waterdrop/instrumentation/vendors/**/*.rb")
28
+ loader.setup
29
+ loader.eager_load
30
+
31
+ # Rdkafka uses a single global callback for things. We bypass that by injecting a manager for
32
+ # each callback type. Callback manager allows us to register more than one callback
33
+ # @note Those managers are also used by Karafka for consumer related statistics
34
+ Rdkafka::Config.statistics_callback = WaterDrop::Instrumentation.statistics_callbacks
35
+ Rdkafka::Config.error_callback = WaterDrop::Instrumentation.error_callbacks
data/waterdrop.gemspec CHANGED
@@ -3,7 +3,7 @@
3
3
  lib = File.expand_path('lib', __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
- require 'water_drop/version'
6
+ require 'waterdrop/version'
7
7
 
8
8
  Gem::Specification.new do |spec|
9
9
  spec.name = 'waterdrop'
@@ -11,19 +11,16 @@ Gem::Specification.new do |spec|
11
11
  spec.platform = Gem::Platform::RUBY
12
12
  spec.authors = ['Maciej Mensfeld']
13
13
  spec.email = %w[maciej@mensfeld.pl]
14
- spec.homepage = 'https://github.com/karafka/waterdrop'
14
+ spec.homepage = 'https://karafka.io'
15
15
  spec.summary = 'Kafka messaging made easy!'
16
16
  spec.description = spec.summary
17
- spec.license = 'LGPL-3.0'
17
+ spec.license = 'MIT'
18
18
 
19
- spec.add_dependency 'concurrent-ruby', '>= 1.1'
20
- spec.add_dependency 'dry-configurable', '~> 0.8'
21
- spec.add_dependency 'dry-monitor', '~> 0.3'
22
- spec.add_dependency 'dry-validation', '~> 1.3'
23
- spec.add_dependency 'rdkafka', '>= 0.6.0'
24
- spec.add_dependency 'zeitwerk', '~> 2.1'
19
+ spec.add_dependency 'karafka-core', '~> 2.0'
20
+ spec.add_dependency 'rdkafka', '>= 0.10'
21
+ spec.add_dependency 'zeitwerk', '~> 2.3'
25
22
 
26
- spec.required_ruby_version = '>= 2.5.0'
23
+ spec.required_ruby_version = '>= 2.7'
27
24
 
28
25
  if $PROGRAM_NAME.end_with?('gem')
29
26
  spec.signing_key = File.expand_path('~/.ssh/gem-private_key.pem')
@@ -33,4 +30,9 @@ Gem::Specification.new do |spec|
33
30
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
34
31
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
35
32
  spec.require_paths = %w[lib]
33
+
34
+ spec.metadata = {
35
+ 'source_code_uri' => 'https://github.com/karafka/waterdrop',
36
+ 'rubygems_mfa_required' => 'true'
37
+ }
36
38
  end
data.tar.gz.sig CHANGED
Binary file
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.0.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -11,115 +11,73 @@ cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
13
  MIIEODCCAqCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhtYWNp
14
- ZWovREM9bWVuc2ZlbGQvREM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/YRm6sB2AXqScc1+ECRi
34
- 2DND//YJUikn1zwbz1kT70XmHd97B4Eytpln7K+M1u2g1pHVEPW4owD/ammXNpUy
35
- nt70FcDD4yxJQ+0YNiHd0N8IcVBM1TMIVctMNQ==
27
+ c2ZlbGQucGwwDQYJKoZIhvcNAQELBQADggGBADD0/UuTTFgW+CGk2U0RDw2RBOca
28
+ W2LTF/G7AOzuzD0Tc4voc7WXyrgKwJREv8rgBimLnNlgmFJLmtUCh2U/MgxvcilH
29
+ yshYcbseNvjkrtYnLRlWZR4SSB6Zei5AlyGVQLPkvdsBpNegcG6w075YEwzX/38a
30
+ 8V9B/Yri2OGELBz8ykl7BsXUgNoUPA/4pHF6YRLz+VirOaUIQ4JfY7xGj6fSOWWz
31
+ /rQ/d77r6o1mfJYM/3BRVg73a3b7DmRnE5qjwmSaSQ7u802pJnLesmArch0xGCT/
32
+ fMmRli1Qb+6qOTl9mzD6UDMAyFR4t6MStLm0mIEqM0nBO5nUdUWbC7l9qXEf8XBE
33
+ 2DP28p3EqSuS+lKbAWKcqv7t0iRhhmaod+Yn9mcrLN1sa3q3KSQ9BCyxezCD4Mk2
34
+ R2P11bWoCtr70BsccVrN8jEhzwXngMyI2gVt750Y+dbTu1KgRqZKp/ECe7ZzPzXj
35
+ pIy9vHxTANKYVyI4qj8OrFdEM5BQNu8oQpL0iQ==
36
36
  -----END CERTIFICATE-----
37
- date: 2020-12-13 00:00:00.000000000 Z
37
+ date: 2022-07-28 00:00:00.000000000 Z
38
38
  dependencies:
39
39
  - !ruby/object:Gem::Dependency
40
- name: concurrent-ruby
41
- requirement: !ruby/object:Gem::Requirement
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: '1.1'
46
- type: :runtime
47
- prerelease: false
48
- version_requirements: !ruby/object:Gem::Requirement
49
- requirements:
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: '1.1'
53
- - !ruby/object:Gem::Dependency
54
- name: dry-configurable
55
- requirement: !ruby/object:Gem::Requirement
56
- requirements:
57
- - - "~>"
58
- - !ruby/object:Gem::Version
59
- version: '0.8'
60
- type: :runtime
61
- prerelease: false
62
- version_requirements: !ruby/object:Gem::Requirement
63
- requirements:
64
- - - "~>"
65
- - !ruby/object:Gem::Version
66
- version: '0.8'
67
- - !ruby/object:Gem::Dependency
68
- name: dry-monitor
69
- requirement: !ruby/object:Gem::Requirement
70
- requirements:
71
- - - "~>"
72
- - !ruby/object:Gem::Version
73
- version: '0.3'
74
- type: :runtime
75
- prerelease: false
76
- version_requirements: !ruby/object:Gem::Requirement
77
- requirements:
78
- - - "~>"
79
- - !ruby/object:Gem::Version
80
- version: '0.3'
81
- - !ruby/object:Gem::Dependency
82
- name: dry-validation
40
+ name: karafka-core
83
41
  requirement: !ruby/object:Gem::Requirement
84
42
  requirements:
85
43
  - - "~>"
86
44
  - !ruby/object:Gem::Version
87
- version: '1.3'
45
+ version: '2.0'
88
46
  type: :runtime
89
47
  prerelease: false
90
48
  version_requirements: !ruby/object:Gem::Requirement
91
49
  requirements:
92
50
  - - "~>"
93
51
  - !ruby/object:Gem::Version
94
- version: '1.3'
52
+ version: '2.0'
95
53
  - !ruby/object:Gem::Dependency
96
54
  name: rdkafka
97
55
  requirement: !ruby/object:Gem::Requirement
98
56
  requirements:
99
57
  - - ">="
100
58
  - !ruby/object:Gem::Version
101
- version: 0.6.0
59
+ version: '0.10'
102
60
  type: :runtime
103
61
  prerelease: false
104
62
  version_requirements: !ruby/object:Gem::Requirement
105
63
  requirements:
106
64
  - - ">="
107
65
  - !ruby/object:Gem::Version
108
- version: 0.6.0
66
+ version: '0.10'
109
67
  - !ruby/object:Gem::Dependency
110
68
  name: zeitwerk
111
69
  requirement: !ruby/object:Gem::Requirement
112
70
  requirements:
113
71
  - - "~>"
114
72
  - !ruby/object:Gem::Version
115
- version: '2.1'
73
+ version: '2.3'
116
74
  type: :runtime
117
75
  prerelease: false
118
76
  version_requirements: !ruby/object:Gem::Requirement
119
77
  requirements:
120
78
  - - "~>"
121
79
  - !ruby/object:Gem::Version
122
- version: '2.1'
80
+ version: '2.3'
123
81
  description: Kafka messaging made easy!
124
82
  email:
125
83
  - maciej@mensfeld.pl
@@ -129,7 +87,6 @@ extra_rdoc_files: []
129
87
  files:
130
88
  - ".coditsu/ci.yml"
131
89
  - ".diffend.yml"
132
- - ".github/FUNDING.yml"
133
90
  - ".github/workflows/ci.yml"
134
91
  - ".gitignore"
135
92
  - ".rspec"
@@ -138,36 +95,46 @@ files:
138
95
  - CHANGELOG.md
139
96
  - Gemfile
140
97
  - Gemfile.lock
141
- - LICENSE
98
+ - MIT-LICENSE
142
99
  - README.md
143
100
  - certs/mensfeld.pem
144
101
  - config/errors.yml
145
102
  - docker-compose.yml
146
- - lib/water_drop.rb
147
- - lib/water_drop/config.rb
148
- - lib/water_drop/contracts.rb
149
- - lib/water_drop/contracts/config.rb
150
- - lib/water_drop/contracts/message.rb
151
- - lib/water_drop/errors.rb
152
- - lib/water_drop/instrumentation.rb
153
- - lib/water_drop/instrumentation/monitor.rb
154
- - lib/water_drop/instrumentation/stdout_listener.rb
155
- - lib/water_drop/producer.rb
156
- - lib/water_drop/producer/async.rb
157
- - lib/water_drop/producer/buffer.rb
158
- - lib/water_drop/producer/builder.rb
159
- - lib/water_drop/producer/dummy_client.rb
160
- - lib/water_drop/producer/statistics_decorator.rb
161
- - lib/water_drop/producer/status.rb
162
- - lib/water_drop/producer/sync.rb
163
- - lib/water_drop/version.rb
164
103
  - lib/waterdrop.rb
104
+ - lib/waterdrop/config.rb
105
+ - lib/waterdrop/contracts.rb
106
+ - lib/waterdrop/contracts/config.rb
107
+ - lib/waterdrop/contracts/message.rb
108
+ - lib/waterdrop/errors.rb
109
+ - lib/waterdrop/instrumentation.rb
110
+ - lib/waterdrop/instrumentation/callbacks/delivery.rb
111
+ - lib/waterdrop/instrumentation/callbacks/error.rb
112
+ - lib/waterdrop/instrumentation/callbacks/statistics.rb
113
+ - lib/waterdrop/instrumentation/callbacks/statistics_decorator.rb
114
+ - lib/waterdrop/instrumentation/callbacks_manager.rb
115
+ - lib/waterdrop/instrumentation/logger_listener.rb
116
+ - lib/waterdrop/instrumentation/monitor.rb
117
+ - lib/waterdrop/instrumentation/notifications.rb
118
+ - lib/waterdrop/instrumentation/vendors/datadog/dashboard.json
119
+ - lib/waterdrop/instrumentation/vendors/datadog/listener.rb
120
+ - lib/waterdrop/patches/rdkafka/bindings.rb
121
+ - lib/waterdrop/patches/rdkafka/producer.rb
122
+ - lib/waterdrop/producer.rb
123
+ - lib/waterdrop/producer/async.rb
124
+ - lib/waterdrop/producer/buffer.rb
125
+ - lib/waterdrop/producer/builder.rb
126
+ - lib/waterdrop/producer/dummy_client.rb
127
+ - lib/waterdrop/producer/status.rb
128
+ - lib/waterdrop/producer/sync.rb
129
+ - lib/waterdrop/version.rb
165
130
  - log/.gitkeep
166
131
  - waterdrop.gemspec
167
- homepage: https://github.com/karafka/waterdrop
132
+ homepage: https://karafka.io
168
133
  licenses:
169
- - LGPL-3.0
170
- metadata: {}
134
+ - MIT
135
+ metadata:
136
+ source_code_uri: https://github.com/karafka/waterdrop
137
+ rubygems_mfa_required: 'true'
171
138
  post_install_message:
172
139
  rdoc_options: []
173
140
  require_paths:
@@ -176,14 +143,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
176
143
  requirements:
177
144
  - - ">="
178
145
  - !ruby/object:Gem::Version
179
- version: 2.5.0
146
+ version: '2.7'
180
147
  required_rubygems_version: !ruby/object:Gem::Requirement
181
148
  requirements:
182
149
  - - ">="
183
150
  - !ruby/object:Gem::Version
184
151
  version: '0'
185
152
  requirements: []
186
- rubygems_version: 3.1.4
153
+ rubygems_version: 3.3.7
187
154
  signing_key:
188
155
  specification_version: 4
189
156
  summary: Kafka messaging made easy!
metadata.gz.sig CHANGED
Binary file
data/.github/FUNDING.yml DELETED
@@ -1 +0,0 @@
1
- open_collective: karafka