harness-active_publisher 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/harness/active_publisher.rb +3 -1
- data/lib/harness/active_publisher/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f187266298b66d058ed28c3d59d5399737856b249325691425416b3743ca328e
|
4
|
+
data.tar.gz: 64dc4ad6a45a148df1345881c303997077ab65eb52439d16d630a9e8a7a01015
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|