sbmt-outbox 6.4.1 → 6.4.2

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: 6f4bad1209d38b5bc078043b5f70ebb021709b6fb6ec46ea21f07469e361c96c
4
- data.tar.gz: 239b12886db166a8e1eecc77418c18a3da324220877ebec1a26071916675630a
3
+ metadata.gz: 12dbb1d333578c0091fc9431a10565b46d6bac9b1d1f0e1a44ca29961d228ee0
4
+ data.tar.gz: 751f275efd1897045ffe2e1555d08dc1d40b9abed4004d929b293fa0e108a9da
5
5
  SHA512:
6
- metadata.gz: b279fdac2c90a1e52c93c6f6bf500dea62329b3fd1c3fa7de348a7931ac92c653addb462cf7e66521f4566017a13aaaa0e0541ebc0b9c144868caf3904f1c4f4
7
- data.tar.gz: 852f86d9894830a4e4e5ac9943647b05769ded665abfb65590470f9f3114b2acb86fe52cf58adaf74ce34cf9caf529765f10675eda9c02e07e1be709a754d826
6
+ metadata.gz: ea624329a551214837e11f834e7593f9f803f39dcb1b072ac05258de4b928d6b75a7af9691481fc8ae1e008265c4a9a3534a6829f6a2e630eb2e04f1b38312bd
7
+ data.tar.gz: 47d4286a22913430ca45ddd36b9002a5ae178b05e0e0baa8b33a1c7af836ec5d5fd4e0d4e3beb05083368830b0e9d4b5dcd52bfaf689ed653a5c0f568cfd5af0
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "sbmt/outbox/metrics/utils"
4
+
3
5
  module Sbmt
4
6
  module Outbox
5
7
  class ProcessItem < Sbmt::Outbox::DryInteractor
@@ -255,7 +257,7 @@ module Sbmt
255
257
  end
256
258
 
257
259
  def labels_for(item)
258
- {worker_version: worker_version, type: box_type, name: box_name, owner: owner, partition: item&.partition}
260
+ {worker_version: worker_version, type: box_type, name: Sbmt::Outbox::Metrics::Utils.metric_safe(box_name), owner: owner, partition: item&.partition}
259
261
  end
260
262
 
261
263
  def counters
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sbmt
4
+ module Outbox
5
+ module Metrics
6
+ module Utils
7
+ extend self
8
+
9
+ def metric_safe(str)
10
+ str.tr("/", "-")
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "redlock"
4
4
  require "sbmt/outbox/v1/thread_pool"
5
+ require "sbmt/outbox/metrics/utils"
5
6
 
6
7
  module Sbmt
7
8
  module Outbox
@@ -126,7 +127,7 @@ module Sbmt
126
127
  },
127
128
  yabeda_labels: {
128
129
  type: item_class.box_type,
129
- name: item_class.box_name,
130
+ name: Sbmt::Outbox::Metrics::Utils.metric_safe(item_class.box_name),
130
131
  partition: partition,
131
132
  owner: item_class.owner
132
133
  },
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "sbmt/outbox/metrics/utils"
4
+
3
5
  module Sbmt
4
6
  module Outbox
5
7
  module V2
@@ -23,7 +25,7 @@ module Sbmt
23
25
 
24
26
  @yabeda_labels = {
25
27
  type: item_class.box_type,
26
- name: metric_safe(item_class.box_name),
28
+ name: Sbmt::Outbox::Metrics::Utils.metric_safe(item_class.box_name),
27
29
  owner: owner,
28
30
  worker_version: 2,
29
31
  worker_name: worker_name
@@ -38,12 +40,6 @@ module Sbmt
38
40
  end
39
41
  result
40
42
  end
41
-
42
- private
43
-
44
- def metric_safe(str)
45
- str.tr("/", "-")
46
- end
47
43
  end
48
44
  end
49
45
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sbmt
4
4
  module Outbox
5
- VERSION = "6.4.1"
5
+ VERSION = "6.4.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sbmt-outbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.4.1
4
+ version: 6.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sbermarket Ruby-Platform Team
@@ -579,6 +579,7 @@ files:
579
579
  - lib/sbmt/outbox/errors.rb
580
580
  - lib/sbmt/outbox/instrumentation/open_telemetry_loader.rb
581
581
  - lib/sbmt/outbox/logger.rb
582
+ - lib/sbmt/outbox/metrics/utils.rb
582
583
  - lib/sbmt/outbox/middleware/builder.rb
583
584
  - lib/sbmt/outbox/middleware/open_telemetry/tracing_create_item_middleware.rb
584
585
  - lib/sbmt/outbox/middleware/open_telemetry/tracing_item_process_middleware.rb