harness-active_publisher 1.1.2 → 1.1.3

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: e6773d54c0404bf05b4bd90172b0db46e083cb33c02eea9e883440f248f01705
4
- data.tar.gz: 8f45cdacafb67fecffaaddf02d6d25d59fd2f13faa190fc0732711ed9b377199
3
+ metadata.gz: f187266298b66d058ed28c3d59d5399737856b249325691425416b3743ca328e
4
+ data.tar.gz: 64dc4ad6a45a148df1345881c303997077ab65eb52439d16d630a9e8a7a01015
5
5
  SHA512:
6
- metadata.gz: '09363d7480d6f2fb260fd2912cd4f357f0cf6a8b65b30fbcf3f645cb063b10689204611c738689050c2bc0f25cfb8ca4f9b714187c8edd12059d29fde0fd5483'
7
- data.tar.gz: ce1592f2e348c6ab2b45f2f0b8789475850e1ff47122dd9e2e97a5777d1ea30507ae2f375cd3c6d0f041343480150ab7ae591ab6efb24fd3b05f401d1c2f12cf
6
+ metadata.gz: d0c4e3e50122b2c7414f25e3b91c08721dcf50ff1cb5dea015cc0f63cf559bafcd2b31d877c1c73665e635662ca5128ee4598e64e96abaff0e574802768bafa5
7
+ data.tar.gz: 345d3ef03434d9be7652e143ceda58b7f9e39dba4d3003261d291aeb984b523514680d9ddb36892575824b676c94c4be37344b37cfa1e67ef36ae291b9b40c57
@@ -13,12 +13,14 @@ module Harness
13
13
  WAIT_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "waiting_for_async_queue"].reject(&:nil?).join(".").freeze
14
14
  UNBLOCKED_METRIC = ["active_publisher", ENV["SERVICE_NAME"], "connection", "unblocked"].reject(&:nil?).join(".").freeze
15
15
 
16
+ REASON_IS_MISSING = "reason_for_blocking_is_missing"
17
+
16
18
  ::ActiveSupport::Notifications.subscribe "async_queue_size.active_publisher" do |_, _, _, _, async_queue_size|
17
19
  ::Harness.gauge QUEUE_SIZE_METRIC, async_queue_size
18
20
  end
19
21
 
20
22
  ::ActiveSupport::Notifications.subscribe "connection_blocked.active_publisher" do |_, _, _, _, params|
21
- reason = params.fetch(:reason)
23
+ reason = params.fetch(:reason) || REASON_IS_MISSING
22
24
  blocked_metric = ["active_publisher", ENV["SERVICE_NAME"], "connection", "blocked", reason.gsub(/\W/, "_")].
23
25
  reject(&:nil?).join(".")
24
26
 
@@ -1,5 +1,5 @@
1
1
  module Harness
2
2
  module ActivePublisher
3
- VERSION = "1.1.2"
3
+ VERSION = "1.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harness-active_publisher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Ries