alacrity-rails 0.8.2 → 0.9.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: 27fe3639f0bd5c2a21549bd8dc70b556b9dfd2b7
4
- data.tar.gz: 1f2082d5b7155697f1e0d1694fdfebb2bdd9dae8
3
+ metadata.gz: c20b077e539977d327f8e4f3706ab279ee97ce9f
4
+ data.tar.gz: 5847604c15ed207d8e53935381526202af9d6f1c
5
5
  SHA512:
6
- metadata.gz: b610ad5ab07187adce226ba90e827233fc68db80baa75ffeab51dd2f0cd0795cba59a014b88e4e7b387b9eeab3fada574b4f9a8d4f1f2fbcb2ef311c61804a8d
7
- data.tar.gz: 7fe8ec8d3f99d178ca65c1fa6d6354a43ba527ed3049cb8b94167bc4d30eb3d45b4839d7b71a66cdaae47f9bf1360968dd24811caaeffd49dd8437202df42106
6
+ metadata.gz: 98ff75edc7d3c32dc2294cd9da6e5dae0b193a08a7c196811a0bac06c7fd08667614c84296c601b96899a17b68a715821682a9e1c595b4c6e6fa28715fd49e7c
7
+ data.tar.gz: 96826fa45f10a3de58b0dc97ca1842a2204a71212c975c2729d02bdf00455b927575b747628e73c285264bd7ea6b83e0ddbe524d3caf121d1174428f964d5ad6
@@ -18,6 +18,7 @@ module AlacrityRails
18
18
  autoload :ActiveModelSerializers, 'alacrity-rails/probe/active_model_serializers'
19
19
  autoload :ActiveJob, 'alacrity-rails/probe/active_job'
20
20
  autoload :ActiveRecord, 'alacrity-rails/probe/active_record'
21
+ autoload :Excon, 'alacrity-rails/probe/excon'
21
22
  autoload :MongoDriver, 'alacrity-rails/probe/mongo_driver'
22
23
  end
23
24
 
@@ -0,0 +1,26 @@
1
+ module AlacrityRails
2
+ module Probe
3
+ class Excon
4
+ def self.activate
5
+ ::Excon.defaults[:instrumentor] = self if defined?(::Excon)
6
+ end
7
+
8
+ def self.instrument(name, data, &block)
9
+ return unless name == 'excon.request'
10
+
11
+ started = DateTime.now
12
+
13
+ block&
14
+
15
+ AlacrityRails::Client.store_timeline_event(
16
+ name: 'Excon Request',
17
+ event_type: 'http',
18
+ engine: 'Excon',
19
+ started_at: started,
20
+ finished_at: DateTime.now,
21
+ detail: "#{data[:scheme]}://#{data[:host]}#{data[:path]}"
22
+ )
23
+ end
24
+ end
25
+ end
26
+ end
@@ -1,3 +1,3 @@
1
1
  module AlacrityRails
2
- VERSION = '0.8.2'
2
+ VERSION = '0.9.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alacrity-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alacrity, LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-21 00:00:00.000000000 Z
11
+ date: 2017-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -45,6 +45,7 @@ files:
45
45
  - lib/alacrity-rails/probe/active_job.rb
46
46
  - lib/alacrity-rails/probe/active_model_serializers.rb
47
47
  - lib/alacrity-rails/probe/active_record.rb
48
+ - lib/alacrity-rails/probe/excon.rb
48
49
  - lib/alacrity-rails/probe/mongo_driver.rb
49
50
  - lib/alacrity-rails/railtie.rb
50
51
  - lib/alacrity-rails/server_config.rb