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 +4 -4
- data/lib/harness/active_publisher/version.rb +1 -1
- data/lib/harness/active_publisher.rb +15 -7
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7279ea648248d479891fdfbd4cc1862ebb87d44d0f9dcb959b3eb3e1099af7e5
|
4
|
+
data.tar.gz: 51087f85e2822c2d1f21fac5c1923321da7dc432d6ee4b04dd3bbad7b6074022
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b093298585fd0f98734d824fe92a8450672f4fc6c7063f07b9147ee1de55d75385ebde8e11147a83c64d7cc44e014e7bff796f9c88825081e12bad0cf59bb1f9
|
7
|
+
data.tar.gz: c56488db3d451da8d715ec40cd23fe46946ab2861deddd580f1caac79b2601ed6d9201745955e2843651c3c08e38c851f68ce281fd4b521bc0abdbf99103462c
|
@@ -5,13 +5,15 @@ require "active_support"
|
|
5
5
|
|
6
6
|
module Harness
|
7
7
|
module ActivePublisher
|
8
|
-
DROPPED_METRIC
|
9
|
-
LATENCY_METRIC
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
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.
|
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:
|
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
|
-
|
124
|
-
|
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
|