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 +4 -4
- data/lib/alacrity-rails/transaction/web_transaction.rb +15 -15
- data/lib/alacrity-rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c1eec8b45aa781011c4838a86050ffbd0c41c7f
|
4
|
+
data.tar.gz: f105a39907bd5bc174f31e3f449d4b6bfa5a527a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
37
|
+
detail: data[:serializer]
|
35
38
|
}
|
36
39
|
end
|
37
40
|
|
38
41
|
def store_template_metrics(started_at, finished_at, data)
|
39
|
-
|
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
|
-
|
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
|
-
|
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
|
71
|
-
@
|
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)
|
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
|
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-
|
11
|
+
date: 2017-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|