activeinsights 1.0.0 → 1.1.0

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.
@@ -1,10 +1,10 @@
1
1
  <header>
2
2
  <h1>Metrics for <%= display_date(@date.first) %></h1>
3
3
  <div class="flex flex-row items-center">
4
- <%= link_to "View job metrics", active_insights.jobs_path, class: "white mr-15px" %>
4
+ <%= link_to "View job metrics", active_insights.jobs_path, class: "link calibre mr-15px" %>
5
5
 
6
6
  <%= form_with url: active_insights.requests_path, method: :get do |f| %>
7
- <%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", value: @date.first.to_date %>
7
+ <%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", class: "datepicker", value: @date.first.to_date %>
8
8
  <% f.submit "submit", class: "hidden" %>
9
9
  <% end %>
10
10
  </div>
@@ -12,22 +12,22 @@
12
12
 
13
13
  <div class="pl-30px pt-30px flex flex-row justify-around font-size-30">
14
14
  <% @requests.flat_map(&:parsed_durations).tap do |durations| %>
15
- <%= link_to rpm_path(@date.first.to_date), class: "flex flex-col justify-center items-center no-underline" do %>
15
+ <%= link_to rpm_path(@date.first.to_date), class: "button calibre red flex flex-col justify-center items-center no-underline" do %>
16
16
  <div><%= per_minute(durations.size, (@date.last - @date.first).seconds) %></div>
17
17
  <b>RPM</b>
18
18
  <% end %>
19
19
 
20
- <%= link_to requests_p_values_path(@date.first.to_date), class: "flex flex-col justify-center items-center no-underline" do %>
20
+ <%= link_to requests_p_values_path(@date.first.to_date), class: "button calibre red flex flex-col justify-center items-center no-underline" do %>
21
21
  <div><%= p50(durations) %> ms</div>
22
22
  <b>p50</b>
23
23
  <% end %>
24
24
 
25
- <%= link_to requests_p_values_path(@date.first.to_date), class: "flex flex-col justify-center items-center no-underline" do %>
25
+ <%= link_to requests_p_values_path(@date.first.to_date), class: "button calibre red flex flex-col justify-center items-center no-underline" do %>
26
26
  <div><%= p95(durations) %> ms</div>
27
27
  <b>p95</b>
28
28
  <% end %>
29
29
 
30
- <%= link_to requests_p_values_path(@date.first.to_date), class: "flex flex-col justify-center items-center no-underline" do %>
30
+ <%= link_to requests_p_values_path(@date.first.to_date), class: "button calibre red flex flex-col justify-center items-center no-underline" do %>
31
31
  <div><%= p99(durations) %> ms</div>
32
32
  <b>p99</b>
33
33
  <% end %>
@@ -39,6 +39,7 @@
39
39
  <tr>
40
40
  <th>Controller</th>
41
41
  <th>RPM</th>
42
+ <th>%</th>
42
43
  <th>p50</th>
43
44
  <th>p95</th>
44
45
  <th>p99</th>
@@ -49,6 +50,7 @@
49
50
  <tr>
50
51
  <td><%= link_to model.formatted_controller, controller_p_values_path(@date.first.to_date, model.formatted_controller) %></td>
51
52
  <td><%= per_minute(model.parsed_durations.size, (@date.last - @date.first).seconds) %></td>
53
+ <td><%= number_to_percentage model.percentage(@requests.excluding(model)), precision: 1 %></td>
52
54
  <td><%= model.p50 %> ms</td>
53
55
  <td><%= model.p95 %> ms</td>
54
56
  <td><%= model.p99 %> ms</td>
@@ -1,32 +1,37 @@
1
1
  <header>
2
2
  <% if params[:formatted_controller].present? %>
3
- <h1><%= params[:formatted_controller] %> metrics for <%= display_date(@date.first) %> (in ms)</h1>
3
+ <h1><%= params[:formatted_controller] %> metrics for <%= display_date(@date.first) %></h1>
4
4
  <% else %>
5
- <h1>Response Metrics for <%= display_date(@date.first) %> (in ms)</h1>
5
+ <h1>Response Metrics for <%= display_date(@date.first) %></h1>
6
6
  <% end %>
7
7
 
8
8
  <%= form_with url: active_insights.requests_p_values_redirection_path, method: :get do |f| %>
9
9
  <%= f.hidden_field :formatted_controller, value: params[:formatted_controller] %>
