alacrity-rails 0.0.9 → 0.1.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: 9e0905f6bbd861ebf97783070f3b4161dea9385a
4
- data.tar.gz: 3e2f3c2231a50201de27ca820205a272a05abdae
3
+ metadata.gz: 5c1eec8b45aa781011c4838a86050ffbd0c41c7f
4
+ data.tar.gz: f105a39907bd5bc174f31e3f449d4b6bfa5a527a
5
5
  SHA512:
6
- metadata.gz: 10901c3626bf83314461043e7733ad07198bf7b4fbf9567aea8015b20bc74264e34e421c918239cc8b3e6a6a1e1d38f1cc4aeee30dbd9907063e1c4b6b059aeb
7
- data.tar.gz: f08182386abb3804c87c6442fee7b0beb3561f97860a20f46d4254c1560690ceca502f09e55e219841dd3f3ed3c1e892d07245427420ff769d33749914228ab8
6
+ metadata.gz: 6e05828c8875c4ba9a5bccdca4fa261c751b90a448c062f92a9acbe67e3a3dc785b0f51aa52b9f2533e6d8f79a170048184647aae610a6137ff2daa18f587948
7
+ data.tar.gz: 150f96bb18062926505d9de988bca1d86303397a9ac1737aa58be9c572106294f309b0491356acc15165a4f3593d95e81c993c7fdfb17b63da5d67a9374cc7a0
@@ -10,11 +10,12 @@ module AlacrityRails::Transaction
10
10
  end
11
11
 
12
12
  def store_database_metrics(started_at, finished_at, data)
13
- sql_queries << {
13
+ timeline_events << {
14
+ name: data[:name],
15
+ event_type: 'database',
14
16
  started_at: absolute_time(started_at.to_datetime),
15
17
  finished_at: absolute_time(finished_at.to_datetime),
16
- name: data[:name],
17
- sql: data[:sql]
18
+ detail: data[:sql]
18
19
  }
19
20
  end
20
21
 
@@ -28,18 +29,22 @@ module AlacrityRails::Transaction
28
29
  end
29
30
 
30
31
  def store_serializer_metrics(started_at, finished_at, data)
31
- templates << {
32
+ timeline_events << {
33
+ name: 'Template',
34
+ event_type: 'template',
32
35
  started_at: absolute_time(started_at.to_datetime),
33
36
  finished_at: absolute_time(finished_at.to_datetime),
34
- name: data[:serializer]
37
+ detail: data[:serializer]
35
38
  }
36
39
  end
37
40
 
38
41
  def store_template_metrics(started_at, finished_at, data)
39
- templates << {
42
+ timeline_events << {
43
+ name: 'Template',
44
+ event_type: 'template',
40
45
  started_at: absolute_time(started_at.to_datetime),
41
46
  finished_at: absolute_time(finished_at.to_datetime),
42
- name: data[:identifier]
47
+ detail: data[:identifier]
43
48
  }
44
49
  end
45
50
 
@@ -58,8 +63,7 @@ module AlacrityRails::Transaction
58
63
  format: format,
59
64
  method: method,
60
65
  status: status,
61
- sql_queries: sql_queries,
62
- templates: templates
66
+ timeline_events: timeline_events
63
67
  }
64
68
  end
65
69
 
@@ -67,12 +71,8 @@ module AlacrityRails::Transaction
67
71
  @endpoint ||= URI("#{AlacrityRails::Config.collector_host}/v1/web-transactions")
68
72
  end
69
73
 
70
- def sql_queries
71
- @sql_queries ||= []
72
- end
73
-
74
- def templates
75
- @templates ||= []
74
+ def timeline_events
75
+ @timeline_events ||= []
76
76
  end
77
77
 
78
78
  def absolute_time(datetime)
@@ -1,3 +1,3 @@
1
1
  module AlacrityRails
2
- VERSION = '0.0.9'
2
+ VERSION = '0.1.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.0.9
4
+ version: 0.1.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-02-05 00:00:00.000000000 Z
11
+ date: 2017-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails