sbmt-kafka_consumer 2.6.0 → 2.6.1

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: 167a1f001609eaac9e7cfb33fbd19422a89711d099dedd4b4bdc96b63731562a
4
- data.tar.gz: fe081b40a7c1d2462b95874bb9c089b7604db7c7b15e7717ce904462b90383e3
3
+ metadata.gz: '08fdb32c69e94b244084454a41b71743a059d11fa1ae35e564ca32a3ee87dafd'
4
+ data.tar.gz: b3e4365734439f273a5e42ebe6135d53627afb22a375a0d7d557d38d13a70cd5
5
5
  SHA512:
6
- metadata.gz: de1d6a79ee8fa4eb55830b186037b17b5d900cb6fba4b19556dbc78d62da7d9d8a70dd1b5c829a99dfb88ea60b78ed49ec61c75b00d377311af693167924f4b8
7
- data.tar.gz: d2fd8c167da6f471d00a5cad5542fdc0cd5815a3f0680a1bd9404203ce982bddc3b3d50ce524448113cdf97f9d5cebc56c2e23820c5d53a242f2a98e698d60fd
6
+ metadata.gz: 0744b29e11d89164bf95d0573990bf694cf3e1d09e3861402449d86f142701d2e3982fc7928bc903102bd832e03494960335df5208b3fb3d5a403f60cd9cd93a
7
+ data.tar.gz: 30c0c560a036a1febcf5af0cd66c08dc25c04ec8b5973c8f58892589c16aed4b40ca9d0358d6340228f2b715ea025afc7e2debcb1b962db6c458095f0ab48c7f
data/CHANGELOG.md CHANGED
@@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
13
13
 
14
14
  ### Fixed
15
15
 
16
+ ## [2.6.1] - 2024-07-05
17
+
18
+ ### Fixed
19
+
20
+ - Use the current `trace_id` instead of creating a new one
21
+
16
22
  ## [2.6.0] - 2024-07-01
17
23
 
18
24
  ### Added
@@ -3,8 +3,6 @@
3
3
  module Sbmt
4
4
  module KafkaConsumer
5
5
  class BaseConsumer < Karafka::BaseConsumer
6
- attr_reader :trace_id
7
-
8
6
  def self.consumer_klass(skip_on_error: false, middlewares: [])
9
7
  Class.new(self) do
10
8
  const_set(:SKIP_ON_ERROR, skip_on_error)
@@ -41,8 +39,6 @@ module Sbmt
41
39
  private
42
40
 
43
41
  def with_instrumentation(message)
44
- @trace_id = SecureRandom.base58
45
-
46
42
  logger.tagged(
47
43
  trace_id: trace_id,
48
44
  topic: message.metadata.topic, partition: message.metadata.partition,
@@ -69,8 +65,6 @@ module Sbmt
69
65
  end
70
66
 
71
67
  def with_batch_instrumentation(messages)
72
- @trace_id = SecureRandom.base58
73
-
74
68
  logger.tagged(
75
69
  trace_id: trace_id,
76
70
  first_offset: messages.first.metadata.offset,
@@ -88,8 +82,6 @@ module Sbmt
88
82
  end
89
83
 
90
84
  def with_common_instrumentation(name, message)
91
- @trace_id = SecureRandom.base58
92
-
93
85
  logger.tagged(
94
86
  trace_id: trace_id
95
87
  ) do
@@ -173,6 +165,10 @@ module Sbmt
173
165
  end
174
166
  traverse_chain.call
175
167
  end
168
+
169
+ def trace_id
170
+ @trace_id ||= SecureRandom.base58
171
+ end
176
172
  end
177
173
  end
178
174
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sbmt
4
4
  module KafkaConsumer
5
- VERSION = "2.6.0"
5
+ VERSION = "2.6.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sbmt-kafka_consumer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.6.1
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-07-01 00:00:00.000000000 Z
11
+ date: 2024-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -570,7 +570,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
570
570
  - !ruby/object:Gem::Version
571
571
  version: '0'
572
572
  requirements: []
573
- rubygems_version: 3.5.3
573
+ rubygems_version: 3.1.6
574
574
  signing_key:
575
575
  specification_version: 4
576
576
  summary: Ruby gem for consuming Kafka messages