10
- <%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", value: @date.first.to_date %>
10
+ <%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", class: "datepicker", value: @date.first.to_date %>
11
11
  <% f.submit "submit", class: "hidden" %>
12
12
  <% end %>
13
13
  </header>
14
14
 
15
- <div class="p-16px">
16
- <%= line_chart [{ name: "p50", data: @p50 }, { name: "p95", data: @p95 }, { name: "p99", data: @p99 }], height: "80%", colors: ["rgb(255, 249, 216)", "green", "#C00"], library: {
17
- plugins: { zoom: { zoom: { wheel: { enabled: false }, drag: { enabled: true, backgroundColor: 'rgba(225,225,225,0.5)' }, mode: 'x' } }, decimation: { enabled: true, algorithm: 'lttb' } },
15
+ <div class="p-16px flex items-center">
16
+ <h1 class="red calibre text-center w-175px">Response Times <br> (in ms)</h1>
17
+ <%= line_chart [{ name: "p50", data: @p50 }, { name: "p95", data: @p95 }, { name: "p99", data: @p99 }], height: "500px", colors: ["#C00", "rgb(223, 180, 115)", "#000"], library: {
18
+ plugins: { legend: { position: "bottom" }, tooltip: { backgroundColor: 'rgb(238, 231, 233)', cornerRadius: 5, bodyColor: "#000", bodyAlign: 'center', bodyFont: { size: 20, family: "Calibre" }, titleColor: "#000", titleFont: { size: 20, family: "Calibre" } }, zoom: { zoom: { wheel: { enabled: false }, drag: { enabled: true, backgroundColor: 'rgb(238, 231, 233)' }, mode: 'x' } } },
18
19
  elements: { point: { radius: 0 } },
19
20
  scales: {
20
- x: { autoSkip: false, display: false },
21
- y: { grid: { display: false }, ticks: { color: "white" }, min: (@p50.map(&:second).min.to_f * 0.98).ceil, max: (@p99.map(&:second).max) }
21
+ x: { border: { color: "rgb(238, 231, 233)" }, grid: { color: "rgb(238, 231, 233)" }, ticks: { color: "#000", font: { size: 16, family: "Calibre" } }, autoSkip: false, display: true },
22
+ y: { border: { color: "rgb(238, 231, 233)" }, grid: { display: false }, ticks: { font: { size: 16, family: "Calibre" }, color: "#000" }, min: (@p50.map(&:second).min.to_f * 0.98).ceil, max: (@p99.map(&:second).max) }
22
23
  } } %>
23
24
  </div>
24
25
 
25
- <script>
26
- document.addEventListener('keydown',(event) => {
27
- const chart = Chartkick.charts[Object.keys(Chartkick.charts)[0]].getChartObject()
28
- if (event.key === 'Escape' || event.key === 'Esc') {
29
- chart.resetZoom()
30
- }
31
- });
32
- </script>
26
+ <% if @rpm %>
27
+ <div class="p-16px flex items-center">
28
+ <h1 class="red calibre text-center w-175px">RPM</h1>
29
+ <%= column_chart @rpm, height: "400px", colors: ["#C00"], library: {
30
+ borderSkipped: true, barPercentage: 1, categoryPercentage: 1,
31
+ plugins: { tooltip: { backgroundColor: 'rgb(238, 231, 233)', cornerRadius: 5, bodyColor: "#000", bodyAlign: 'center', bodyFont: { size: 20, family: "Calibre" }, titleColor: "#000", titleFont: { size: 20, family: "Calibre" } }, zoom: { zoom: { wheel: { enabled: false }, drag: { enabled: true, backgroundColor: 'rgb(238, 231, 233)' }, mode: 'x' } } },
32
+ scales: {
33
+ x: { border: { color: "rgb(238, 231, 233)" }, barPercentage: 1.0, grid: { color: "rgb(238, 231, 233)" }, ticks: { color: "#000", font: { size: 16, family: "Calibre" } }, autoSkip: false, display: true },
34
+ y: { border: { color: "rgb(238, 231, 233)" }, grid: { display: false }, ticks: { font: { size: 16, family: "Calibre" }, color: "#000" }, min: (@rpm.map(&:second).min.to_f * 0.98).ceil, max: (@rpm.map(&:second).max) }
35
+ } } %>
36
+ </div>
37
+ <% end %>
@@ -1,26 +1,17 @@
1
1
  <header>
2
2
  <h1>RPM Metrics for <%= display_date(@date.first) %></h1>
3
3
  <%= form_with url: active_insights.rpm_redirection_path, method: :get do |f| %>
4
- <%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", value: @date.first.to_date %>
4
+ <%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", class: "datepicker", value: @date.first.to_date %>
5
5
  <% f.submit "submit", class: "hidden" %>
6
6
  <% end %>
7
7
  </header>
8
8
 
9
- <div class="p-16px">
10
- <%= column_chart @minutes, height: "80%", colors: ["#C00"], library: {
9
+ <div class="p-16px flex items-center h-100">
10
+ <%= column_chart @minutes, height: "400px", colors: ["#C00"], library: {
11
11
  borderSkipped: true, barPercentage: 1, categoryPercentage: 1,
12
- plugins: { zoom: { zoom: { wheel: { enabled: false }, drag: { enabled: true, backgroundColor: 'rgba(225,225,225,0.5)' }, mode: 'x' } } },
12
+ plugins: { tooltip: { backgroundColor: 'rgb(238, 231, 233)', cornerRadius: 5, bodyColor: "#000", bodyAlign: 'center', bodyFont: { size: 20, family: "Calibre" }, titleColor: "#000", titleFont: { size: 20, family: "Calibre" } }, zoom: { zoom: { wheel: { enabled: false }, drag: { enabled: true, backgroundColor: 'rgb(238, 231, 233)' }, mode: 'x' } } },
13
13
  scales: {
14
- x: { barPercentage: 1.0, autoSkip: false, display: false },
15
- y: { grid: { display: false }, ticks: { color: "white" }, min: (@minutes.map(&:second).min.to_f * 0.98).ceil, max: (@minutes.map(&:second).max) }
14
+ x: { border: { color: "rgb(238, 231, 233)" }, barPercentage: 1.0, grid: { color: "rgb(238, 231, 233)" }, ticks: { color: "#000", font: { size: 16, family: "Calibre" } }, autoSkip: false, display: true },
15
+ y: { border: { color: "rgb(238, 231, 233)" }, grid: { display: false }, ticks: { font: { size: 16, family: "Calibre" }, color: "#000" }, min: (@minutes.map(&:second).min.to_f * 0.98).ceil, max: (@minutes.map(&:second).max) }
16
16
  } } %>
17
17
  </div>
18
-
19
- <script>
20
- document.addEventListener('keydown',(event) => {
21
- const chart = Chartkick.charts[Object.keys(Chartkick.charts)[0]].getChartObject()
22
- if (event.key === 'Escape' || event.key === 'Esc') {
23
- chart.resetZoom()
24
- }
25
- });
26
- </script>
@@ -20,348 +20,20 @@
20
20
 
21
21
  Chartkick.use(Chart);
22
22
  Chart.register(zoomPlugin);
23
+
24
+ document.addEventListener('keydown',(event) => {
25
+ Object.keys(Chartkick.charts).forEach((key) => {
26
+ const chart = Chartkick.charts[key].getChartObject()
27
+ if (event.key === 'Escape' || event.key === 'Esc') {
28
+ chart.resetZoom()
29
+ }
30
+ })
31
+ });
23
32
  </script>
24
33
 
25
34
  <title>Active Insights</title>
26
- <style>
27
- body {
28
- background-color: #FAFAFA;
29
- color: #333;
30
- color-scheme: light dark;
31
- supported-color-schemes: light dark;
32
- margin: 0px;
33
- }
34
-
35
- body, p, ol, ul, td, input {
36
- font-family: helvetica, verdana, arial, sans-serif;
37
- font-size: 15px;
38
- line-height: 18px;
39
- }
40
-
41
- form {
42
- margin-bottom: 0px;
43
- }
44
-
45
- pre {
46
- font-size: 11px;
47
- white-space: pre-wrap;
48
- }
49
-
50
- pre.box {
51
- border: 1px solid #EEE;
52
- padding: 10px;
53
- margin: 0px;
54
- width: 958px;
55
- }
56
-
57
- header {
58
- color: #F0F0F0;
59
- background: #C00;
60
- padding: 0.5em 1.5em;
61
- display: flex;
62
- flex-direction: row;
63
- justify-content: space-between;
64
- align-items: center;
65
- }
66
-
67
- h1 {
68
- overflow-wrap: break-word;
69
- margin: 0.2em 0;
70
- line-height: 1.1em;
71
- font-size: 2em;
72
- }
73
-
74
- h2 {
75
- color: #C00;
76
- line-height: 25px;
77
- }
78
-
79
- code.traces {
80
- font-size: 11px;
81
- }
82
-
83
- .response-heading, .request-heading {
84
- margin-top: 30px;
85
- }
86
-
87
- .exception-message {
88
- padding: 8px 0;
89
- }
90
-
91
- .exception-message .message {
92
- margin-bottom: 8px;
93
- line-height: 25px;
94
- font-size: 1.5em;
95
- font-weight: bold;
96
- color: #C00;
97
- }
98
-
99
- .details {
100
- border: 1px solid #D0D0D0;
101
- border-radius: 4px;
102
- margin: 1em 0px;
103
- display: block;
104
- max-width: 978px;
105
- }
106
-
107
- .summary {
108
- padding: 8px 15px;
109
- border-bottom: 1px solid #D0D0D0;
110
- display: block;
111
- }
112
-
113
- a.summary {
114
- color: #F0F0F0;
115
- text-decoration: none;
116
- background: #C52F24;
117
- border-bottom: none;
118
- }
119
-
120
- .details pre {
121
- margin: 5px;
122
- border: none;
123
- }
124
-
125
- #container {
126
- box-sizing: border-box;
127
- width: 100%;
128
- padding: 0 1.5em;
129
- }
130
-
131
- .source * {
132
- margin: 0px;
133
- padding: 0px;
134
- }
135
-
136
- .source {
137
- border: 1px solid #D9D9D9;
138
- background: #ECECEC;
139
- max-width: 978px;
140
- }
141
-
142
- .source pre {
143
- padding: 10px 0px;
144
- border: none;
145
- }
146
-
147
- .source .data {
148
- font-size: 80%;
149
- overflow: auto;
150
- background-color: #FFF;
151
- }
152
-
153
- .info {
154
- padding: 0.5em;
155
- }
156
-
157
- .source .data .line_numbers {
158
- background-color: #ECECEC;
159
- color: #555;
160
- padding: 1em .5em;
161
- border-right: 1px solid #DDD;
162
- text-align: right;
163
- }
164
-
165
- .line {
166
- padding-left: 10px;
167
- white-space: pre;
168
- }
169
-
170
- .line:hover {
171
- background-color: #F6F6F6;
172
- }
173
-
174
- .line.active {
175
- background-color: #FCC;
176
- }
177
-
178
- .error_highlight {
179
- display: inline-block;
180
- background-color: #FF9;
181
- text-decoration: #F00 wavy underline;
182
- }
183
-
184
- .error_highlight_tip {
185
- color: #666;
186
- padding: 2px 2px;
187
- font-size: 10px;
188
- }
189
-
190
- .button_to {
191
- display: inline-block;
192
- margin-top: 0.75em;
193
- margin-bottom: 0.75em;
194
- }
195
-
196
- .hidden {
197
- display: none;
198
- }
199
-
200
- .correction {
201
- list-style-type: none;
202
- }
203
-
204
- input[type="submit"] {
205
- color: white;
206
- background-color: #C00;
207
- border: none;
208
- border-radius: 12px;
209
- box-shadow: 0 3px #F99;
210
- font-size: 13px;
211
- font-weight: bold;
212
- margin: 0;
213
- padding: 10px 18px;
214
- cursor: pointer;
215
- -webkit-appearance: none;
216
- }
217
- input[type="submit"]:focus,
218
- input[type="submit"]:hover {
219
- opacity: 0.8;
220
- }
221
- input[type="submit"]:active {
222
- box-shadow: 0 2px #F99;
223
- transform: translateY(1px)
224
- }
225
-
226
- a { color: #980905; }
227
- a:visited { color: #666; }
228
- a.trace-frames {
229
- color: #666;
230
- overflow-wrap: break-word;
231
- }
232
- a:hover, a.trace-frames.selected { color: #C00; }
233
- a.summary:hover { color: #FFF; }
234
-
235
- @media (prefers-color-scheme: dark) {
236
- body {
237
- background-color: #222;
238
- color: #ECECEC;
239
- }
240
-
241
- .details, .summary {
242
- border-color: #666;
243
- }
244
-
245
- .source {
246
- border-color: #555;
247
- background-color: #333;
248
- }
249
-
250
- .source .data {
251
- background: #444;
252
- }
253
-
254
- .source .data .line_numbers {
255
- background: #333;
256
- border-color: #222;
257
- }
258
-
259
- .line:hover {
260
- background: #666;
261
- }
262
-
263
- .line.active {
264
- background-color: #900;
265
- }
266
-
267
- .error_highlight {
268
- color: #333;
269
- }
270
-
271
- input[type="submit"] {
272
- box-shadow: 0 3px #800;
273
- }
274
- input[type="submit"]:active {
275
- box-shadow: 0 2px #800;
276
- }
277
-
278
- a { color: #C00; }
279
- }
280
-
281
- table {
282
- margin: 0;
283
- border-collapse: collapse;
284
- word-wrap:break-word;
285
- table-layout: auto;
286
- width: 100%;
287
- margin-top: 50px;
288
- }
289
-
290
- table thead tr {
291
- border-bottom: 2px solid #ddd;
292
- }
293
-
294
- table th {
295
- padding-left: 30px;
296
- text-align: left;
297
- }
298
-
299
- table tbody tr {
300
- border-bottom: 1px solid #ddd;
301
- }
302
-
303
- table tbody tr:nth-child(odd) {
304
- background: #f2f2f2;
305
- }
306
-
307
- table td {
308
- padding: 4px 30px;
309
- }
310
-
311
- @media (prefers-color-scheme: dark) {
312
- table tbody tr:nth-child(odd) {
313
- background: #282828;
314
- }
315
- }
316
-
317
- .pl-30px {
318
- padding-left: 30px;
319
- }
320
-
321
- .pt-30px {
322
- padding-top: 30px;
323
- }
324
-
325
- .flex {
326
- display: flex;
327
- }
328
-
329
- .flex-col {
330
- flex-direction: column;
331
- }
332
- .flex-row {
333
- flex-direction: row;
334
- }
335
- .justify-around {
336
- justify-content: space-around;
337
- }
338
-
339
- .justify-center {
340
- justify-content: center;
341
- }
342
- .items-center {
343
- align-items: center;
344
- }
345
- .font-size-30 {
346
- font-size: 30px;
347
- line-height: 30px;
348
- }
349
- .no-underline {
350
- text-decoration: none;
351
- }
352
- .p-16px {
353
- padding: 16px;
354
- }
355
-
356
- a.white {
357
- color: #fff;
358
- }
359
- .mr-15px {
360
- margin-right: 15px;
361
- }
362
-
363
- <%= yield :style %>
364
- </style>
35
+ <%= stylesheet_link_tag "active_insights/application" %>
36
+ <style><%= yield :style %></style>
365
37
  </head>
366
38
  <body><%= yield %></body>
367
39
  </html>
@@ -4,12 +4,13 @@ require "active_insights"
4
4
 
5
5
  ActiveInsights::Engine.importmap.draw do
6
6
  pin "chartkick", to: "https://ga.jspm.io/npm:chartkick@5.0.1/dist/chartkick.esm.js"
7
- pin "chart.js", to: "https://ga.jspm.io/npm:chart.js@4.4.1/dist/chart.js"
7
+ pin "chart.js", to: "https://ga.jspm.io/npm:chart.js@4.4.4/dist/chart.js"
8
+
8
9
  pin "chartjs-adapter-date-fns", to: "https://ga.jspm.io/npm:chartjs-adapter-date-fns@3.0.0/dist/chartjs-adapter-date-fns.esm.js"
9
10
  pin "date-fns", to: "https://ga.jspm.io/npm:date-fns@3.2.0/index.mjs"
10
11
 
11
12
  pin "chartjs-plugin-zoom", to: "https://ga.jspm.io/npm:chartjs-plugin-zoom@2.0.1/dist/chartjs-plugin-zoom.esm.js"
12
13
  pin "hammerjs", to: "https://ga.jspm.io/npm:hammerjs@2.0.8/hammer.js"
13
14
  pin "@kurkle/color", to: "https://ga.jspm.io/npm:@kurkle/color@0.3.2/dist/color.esm.js"
14
- pin "chart.js/helpers", to: "https://ga.jspm.io/npm:chart.js@4.4.1/helpers/helpers.js"
15
+ pin "chart.js/helpers", to: "https://ga.jspm.io/npm:chart.js@4.4.4/helpers/helpers.js"
15
16
  end
@@ -28,6 +28,8 @@ module ActiveInsights
28
28
  ActiveSupport::Notifications.
29
29
  subscribe("perform.active_job") do |_name,
30
30
  started, finished, unique_id, payload|
31
+ next unless ActiveInsights.enabled?
32
+
31
33
  ActiveInsights::Job.setup(started, finished, unique_id, payload)
32
34
  end
33
35
  end
@@ -36,11 +38,11 @@ module ActiveInsights
36
38
  ActiveSupport::Notifications.
37
39
  subscribe("process_action.action_controller") do |_name,
38
40
  started, finished, unique_id, payload|
39
- next if Rails.env.development? ||
40
- ActiveInsights.ignored_endpoint?(payload)
41
+ next if ActiveInsights.ignored_endpoint?(payload) ||
42
+ !ActiveInsights.enabled?
41
43
 
42
44
  Thread.new do
43
- ActiveRecord::Base.connection_pool.with_connection do
45
+ ActiveRecord::Base.lease_connection do
44
46
  ActiveInsights::Request.
45
47
  setup(started, finished, unique_id, payload)
46
48
  end
@@ -34,11 +34,15 @@ module ActiveInsights
34
34
  end
35
35
 
36
36
  def processing_times
37
- Array.new(rpm) do
37
+ Array.new(calculate_rpm) do
38
38
  p50 + (beta_distribution.rng * (p95 - p50))
39
39
  end.select { |time| time <= p99 }
40
40
  end
41
41
 
42
+ def calculate_rpm
43
+ (rpm * 0.9) + (rpm * 0.2 * rand)
44
+ end
45
+
42
46
  def beta_distribution
43
47
  @beta_distribution ||= Rubystats::BetaDistribution.new(2, 5)
44
48
  end
@@ -34,11 +34,15 @@ module ActiveInsights
34
34
  end
35
35
 
36
36
  def response_times
37
- Array.new(rpm) do
37
+ Array.new(calculate_rpm) do
38
38
  p50 + (beta_distribution.rng * (p95 - p50))
39
39
  end.select { |time| time <= p99 }
40
40
  end
41
41
 
42
+ def calculate_rpm
43
+ (rpm * 0.9) + (rpm * 0.2 * rand)
44
+ end
45
+
42
46
  def beta_distribution
43
47
  @beta_distribution ||= Rubystats::BetaDistribution.new(2, 5)
44
48
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveInsights
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
@@ -7,11 +7,21 @@ require "active_insights/version"
7
7
  require "active_insights/engine"
8
8
 
9
9
  module ActiveInsights
10
- mattr_accessor :connects_to, :ignored_endpoints
10
+ mattr_accessor :connects_to, :ignored_endpoints, :enabled
11
11
 
12
- def self.ignored_endpoint?(payload)
13
- ignored_endpoints.to_a.include?(
14
- "#{payload[:controller]}##{payload[:action]}"
15
- )
12
+ class << self
13
+ def ignored_endpoint?(payload)
14
+ ignored_endpoints.to_a.include?(
15
+ "#{payload[:controller]}##{payload[:action]}"
16
+ )
17
+ end
18
+
19
+ def enabled?
20
+ if enabled.nil?
21
+ !Rails.env.development?
22
+ else
23
+ enabled.present?
24
+ end
25
+ end
16
26
  end
17
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeinsights
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Pezza
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-25 00:00:00.000000000 Z
11
+ date: 2024-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chartkick
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '7.1'
47
+ version: '7.2'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '7.1'
54
+ version: '7.2'
55
55
  description:
56
56
  email:
57
57
  - pezza@hey.com
@@ -61,6 +61,12 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - README.md
63
63
  - Rakefile
64
+ - app/assets/stylesheets/active_insights/application.css
65
+ - app/assets/stylesheets/active_insights/calibre-bold.woff2
66
+ - app/assets/stylesheets/active_insights/calibre-regular-italic.woff2
67
+ - app/assets/stylesheets/active_insights/calibre-regular.woff2
68
+ - app/assets/stylesheets/active_insights/calibre-semibold-italic.woff2
69
+ - app/assets/stylesheets/active_insights/calibre-semibold.woff2
64
70
  - app/controllers/active_insights/application_controller.rb
65
71
  - app/controllers/active_insights/jobs_controller.rb
66
72
  - app/controllers/active_insights/jobs_latencies_controller.rb
@@ -104,14 +110,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
110
  requirements:
105
111
  - - ">="
106
112
  - !ruby/object:Gem::Version
107
- version: 3.1.0
113
+ version: 3.2.0
108
114
  required_rubygems_version: !ruby/object:Gem::Requirement
109
115
  requirements:
110
116
  - - ">="
111
117
  - !ruby/object:Gem::Version
112
118
  version: '0'
113
119
  requirements: []
114
- rubygems_version: 3.5.5
120
+ rubygems_version: 3.5.18
115
121
  signing_key:
116
122
  specification_version: 4
117
123
  summary: Rails performance tracking