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 +4 -4
- data/lib/alacrity-rails.rb +1 -0
- data/lib/alacrity-rails/probe/excon.rb +26 -0
- data/lib/alacrity-rails/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c20b077e539977d327f8e4f3706ab279ee97ce9f
|
4
|
+
data.tar.gz: 5847604c15ed207d8e53935381526202af9d6f1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98ff75edc7d3c32dc2294cd9da6e5dae0b193a08a7c196811a0bac06c7fd08667614c84296c601b96899a17b68a715821682a9e1c595b4c6e6fa28715fd49e7c
|
7
|
+
data.tar.gz: 96826fa45f10a3de58b0dc97ca1842a2204a71212c975c2729d02bdf00455b927575b747628e73c285264bd7ea6b83e0ddbe524d3caf121d1174428f964d5ad6
|
data/lib/alacrity-rails.rb
CHANGED
@@ -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
|
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.
|
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-
|
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
|