harness-active_publisher 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1eca2ee805cae19685fd8b6d3c8c53d2e16f73c1f36990c98a54281ab05ddc1b
4
- data.tar.gz: 968c02b888552aed50543a481ab4d1aabee73137af93c441a89d8608f7520eaf
3
+ metadata.gz: e6773d54c0404bf05b4bd90172b0db46e083cb33c02eea9e883440f248f01705
4
+ data.tar.gz: 8f45cdacafb67fecffaaddf02d6d25d59fd2f13faa190fc0732711ed9b377199
5
5
  SHA512:
6
- metadata.gz: f76be7663cbc73e73182b9a990a89217242e7f40bd5200a089c43a83eb9d22d79d4e294db1c1b377c199422ce2c3ad4389e61a740327d93f852ebe07b7f69b7d
7
- data.tar.gz: cbabaf8e8ec1c4f9d50ffbc93969e1c4423ce31dffb371a1dddbb33264080160a767d4bdbaf12c4e72e1503dbf9716f83ad739373151a3fd93923f1054ade136
6
+ metadata.gz: '09363d7480d6f2fb260fd2912cd4f357f0cf6a8b65b30fbcf3f645cb063b10689204611c738689050c2bc0f25cfb8ca4f9b714187c8edd12059d29fde0fd5483'
7
+ data.tar.gz: ce1592f2e348c6ab2b45f2f0b8789475850e1ff47122dd9e2e97a5777d1ea30507ae2f375cd3c6d0f041343480150ab7ae591ab6efb24fd3b05f401d1c2f12cf
@@ -11,11 +11,24 @@ module Harness
11
11
  QUEUE_SIZE_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "async_queue_size"].reject(&:nil?).join(".").freeze
12
12
  REDIS_QUEUE_SIZE_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "redis_async_queue_size"].reject(&:nil?).join(".").freeze
13
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
14
15
 
15
16
  ::ActiveSupport::Notifications.subscribe "async_queue_size.active_publisher" do |_, _, _, _, async_queue_size|
16
17
  ::Harness.gauge QUEUE_SIZE_METRIC, async_queue_size
17
18
  end
18
19
 
20
+ ::ActiveSupport::Notifications.subscribe "connection_blocked.active_publisher" do |_, _, _, _, params|
21
+ reason = params.fetch(:reason)
22
+ blocked_metric = ["active_publisher", ENV["SERVICE_NAME"], "connection", "blocked", reason.gsub(/\W/, "_")].
23
+ reject(&:nil?).join(".")
24
+
25
+ ::Harness.increment blocked_metric
26
+ end
27
+
28
+ ::ActiveSupport::Notifications.subscribe "connection_unblocked.active_publisher" do
29
+ ::Harness.increment UNBLOCKED_METRIC
30
+ end
31
+
19
32
  ::ActiveSupport::Notifications.subscribe "redis_async_queue_size.active_publisher" do |_, _, _, _, redis_async_queue_size|
20
33
  ::Harness.gauge REDIS_QUEUE_SIZE_METRIC, redis_async_queue_size
21
34
  end
@@ -1,5 +1,5 @@
1
1
  module Harness
2
2
  module ActivePublisher
3
- VERSION = "1.1.1"
3
+ VERSION = "1.1.2"
4
4
  end
5
5
  end
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.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Ries
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-11 00:00:00.000000000 Z
11
+ date: 2020-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -120,7 +120,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
122
  requirements: []
123
- rubygems_version: 3.1.2
123
+ rubyforge_project:
124
+ rubygems_version: 2.7.6
124
125
  signing_key:
125
126
  specification_version: 4
126
127
  summary: a gem to collect instrumation stats from active_publisher and forward them