sbmt-kafka_producer 2.2.1 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d5ca361cbc4f800037931ef6cc82dcc8d2ffa9bf67d6963d4747a6a140ad273
|
4
|
+
data.tar.gz: 6bfdeb2245fe9b02c76f63e684f438afb3842f2ff7e0655301d668af98d0013c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1366c9c4c2f334a91ec43aaa56027e5bfd6e36d225642d4d51fb5874194baea56c14b259df054fa70a5e7cbc739c3333e49079c09b7249e2498e10fcff74e712
|
7
|
+
data.tar.gz: ba5693175d5d7187e32875ab7c08f504a4ebe274c054aee2f152ef6a5fb5086bba47350c1b12f37e520a11f72d93f869851dc704765eac7e3fcb135dcfe6e516
|
data/CHANGELOG.md
CHANGED
@@ -13,6 +13,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
13
13
|
|
14
14
|
### Fixed
|
15
15
|
|
16
|
+
## [2.2.3] - 2024-06-20
|
17
|
+
|
18
|
+
### Fixed
|
19
|
+
|
20
|
+
- Remove mock for producer client
|
21
|
+
- A singleton class of the producer client has been added for testing
|
22
|
+
|
23
|
+
## [2.2.2] - 2024-06-15
|
24
|
+
|
25
|
+
### Fixed
|
26
|
+
|
27
|
+
- Fixed display of metrics `kafka_api_calls` and `kafka_api_errors`
|
28
|
+
|
16
29
|
## [2.2.1] - 2024-06-07
|
17
30
|
|
18
31
|
### Changed
|
data/README.md
CHANGED
@@ -157,7 +157,7 @@ The gem collects base producing metrics using [Yabeda](https://github.com/yabeda
|
|
157
157
|
|
158
158
|
## Testing
|
159
159
|
|
160
|
-
To stub a producer request to real Kafka broker, you can use a
|
160
|
+
To stub a producer request to real Kafka broker, you can use a fake class. To do this, please add `require "sbmt/kafka_producer/testing"` to the `spec/rails_helper.rb`.
|
161
161
|
|
162
162
|
## Development
|
163
163
|
|
@@ -71,7 +71,7 @@ module Sbmt
|
|
71
71
|
}
|
72
72
|
|
73
73
|
Yabeda.kafka_api.calls
|
74
|
-
.increment(broker_tags, by: broker_statistics["
|
74
|
+
.increment(broker_tags, by: broker_statistics["tx_d"])
|
75
75
|
Yabeda.kafka_api.latency
|
76
76
|
.measure(broker_tags, broker_statistics["rtt"]["avg"])
|
77
77
|
Yabeda.kafka_api.request_size
|
@@ -79,7 +79,7 @@ module Sbmt
|
|
79
79
|
Yabeda.kafka_api.response_size
|
80
80
|
.measure(broker_tags, broker_statistics["rxbytes"])
|
81
81
|
Yabeda.kafka_api.errors
|
82
|
-
.increment(broker_tags, by: broker_statistics["
|
82
|
+
.increment(broker_tags, by: broker_statistics["txerrs_d"] + broker_statistics["rxerrs_d"])
|
83
83
|
end
|
84
84
|
end
|
85
85
|
end
|
@@ -1,13 +1,23 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
.to receive(:build)
|
11
|
-
.and_return(instance_double(WaterDrop::Producer, {produce_sync: true, produce_async: true}))
|
3
|
+
class FakeWaterDropClient
|
4
|
+
def produce_sync(*)
|
5
|
+
# no op
|
6
|
+
end
|
7
|
+
|
8
|
+
def produce_async(*)
|
9
|
+
# no op
|
12
10
|
end
|
13
11
|
end
|
12
|
+
|
13
|
+
Sbmt::KafkaProducer::KafkaClientFactory.singleton_class.prepend(
|
14
|
+
Module.new do
|
15
|
+
def default_client
|
16
|
+
@default_client ||= FakeWaterDropClient.new
|
17
|
+
end
|
18
|
+
|
19
|
+
def build(*)
|
20
|
+
@default_client ||= FakeWaterDropClient.new
|
21
|
+
end
|
22
|
+
end
|
23
|
+
)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sbmt-kafka_producer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sbermarket Ruby-Platform Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: anyway_config
|
@@ -426,7 +426,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
426
426
|
- !ruby/object:Gem::Version
|
427
427
|
version: '0'
|
428
428
|
requirements: []
|
429
|
-
rubygems_version: 3.5.
|
429
|
+
rubygems_version: 3.5.3
|
430
430
|
signing_key:
|
431
431
|
specification_version: 4
|
432
432
|
summary: Ruby gem for producing Kafka messages
|