alacrity-rails 1.0.0.beta.2 → 1.0.0.beta.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e121b9fe1d5ce57c83deef77b9a35807577212d
|
4
|
+
data.tar.gz: e5c038896cdfb5195b4268092baf8d4b93d65272
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa602f7ad4da6288b98be8d3693df9991a978cc71cb19f1814ae1c87412299f62c74caab0843f1c36af61fbc73f9bb8ddc743e9461a1cd9fdd164d1f911831ed
|
7
|
+
data.tar.gz: 5883490ba920c9ae1d9fc4d05a380deb99c33191ca1c9a3607d135d5b9294d37759286dea5430c55f65541bf5818e26dde145d32f8696e42c8dfc77a85aa7151
|
data/lib/alacrity-rails.rb
CHANGED
@@ -39,12 +39,11 @@ module AlacrityRails
|
|
39
39
|
|
40
40
|
module Transaction
|
41
41
|
autoload :Base, 'alacrity-rails/transaction/base'
|
42
|
-
autoload :BulkWebTransaction, 'alacrity-rails/transaction/bulk_web_transaction'
|
43
42
|
autoload :Diagnostic, 'alacrity-rails/transaction/diagnostic'
|
44
43
|
autoload :Custom, 'alacrity-rails/transaction/custom'
|
45
44
|
autoload :ServerStartup, 'alacrity-rails/transaction/server_startup'
|
46
45
|
autoload :Job, 'alacrity-rails/transaction/job'
|
47
|
-
autoload :
|
46
|
+
autoload :WebRequest, 'alacrity-rails/transaction/web_request'
|
48
47
|
end
|
49
48
|
end
|
50
49
|
|
@@ -2,7 +2,7 @@ module AlacrityRails
|
|
2
2
|
class Middleware < Struct.new(:app)
|
3
3
|
def call(env)
|
4
4
|
AlacrityRails::Instrumentor.instrument(
|
5
|
-
type: AlacrityRails::Transaction::
|
5
|
+
type: AlacrityRails::Transaction::WebRequest,
|
6
6
|
data: { url: env['REQUEST_URI'], method: env['REQUEST_METHOD'] },
|
7
7
|
reset: true
|
8
8
|
) do
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module AlacrityRails::Transaction
|
2
|
-
class
|
3
|
-
attr_accessor :url, :
|
2
|
+
class WebRequest < Base
|
3
|
+
attr_accessor :url, :name, :format, :method, :status
|
4
4
|
|
5
5
|
def initialize(data={})
|
6
6
|
@middleware_started_at = DateTime.now
|
@@ -9,8 +9,7 @@ module AlacrityRails::Transaction
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def store_metadata(data)
|
12
|
-
self.
|
13
|
-
self.action = data[:action]
|
12
|
+
self.name = [data[:controller], data[:action]].reject(&:blank?).join('#')
|
14
13
|
self.format = data[:format]
|
15
14
|
end
|
16
15
|
|
@@ -25,13 +24,12 @@ module AlacrityRails::Transaction
|
|
25
24
|
{
|
26
25
|
environment: AlacrityRails::ServerConfig.environment,
|
27
26
|
event_type: 'web-request',
|
27
|
+
name: name,
|
28
28
|
started_at: middleware_started_at,
|
29
29
|
finished_at: middleware_finished_at,
|
30
30
|
timeline_events: prepared_timeline_events,
|
31
31
|
data: {
|
32
32
|
url: url,
|
33
|
-
controller: controller,
|
34
|
-
action: action,
|
35
33
|
format: format,
|
36
34
|
method: method,
|
37
35
|
status: status,
|
@@ -40,7 +38,7 @@ module AlacrityRails::Transaction
|
|
40
38
|
end
|
41
39
|
|
42
40
|
def self.endpoint
|
43
|
-
@endpoint ||= URI("#{AlacrityRails::Config.collector_host}/
|
41
|
+
@endpoint ||= URI("#{AlacrityRails::Config.collector_host}/v3/events")
|
44
42
|
end
|
45
43
|
end
|
46
44
|
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: 1.0.0.beta.
|
4
|
+
version: 1.0.0.beta.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alacrity, LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -56,7 +56,7 @@ files:
|
|
56
56
|
- lib/alacrity-rails/transaction/diagnostic.rb
|
57
57
|
- lib/alacrity-rails/transaction/job.rb
|
58
58
|
- lib/alacrity-rails/transaction/server_startup.rb
|
59
|
-
- lib/alacrity-rails/transaction/
|
59
|
+
- lib/alacrity-rails/transaction/web_request.rb
|
60
60
|
- lib/alacrity-rails/version.rb
|
61
61
|
- lib/tasks/diagnostic.rake
|
62
62
|
homepage: https://www.alacrityapp.com
|