harness-active_publisher 1.1.3 → 1.1.4

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: f187266298b66d058ed28c3d59d5399737856b249325691425416b3743ca328e
4
- data.tar.gz: 64dc4ad6a45a148df1345881c303997077ab65eb52439d16d630a9e8a7a01015
3
+ metadata.gz: 7279ea648248d479891fdfbd4cc1862ebb87d44d0f9dcb959b3eb3e1099af7e5
4
+ data.tar.gz: 51087f85e2822c2d1f21fac5c1923321da7dc432d6ee4b04dd3bbad7b6074022
5
5
  SHA512:
6
- metadata.gz: d0c4e3e50122b2c7414f25e3b91c08721dcf50ff1cb5dea015cc0f63cf559bafcd2b31d877c1c73665e635662ca5128ee4598e64e96abaff0e574802768bafa5
7
- data.tar.gz: 345d3ef03434d9be7652e143ceda58b7f9e39dba4d3003261d291aeb984b523514680d9ddb36892575824b676c94c4be37344b37cfa1e67ef36ae291b9b40c57
6
+ metadata.gz: b093298585fd0f98734d824fe92a8450672f4fc6c7063f07b9147ee1de55d75385ebde8e11147a83c64d7cc44e014e7bff796f9c88825081e12bad0cf59bb1f9
7
+ data.tar.gz: c56488db3d451da8d715ec40cd23fe46946ab2861deddd580f1caac79b2601ed6d9201745955e2843651c3c08e38c851f68ce281fd4b521bc0abdbf99103462c
@@ -1,5 +1,5 @@
1
1
  module Harness
2
2
  module ActivePublisher
3
- VERSION = "1.1.3"
3
+ VERSION = "1.1.4"
4
4
  end
5
5
  end
@@ -5,13 +5,15 @@ require "active_support"
5
5
 
6
6
  module Harness
7
7
  module ActivePublisher
8
- DROPPED_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "message_dropped"].reject(&:nil?).join(".").freeze
9
- LATENCY_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "publish_latency"].reject(&:nil?).join(".").freeze
10
- PUBLISHED_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "messages_published"].reject(&:nil?).join(".").freeze
11
- QUEUE_SIZE_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "async_queue_size"].reject(&:nil?).join(".").freeze
12
- REDIS_QUEUE_SIZE_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "redis_async_queue_size"].reject(&:nil?).join(".").freeze
13
- WAIT_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "waiting_for_async_queue"].reject(&:nil?).join(".").freeze
14
- UNBLOCKED_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "connection", "unblocked"].reject(&:nil?).join(".").freeze
8
+ DROPPED_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "message_dropped"].reject(&:nil?).join(".").freeze
9
+ LATENCY_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "publish_latency"].reject(&:nil?).join(".").freeze
10
+ PUBLISH_CONFIRM_LATENCY_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "publishes_confirmed_latency"].reject(&:nil?).join(".").freeze
11
+ PUBLISH_CONFIRMED_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "publishes_confirmed"].reject(&:nil?).join(".").freeze
12
+ PUBLISHED_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "messages_published"].reject(&:nil?).join(".").freeze
13
+ QUEUE_SIZE_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "async_queue_size"].reject(&:nil?).join(".").freeze
14
+ REDIS_QUEUE_SIZE_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "redis_async_queue_size"].reject(&:nil?).join(".").freeze
15
+ WAIT_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "waiting_for_async_queue"].reject(&:nil?).join(".").freeze
16
+ UNBLOCKED_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "connection", "unblocked"].reject(&:nil?).join(".").freeze
15
17
 
16
18
  REASON_IS_MISSING = "reason_for_blocking_is_missing"
17
19
 
@@ -48,6 +50,12 @@ module Harness
48
50
  ::Harness.timing LATENCY_METRIC, event.duration
49
51
  end
50
52
 
53
+ ::ActiveSupport::Notifications.subscribe "publishes_confirmed.active_publisher" do |*args|
54
+ event = ::ActiveSupport::Notifications::Event.new(*args)
55
+ ::Harness.increment PUBLISH_CONFIRMED_METRIC
56
+ ::Harness.timing PUBLISH_CONFIRM_LATENCY_METRIC, event.duration
57
+ end
58
+
51
59
  ::ActiveSupport::Notifications.subscribe "wait_for_async_queue.active_publisher" do |*args|
52
60
  event = ::ActiveSupport::Notifications::Event.new(*args)
53
61
  ::Harness.timing WAIT_METRIC, event.duration
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harness-active_publisher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Ries
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-20 00:00:00.000000000 Z
11
+ date: 2021-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -105,7 +105,7 @@ homepage: https://github.com/mxenabled/harness-active_publisher
105
105
  licenses:
106
106
  - MIT
107
107
  metadata: {}
108
- post_install_message:
108
+ post_install_message:
109
109
  rdoc_options: []
110
110
  require_paths:
111
111
  - lib
@@ -120,9 +120,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
122
  requirements: []
123
- rubyforge_project:
124
- rubygems_version: 2.7.6
125
- signing_key:
123
+ rubygems_version: 3.0.1
124
+ signing_key:
126
125
  specification_version: 4
127
126
  summary: a gem to collect instrumation stats from active_publisher and forward them
128
127
  to harness