simple_apm 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/app/assets/javascripts/simple_apm/application.js +94 -0
- data/app/assets/stylesheets/simple_apm/application.css +92 -7
- data/app/controllers/simple_apm/apm_controller.rb +22 -11
- data/app/helpers/simple_apm/application_helper.rb +24 -0
- data/app/models/simple_apm/action.rb +5 -5
- data/app/models/simple_apm/diagnostic_report.rb +203 -0
- data/app/models/simple_apm/sql.rb +1 -1
- data/app/views/layouts/simple_apm/application.html.erb +37 -58
- data/app/views/simple_apm/apm/_diagnostic_export.html.erb +17 -0
- data/app/views/simple_apm/apm/_timings.html.erb +18 -0
- data/app/views/simple_apm/apm/action_info.html.erb +36 -15
- data/app/views/simple_apm/apm/actions.html.erb +40 -21
- data/app/views/simple_apm/apm/dashboard.html.erb +38 -19
- data/app/views/simple_apm/apm/data.html.erb +59 -15
- data/app/views/simple_apm/apm/index.html.erb +45 -17
- data/app/views/simple_apm/apm/missing.html.erb +8 -0
- data/app/views/simple_apm/apm/show.html.erb +46 -21
- data/config/locales/simple_apm.en.yml +71 -2
- data/config/locales/simple_apm.zh-CN.yml +79 -10
- data/config/routes.rb +1 -1
- data/lib/simple_apm/version.rb +1 -1
- data/lib/simple_apm/worker.rb +4 -1
- metadata +5 -1
data/lib/simple_apm/worker.rb
CHANGED
|
@@ -51,13 +51,14 @@ module SimpleApm
|
|
|
51
51
|
host: Socket.gethostname,
|
|
52
52
|
remote_addr: remote_addr,
|
|
53
53
|
method: payload[:method],
|
|
54
|
+
status: payload[:status],
|
|
54
55
|
completed_memory: completed_memory,
|
|
55
56
|
memory_during: memory_during,
|
|
56
57
|
format: payload[:format],
|
|
57
58
|
net_http_during: net_http_during,
|
|
58
59
|
exception: payload[:exception].presence.to_json
|
|
59
60
|
}.with_indifferent_access
|
|
60
|
-
info[:status]
|
|
61
|
+
info[:status] ||= '500' if payload[:exception]
|
|
61
62
|
# 存储
|
|
62
63
|
in_slow = SimpleApm::SlowRequest.update_by_request info
|
|
63
64
|
in_action_info = SimpleApm::Action.update_by_request info
|
|
@@ -92,6 +93,8 @@ module SimpleApm
|
|
|
92
93
|
started: started,
|
|
93
94
|
sql: payload[:sql],
|
|
94
95
|
value: sql_value,
|
|
96
|
+
cached: payload[:cached] || false,
|
|
97
|
+
method: payload[:method],
|
|
95
98
|
filename: payload[:filename],
|
|
96
99
|
line: payload[:line]
|
|
97
100
|
}.with_indifferent_access
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: simple_apm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- yuanyin.xia
|
|
@@ -113,6 +113,7 @@ files:
|
|
|
113
113
|
- app/mailers/simple_apm/application_mailer.rb
|
|
114
114
|
- app/models/simple_apm/action.rb
|
|
115
115
|
- app/models/simple_apm/application_record.rb
|
|
116
|
+
- app/models/simple_apm/diagnostic_report.rb
|
|
116
117
|
- app/models/simple_apm/hit.rb
|
|
117
118
|
- app/models/simple_apm/http_request.rb
|
|
118
119
|
- app/models/simple_apm/request.rb
|
|
@@ -120,11 +121,14 @@ files:
|
|
|
120
121
|
- app/models/simple_apm/sql.rb
|
|
121
122
|
- app/models/simple_apm/summary.rb
|
|
122
123
|
- app/views/layouts/simple_apm/application.html.erb
|
|
124
|
+
- app/views/simple_apm/apm/_diagnostic_export.html.erb
|
|
125
|
+
- app/views/simple_apm/apm/_timings.html.erb
|
|
123
126
|
- app/views/simple_apm/apm/action_info.html.erb
|
|
124
127
|
- app/views/simple_apm/apm/actions.html.erb
|
|
125
128
|
- app/views/simple_apm/apm/dashboard.html.erb
|
|
126
129
|
- app/views/simple_apm/apm/data.html.erb
|
|
127
130
|
- app/views/simple_apm/apm/index.html.erb
|
|
131
|
+
- app/views/simple_apm/apm/missing.html.erb
|
|
128
132
|
- app/views/simple_apm/apm/show.html.erb
|
|
129
133
|
- config/locales/simple_apm.en.yml
|
|
130
134
|
- config/locales/simple_apm.zh-CN.yml
|