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: 94474c4b1a90f662c8a32c6ae917e88a29f9fa5e
4
- data.tar.gz: dca2edc08be12cab09b0c12450e9ae71b6352bef
3
+ metadata.gz: 2e121b9fe1d5ce57c83deef77b9a35807577212d
4
+ data.tar.gz: e5c038896cdfb5195b4268092baf8d4b93d65272
5
5
  SHA512:
6
- metadata.gz: 0bf363bf352dbb2f70ec69c8573b99d9ef621cd5d3579248d950850067ba480975b7a8099f9041653c505cbfc07f8274f5238b79e827b781298e33eb9e0782dc
7
- data.tar.gz: 210c72464ef13e5ca5e3f300f12e90355ea72685ddcf398abb5a3e28a293110f4c295ed95c6622f7b33a710c372f840b5b5c7488902b3854cc27329eb5e1cb9e
6
+ metadata.gz: aa602f7ad4da6288b98be8d3693df9991a978cc71cb19f1814ae1c87412299f62c74caab0843f1c36af61fbc73f9bb8ddc743e9461a1cd9fdd164d1f911831ed
7
+ data.tar.gz: 5883490ba920c9ae1d9fc4d05a380deb99c33191ca1c9a3607d135d5b9294d37759286dea5430c55f65541bf5818e26dde145d32f8696e42c8dfc77a85aa7151
@@ -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 :WebTransaction, 'alacrity-rails/transaction/web_transaction'
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::WebTransaction,
5
+ type: AlacrityRails::Transaction::WebRequest,
6
6
  data: { url: env['REQUEST_URI'], method: env['REQUEST_METHOD'] },
7
7
  reset: true
8
8
  ) do
@@ -62,9 +62,5 @@ module AlacrityRails::Transaction
62
62
  def absolute_time(datetime)
63
63
  datetime.strftime('%Q').to_i
64
64
  end
65
-
66
- def to_json
67
- @to_json ||= super.to_json
68
- end
69
65
  end
70
66
  end
@@ -1,6 +1,6 @@
1
1
  module AlacrityRails::Transaction
2
- class WebTransaction < Base
3
- attr_accessor :url, :controller, :action, :format, :method, :status
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.controller = data[:controller]
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}/v2/events")
41
+ @endpoint ||= URI("#{AlacrityRails::Config.collector_host}/v3/events")
44
42
  end
45
43
  end
46
44
  end
@@ -1,3 +1,3 @@
1
1
  module AlacrityRails
2
- VERSION = '1.0.0.beta.2'
2
+ VERSION = '1.0.0.beta.3'
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: 1.0.0.beta.2
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-07-14 00:00:00.000000000 Z
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/web_transaction.rb
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