harness-active_publisher 0.1.0 → 0.2.0

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
  SHA1:
3
- metadata.gz: 85eae20bebf88c4187fdc0a12e63eb60f9162008
4
- data.tar.gz: d1b249f31f9ace73e50f6fe1da1ca26f50d202de
3
+ metadata.gz: 6bf9276871c3cb691efb0fed546bc31b90f5397b
4
+ data.tar.gz: 22ac78e43de03582bf7c0b68e9d796926857df3e
5
5
  SHA512:
6
- metadata.gz: fc7662399f11c6925fc9e374f069b6c3191808cb0e521fb75b2d724405fc631cb320585a01bf907f6d85caf2980020d80b6e8eb47b9a26f553b7120a2e6e3a4c
7
- data.tar.gz: a55819f8be27e6798a84aab3d82bac927b930521152674fe541ff278a0fcc03073581cffb177ee362dd5ee02fa45ad25147c5d615c43a34bd5abc3c5a88d0ebd
6
+ metadata.gz: 59794d2361816a3713278f3cc9a4bc005dd912581b8ad37eb1f2dd6f1787ae0207af767201b6810ef50a226a61888d52d1688caeb094f33cf8afab6cde429cb6
7
+ data.tar.gz: 0a97787b47c04935442bb233fe357816d16db3b9ac2a5b6d254a75d167e428faff83028e3322fdbe838c3c685ed0221a608da063dab6517f8e2c8ef513b6542d
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ["lib"]
23
23
 
24
+ spec.add_runtime_dependency "activesupport", ">= 3.2"
24
25
  spec.add_runtime_dependency "harness", ">= 2.0.0"
25
26
 
26
27
  spec.add_development_dependency "bundler", "~> 1.15"
@@ -1,5 +1,23 @@
1
1
  require "harness/active_publisher/version"
2
2
 
3
+ require "harness"
4
+ require "active_support"
5
+
6
+ ::ActiveSupport::Notifications.subscribe "async_queue_size.active_publisher" do |_, _, _, _, async_queue_size|
7
+ ::Harness.gauge "active_publisher.async_queue_size", async_queue_size
8
+ end
9
+
10
+ ::ActiveSupport::Notifications.subscribe "message_dropped.active_publisher" do
11
+ ::Harness.increment "active_publisher.message_dropped"
12
+ end
13
+
14
+ ::ActiveSupport::Notifications.subscribe "message_published.active_publisher" do |*args|
15
+ ::Harness.increment "active_publisher.messages_published"
16
+
17
+ event = ::ActiveSupport::Notifications::Event.new(*args)
18
+ ::Harness.timing "active_publisher.publish_latency", event.duration
19
+ end
20
+
3
21
  ::ActiveSupport::Notifications.subscribe "wait_for_async_queue.active_publisher" do |*args|
4
22
  event = ::ActiveSupport::Notifications::Event.new(*args)
5
23
  ::Harness.timing "active_publisher.waiting_for_async_queue", event.duration
@@ -1,5 +1,5 @@
1
1
  module Harness
2
2
  module ActivePublisher
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harness-active_publisher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Ries
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-30 00:00:00.000000000 Z
11
+ date: 2017-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '3.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '3.2'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: harness
15
29
  requirement: !ruby/object:Gem::Requirement