influxdb-rails 1.0.0.beta3 → 1.0.0.beta4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -0
- data/CHANGELOG.md +12 -10
- data/README.md +193 -168
- data/influxdb-rails.gemspec +13 -7
- data/lib/influxdb/rails/configuration.rb +88 -192
- data/lib/influxdb/rails/context.rb +19 -1
- data/lib/influxdb/rails/instrumentation.rb +4 -4
- data/lib/influxdb/rails/middleware/render_subscriber.rb +7 -0
- data/lib/influxdb/rails/middleware/request_subscriber.rb +22 -24
- data/lib/influxdb/rails/middleware/simple_subscriber.rb +12 -25
- data/lib/influxdb/rails/middleware/sql_subscriber.rb +7 -3
- data/lib/influxdb/rails/middleware/subscriber.rb +19 -8
- data/lib/influxdb/rails/railtie.rb +29 -32
- data/lib/influxdb/rails/version.rb +1 -1
- data/lib/influxdb-rails.rb +20 -81
- data/lib/rails/generators/influxdb/influxdb_generator.rb +1 -1
- data/lib/rails/generators/influxdb/templates/initializer.rb +39 -9
- data/sample-dashboard/Dockerfile +25 -0
- data/sample-dashboard/README.md +74 -0
- data/sample-dashboard/Rakefile +8 -0
- data/sample-dashboard/Ruby On Rails Performance (per Request).json +1053 -0
- data/sample-dashboard/Ruby On Rails Performance.json +2011 -0
- data/sample-dashboard/docker-compose.yml +33 -0
- data/sample-dashboard/provisioning/grafana-dashboards.yml +12 -0
- data/sample-dashboard/provisioning/grafana-datasource.yml +10 -0
- data/sample-dashboard/provisioning/performance-request.json +1053 -0
- data/sample-dashboard/provisioning/performance.json +2011 -0
- data/spec/integration/metrics_spec.rb +12 -13
- data/spec/shared_examples/data.rb +61 -0
- data/spec/spec_helper.rb +3 -1
- data/spec/support/rails4/app.rb +4 -0
- data/spec/support/rails5/app.rb +4 -0
- data/spec/unit/configuration_spec.rb +47 -65
- data/spec/unit/middleware/render_subscriber_spec.rb +13 -9
- data/spec/unit/middleware/request_subscriber_spec.rb +33 -21
- data/spec/unit/middleware/sql_subscriber_spec.rb +35 -8
- metadata +42 -30
- data/lib/influxdb/rails/air_traffic_controller.rb +0 -41
- data/lib/influxdb/rails/backtrace.rb +0 -44
- data/lib/influxdb/rails/exception_presenter.rb +0 -94
- data/lib/influxdb/rails/logger.rb +0 -16
- data/lib/influxdb/rails/middleware/hijack_render_exception.rb +0 -16
- data/lib/influxdb/rails/middleware/hijack_rescue_action_everywhere.rb +0 -31
- data/lib/influxdb/rails/rack.rb +0 -24
- data/spec/integration/exceptions_spec.rb +0 -37
- data/spec/shared_examples/tags.rb +0 -42
- data/spec/unit/backtrace_spec.rb +0 -85
- data/spec/unit/exception_presenter_spec.rb +0 -23
- data/spec/unit/influxdb_rails_spec.rb +0 -78
@@ -0,0 +1,1053 @@
|
|
1
|
+
{
|
2
|
+
"__inputs": [
|
3
|
+
{
|
4
|
+
"name": "DS_INFLUXDB",
|
5
|
+
"label": "InfluxDB",
|
6
|
+
"description": "",
|
7
|
+
"type": "datasource",
|
8
|
+
"pluginId": "influxdb",
|
9
|
+
"pluginName": "InfluxDB"
|
10
|
+
}
|
11
|
+
],
|
12
|
+
"__requires": [
|
13
|
+
{
|
14
|
+
"type": "grafana",
|
15
|
+
"id": "grafana",
|
16
|
+
"name": "Grafana",
|
17
|
+
"version": "6.2.4"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"type": "datasource",
|
21
|
+
"id": "influxdb",
|
22
|
+
"name": "InfluxDB",
|
23
|
+
"version": "1.0.0"
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"type": "panel",
|
27
|
+
"id": "singlestat",
|
28
|
+
"name": "Singlestat",
|
29
|
+
"version": ""
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"type": "panel",
|
33
|
+
"id": "table",
|
34
|
+
"name": "Table",
|
35
|
+
"version": ""
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"type": "panel",
|
39
|
+
"id": "text",
|
40
|
+
"name": "Text",
|
41
|
+
"version": ""
|
42
|
+
}
|
43
|
+
],
|
44
|
+
"annotations": {
|
45
|
+
"list": [
|
46
|
+
{
|
47
|
+
"builtIn": 1,
|
48
|
+
"datasource": "-- Grafana --",
|
49
|
+
"enable": true,
|
50
|
+
"hide": true,
|
51
|
+
"iconColor": "rgba(0, 211, 255, 1)",
|
52
|
+
"name": "Annotations & Alerts",
|
53
|
+
"type": "dashboard"
|
54
|
+
}
|
55
|
+
]
|
56
|
+
},
|
57
|
+
"description": "Ruby on Rails Request Performance Insights based on influxdb-rails",
|
58
|
+
"editable": true,
|
59
|
+
"gnetId": 10429,
|
60
|
+
"graphTooltip": 0,
|
61
|
+
"id": null,
|
62
|
+
"iteration": 1565382353036,
|
63
|
+
"links": [],
|
64
|
+
"panels": [
|
65
|
+
{
|
66
|
+
"content": "## Details for $method ($request_id)",
|
67
|
+
"gridPos": {
|
68
|
+
"h": 2,
|
69
|
+
"w": 24,
|
70
|
+
"x": 0,
|
71
|
+
"y": 0
|
72
|
+
},
|
73
|
+
"id": 4,
|
74
|
+
"links": [],
|
75
|
+
"mode": "markdown",
|
76
|
+
"options": {},
|
77
|
+
"title": "",
|
78
|
+
"type": "text"
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"cacheTimeout": null,
|
82
|
+
"colorBackground": false,
|
83
|
+
"colorPrefix": false,
|
84
|
+
"colorValue": true,
|
85
|
+
"colors": [
|
86
|
+
"#299c46",
|
87
|
+
"rgba(237, 129, 40, 0.89)",
|
88
|
+
"#d44a3a"
|
89
|
+
],
|
90
|
+
"datasource": "${DS_INFLUXDB}",
|
91
|
+
"description": "",
|
92
|
+
"format": "ms",
|
93
|
+
"gauge": {
|
94
|
+
"maxValue": 100,
|
95
|
+
"minValue": 0,
|
96
|
+
"show": false,
|
97
|
+
"thresholdLabels": false,
|
98
|
+
"thresholdMarkers": true
|
99
|
+
},
|
100
|
+
"gridPos": {
|
101
|
+
"h": 3,
|
102
|
+
"w": 8,
|
103
|
+
"x": 0,
|
104
|
+
"y": 2
|
105
|
+
},
|
106
|
+
"id": 2,
|
107
|
+
"interval": null,
|
108
|
+
"links": [],
|
109
|
+
"mappingType": 1,
|
110
|
+
"mappingTypes": [
|
111
|
+
{
|
112
|
+
"name": "value to text",
|
113
|
+
"value": 1
|
114
|
+
},
|
115
|
+
{
|
116
|
+
"name": "range to text",
|
117
|
+
"value": 2
|
118
|
+
}
|
119
|
+
],
|
120
|
+
"maxDataPoints": 100,
|
121
|
+
"nullPointMode": "connected",
|
122
|
+
"nullText": null,
|
123
|
+
"options": {},
|
124
|
+
"postfix": "",
|
125
|
+
"postfixFontSize": "50%",
|
126
|
+
"prefix": "",
|
127
|
+
"prefixFontSize": "50%",
|
128
|
+
"rangeMaps": [
|
129
|
+
{
|
130
|
+
"from": "null",
|
131
|
+
"text": "N/A",
|
132
|
+
"to": "null"
|
133
|
+
}
|
134
|
+
],
|
135
|
+
"sparkline": {
|
136
|
+
"fillColor": "rgba(31, 118, 189, 0.18)",
|
137
|
+
"full": false,
|
138
|
+
"lineColor": "rgb(31, 120, 193)",
|
139
|
+
"show": false
|
140
|
+
},
|
141
|
+
"tableColumn": "",
|
142
|
+
"targets": [
|
143
|
+
{
|
144
|
+
"groupBy": [],
|
145
|
+
"measurement": "rails",
|
146
|
+
"orderByTime": "ASC",
|
147
|
+
"policy": "default",
|
148
|
+
"refId": "A",
|
149
|
+
"resultFormat": "time_series",
|
150
|
+
"select": [
|
151
|
+
[
|
152
|
+
{
|
153
|
+
"params": [
|
154
|
+
"controller"
|
155
|
+
],
|
156
|
+
"type": "field"
|
157
|
+
}
|
158
|
+
]
|
159
|
+
],
|
160
|
+
"tags": [
|
161
|
+
{
|
162
|
+
"key": "request",
|
163
|
+
"operator": "=~",
|
164
|
+
"value": "/^$request_id$/"
|
165
|
+
},
|
166
|
+
{
|
167
|
+
"condition": "AND",
|
168
|
+
"key": "hook",
|
169
|
+
"operator": "=",
|
170
|
+
"value": "process_action"
|
171
|
+
}
|
172
|
+
]
|
173
|
+
}
|
174
|
+
],
|
175
|
+
"thresholds": "200,300",
|
176
|
+
"title": "Total Controller Action Runtime",
|
177
|
+
"type": "singlestat",
|
178
|
+
"valueFontSize": "80%",
|
179
|
+
"valueMaps": [
|
180
|
+
{
|
181
|
+
"op": "=",
|
182
|
+
"text": "N/A",
|
183
|
+
"value": "null"
|
184
|
+
}
|
185
|
+
],
|
186
|
+
"valueName": "total"
|
187
|
+
},
|
188
|
+
{
|
189
|
+
"cacheTimeout": null,
|
190
|
+
"colorBackground": false,
|
191
|
+
"colorValue": true,
|
192
|
+
"colors": [
|
193
|
+
"#299c46",
|
194
|
+
"rgba(237, 129, 40, 0.89)",
|
195
|
+
"#d44a3a"
|
196
|
+
],
|
197
|
+
"datasource": "${DS_INFLUXDB}",
|
198
|
+
"format": "ms",
|
199
|
+
"gauge": {
|
200
|
+
"maxValue": 100,
|
201
|
+
"minValue": 0,
|
202
|
+
"show": false,
|
203
|
+
"thresholdLabels": false,
|
204
|
+
"thresholdMarkers": true
|
205
|
+
},
|
206
|
+
"gridPos": {
|
207
|
+
"h": 3,
|
208
|
+
"w": 8,
|
209
|
+
"x": 8,
|
210
|
+
"y": 2
|
211
|
+
},
|
212
|
+
"id": 6,
|
213
|
+
"interval": null,
|
214
|
+
"links": [],
|
215
|
+
"mappingType": 1,
|
216
|
+
"mappingTypes": [
|
217
|
+
{
|
218
|
+
"name": "value to text",
|
219
|
+
"value": 1
|
220
|
+
},
|
221
|
+
{
|
222
|
+
"name": "range to text",
|
223
|
+
"value": 2
|
224
|
+
}
|
225
|
+
],
|
226
|
+
"maxDataPoints": 100,
|
227
|
+
"nullPointMode": "connected",
|
228
|
+
"nullText": null,
|
229
|
+
"options": {},
|
230
|
+
"postfix": "",
|
231
|
+
"postfixFontSize": "50%",
|
232
|
+
"prefix": "",
|
233
|
+
"prefixFontSize": "50%",
|
234
|
+
"rangeMaps": [
|
235
|
+
{
|
236
|
+
"from": "null",
|
237
|
+
"text": "N/A",
|
238
|
+
"to": "null"
|
239
|
+
}
|
240
|
+
],
|
241
|
+
"sparkline": {
|
242
|
+
"fillColor": "rgba(31, 118, 189, 0.18)",
|
243
|
+
"full": false,
|
244
|
+
"lineColor": "rgb(31, 120, 193)",
|
245
|
+
"show": false
|
246
|
+
},
|
247
|
+
"tableColumn": "",
|
248
|
+
"targets": [
|
249
|
+
{
|
250
|
+
"groupBy": [],
|
251
|
+
"measurement": "rails",
|
252
|
+
"orderByTime": "ASC",
|
253
|
+
"policy": "default",
|
254
|
+
"refId": "A",
|
255
|
+
"resultFormat": "time_series",
|
256
|
+
"select": [
|
257
|
+
[
|
258
|
+
{
|
259
|
+
"params": [
|
260
|
+
"db"
|
261
|
+
],
|
262
|
+
"type": "field"
|
263
|
+
}
|
264
|
+
]
|
265
|
+
],
|
266
|
+
"tags": [
|
267
|
+
{
|
268
|
+
"key": "request",
|
269
|
+
"operator": "=~",
|
270
|
+
"value": "/^$request_id$/"
|
271
|
+
},
|
272
|
+
{
|
273
|
+
"condition": "AND",
|
274
|
+
"key": "hook",
|
275
|
+
"operator": "=",
|
276
|
+
"value": "process_action"
|
277
|
+
}
|
278
|
+
]
|
279
|
+
}
|
280
|
+
],
|
281
|
+
"thresholds": "200,300",
|
282
|
+
"title": "Total Database Query Runtime",
|
283
|
+
"type": "singlestat",
|
284
|
+
"valueFontSize": "80%",
|
285
|
+
"valueMaps": [
|
286
|
+
{
|
287
|
+
"op": "=",
|
288
|
+
"text": "N/A",
|
289
|
+
"value": "null"
|
290
|
+
}
|
291
|
+
],
|
292
|
+
"valueName": "avg"
|
293
|
+
},
|
294
|
+
{
|
295
|
+
"cacheTimeout": null,
|
296
|
+
"colorBackground": false,
|
297
|
+
"colorValue": true,
|
298
|
+
"colors": [
|
299
|
+
"#299c46",
|
300
|
+
"rgba(237, 129, 40, 0.89)",
|
301
|
+
"#d44a3a"
|
302
|
+
],
|
303
|
+
"datasource": "${DS_INFLUXDB}",
|
304
|
+
"format": "ms",
|
305
|
+
"gauge": {
|
306
|
+
"maxValue": 100,
|
307
|
+
"minValue": 0,
|
308
|
+
"show": false,
|
309
|
+
"thresholdLabels": false,
|
310
|
+
"thresholdMarkers": true
|
311
|
+
},
|
312
|
+
"gridPos": {
|
313
|
+
"h": 3,
|
314
|
+
"w": 8,
|
315
|
+
"x": 16,
|
316
|
+
"y": 2
|
317
|
+
},
|
318
|
+
"id": 8,
|
319
|
+
"interval": null,
|
320
|
+
"links": [],
|
321
|
+
"mappingType": 1,
|
322
|
+
"mappingTypes": [
|
323
|
+
{
|
324
|
+
"name": "value to text",
|
325
|
+
"value": 1
|
326
|
+
},
|
327
|
+
{
|
328
|
+
"name": "range to text",
|
329
|
+
"value": 2
|
330
|
+
}
|
331
|
+
],
|
332
|
+
"maxDataPoints": 100,
|
333
|
+
"nullPointMode": "connected",
|
334
|
+
"nullText": null,
|
335
|
+
"options": {},
|
336
|
+
"postfix": "",
|
337
|
+
"postfixFontSize": "50%",
|
338
|
+
"prefix": "",
|
339
|
+
"prefixFontSize": "50%",
|
340
|
+
"rangeMaps": [
|
341
|
+
{
|
342
|
+
"from": "null",
|
343
|
+
"text": "N/A",
|
344
|
+
"to": "null"
|
345
|
+
}
|
346
|
+
],
|
347
|
+
"sparkline": {
|
348
|
+
"fillColor": "rgba(31, 118, 189, 0.18)",
|
349
|
+
"full": false,
|
350
|
+
"lineColor": "rgb(31, 120, 193)",
|
351
|
+
"show": false
|
352
|
+
},
|
353
|
+
"tableColumn": "",
|
354
|
+
"targets": [
|
355
|
+
{
|
356
|
+
"groupBy": [],
|
357
|
+
"measurement": "rails",
|
358
|
+
"orderByTime": "ASC",
|
359
|
+
"policy": "default",
|
360
|
+
"refId": "A",
|
361
|
+
"resultFormat": "time_series",
|
362
|
+
"select": [
|
363
|
+
[
|
364
|
+
{
|
365
|
+
"params": [
|
366
|
+
"value"
|
367
|
+
],
|
368
|
+
"type": "field"
|
369
|
+
}
|
370
|
+
]
|
371
|
+
],
|
372
|
+
"tags": [
|
373
|
+
{
|
374
|
+
"key": "request",
|
375
|
+
"operator": "=~",
|
376
|
+
"value": "/^$request_id$/"
|
377
|
+
},
|
378
|
+
{
|
379
|
+
"condition": "AND",
|
380
|
+
"key": "hook",
|
381
|
+
"operator": "=",
|
382
|
+
"value": "render_template"
|
383
|
+
}
|
384
|
+
]
|
385
|
+
}
|
386
|
+
],
|
387
|
+
"thresholds": "200,300",
|
388
|
+
"title": "Total View Rendering Runtime",
|
389
|
+
"type": "singlestat",
|
390
|
+
"valueFontSize": "80%",
|
391
|
+
"valueMaps": [
|
392
|
+
{
|
393
|
+
"op": "=",
|
394
|
+
"text": "N/A",
|
395
|
+
"value": "null"
|
396
|
+
}
|
397
|
+
],
|
398
|
+
"valueName": "avg"
|
399
|
+
},
|
400
|
+
{
|
401
|
+
"columns": [],
|
402
|
+
"datasource": "${DS_INFLUXDB}",
|
403
|
+
"description": "Database queries in this request.\n\n- Count: Number of occurrences\n- Mean: Average time spent in this query\n- Maximum: Slowest occurrence\n- Total: Total amount of time spent in this query",
|
404
|
+
"fontSize": "100%",
|
405
|
+
"gridPos": {
|
406
|
+
"h": 8,
|
407
|
+
"w": 24,
|
408
|
+
"x": 0,
|
409
|
+
"y": 5
|
410
|
+
},
|
411
|
+
"id": 12,
|
412
|
+
"links": [],
|
413
|
+
"options": {},
|
414
|
+
"pageSize": null,
|
415
|
+
"scroll": true,
|
416
|
+
"showHeader": true,
|
417
|
+
"sort": {
|
418
|
+
"col": 4,
|
419
|
+
"desc": true
|
420
|
+
},
|
421
|
+
"styles": [
|
422
|
+
{
|
423
|
+
"alias": "Time",
|
424
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
425
|
+
"pattern": "Time",
|
426
|
+
"type": "hidden"
|
427
|
+
},
|
428
|
+
{
|
429
|
+
"alias": "Count",
|
430
|
+
"colorMode": null,
|
431
|
+
"colors": [
|
432
|
+
"rgba(245, 54, 54, 0.9)",
|
433
|
+
"rgba(237, 129, 40, 0.89)",
|
434
|
+
"rgba(50, 172, 45, 0.97)"
|
435
|
+
],
|
436
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
437
|
+
"decimals": 0,
|
438
|
+
"mappingType": 1,
|
439
|
+
"pattern": "count",
|
440
|
+
"thresholds": [],
|
441
|
+
"type": "number",
|
442
|
+
"unit": "short"
|
443
|
+
},
|
444
|
+
{
|
445
|
+
"alias": "Query",
|
446
|
+
"colorMode": null,
|
447
|
+
"colors": [
|
448
|
+
"rgba(245, 54, 54, 0.9)",
|
449
|
+
"rgba(237, 129, 40, 0.89)",
|
450
|
+
"rgba(50, 172, 45, 0.97)"
|
451
|
+
],
|
452
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
453
|
+
"decimals": 2,
|
454
|
+
"mappingType": 1,
|
455
|
+
"pattern": "name",
|
456
|
+
"thresholds": [],
|
457
|
+
"type": "number",
|
458
|
+
"unit": "short"
|
459
|
+
},
|
460
|
+
{
|
461
|
+
"alias": "Mean",
|
462
|
+
"colorMode": null,
|
463
|
+
"colors": [
|
464
|
+
"rgba(245, 54, 54, 0.9)",
|
465
|
+
"rgba(237, 129, 40, 0.89)",
|
466
|
+
"rgba(50, 172, 45, 0.97)"
|
467
|
+
],
|
468
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
469
|
+
"decimals": 2,
|
470
|
+
"mappingType": 1,
|
471
|
+
"pattern": "mean",
|
472
|
+
"thresholds": [],
|
473
|
+
"type": "number",
|
474
|
+
"unit": "ms"
|
475
|
+
},
|
476
|
+
{
|
477
|
+
"alias": "Maximum",
|
478
|
+
"colorMode": null,
|
479
|
+
"colors": [
|
480
|
+
"rgba(245, 54, 54, 0.9)",
|
481
|
+
"rgba(237, 129, 40, 0.89)",
|
482
|
+
"rgba(50, 172, 45, 0.97)"
|
483
|
+
],
|
484
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
485
|
+
"decimals": 2,
|
486
|
+
"mappingType": 1,
|
487
|
+
"pattern": "max",
|
488
|
+
"thresholds": [],
|
489
|
+
"type": "number",
|
490
|
+
"unit": "ms"
|
491
|
+
},
|
492
|
+
{
|
493
|
+
"alias": "Total",
|
494
|
+
"colorMode": null,
|
495
|
+
"colors": [
|
496
|
+
"rgba(245, 54, 54, 0.9)",
|
497
|
+
"rgba(237, 129, 40, 0.89)",
|
498
|
+
"rgba(50, 172, 45, 0.97)"
|
499
|
+
],
|
500
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
501
|
+
"decimals": 2,
|
502
|
+
"mappingType": 1,
|
503
|
+
"pattern": "sum",
|
504
|
+
"thresholds": [],
|
505
|
+
"type": "number",
|
506
|
+
"unit": "ms"
|
507
|
+
},
|
508
|
+
{
|
509
|
+
"alias": "",
|
510
|
+
"colorMode": null,
|
511
|
+
"colors": [
|
512
|
+
"rgba(245, 54, 54, 0.9)",
|
513
|
+
"rgba(237, 129, 40, 0.89)",
|
514
|
+
"rgba(50, 172, 45, 0.97)"
|
515
|
+
],
|
516
|
+
"decimals": 2,
|
517
|
+
"pattern": "/.*/",
|
518
|
+
"thresholds": [],
|
519
|
+
"type": "number",
|
520
|
+
"unit": "ms"
|
521
|
+
}
|
522
|
+
],
|
523
|
+
"targets": [
|
524
|
+
{
|
525
|
+
"groupBy": [
|
526
|
+
{
|
527
|
+
"params": [
|
528
|
+
"name"
|
529
|
+
],
|
530
|
+
"type": "tag"
|
531
|
+
}
|
532
|
+
],
|
533
|
+
"measurement": "rails",
|
534
|
+
"orderByTime": "ASC",
|
535
|
+
"policy": "default",
|
536
|
+
"refId": "A",
|
537
|
+
"resultFormat": "table",
|
538
|
+
"select": [
|
539
|
+
[
|
540
|
+
{
|
541
|
+
"params": [
|
542
|
+
"value"
|
543
|
+
],
|
544
|
+
"type": "field"
|
545
|
+
},
|
546
|
+
{
|
547
|
+
"params": [],
|
548
|
+
"type": "count"
|
549
|
+
}
|
550
|
+
],
|
551
|
+
[
|
552
|
+
{
|
553
|
+
"params": [
|
554
|
+
"value"
|
555
|
+
],
|
556
|
+
"type": "field"
|
557
|
+
},
|
558
|
+
{
|
559
|
+
"params": [],
|
560
|
+
"type": "mean"
|
561
|
+
}
|
562
|
+
],
|
563
|
+
[
|
564
|
+
{
|
565
|
+
"params": [
|
566
|
+
"value"
|
567
|
+
],
|
568
|
+
"type": "field"
|
569
|
+
},
|
570
|
+
{
|
571
|
+
"params": [],
|
572
|
+
"type": "max"
|
573
|
+
}
|
574
|
+
],
|
575
|
+
[
|
576
|
+
{
|
577
|
+
"params": [
|
578
|
+
"value"
|
579
|
+
],
|
580
|
+
"type": "field"
|
581
|
+
},
|
582
|
+
{
|
583
|
+
"params": [],
|
584
|
+
"type": "sum"
|
585
|
+
}
|
586
|
+
]
|
587
|
+
],
|
588
|
+
"tags": [
|
589
|
+
{
|
590
|
+
"key": "request",
|
591
|
+
"operator": "=~",
|
592
|
+
"value": "/^$request_id$/"
|
593
|
+
},
|
594
|
+
{
|
595
|
+
"condition": "AND",
|
596
|
+
"key": "hook",
|
597
|
+
"operator": "=",
|
598
|
+
"value": "sql"
|
599
|
+
}
|
600
|
+
]
|
601
|
+
}
|
602
|
+
],
|
603
|
+
"title": "Database Queries",
|
604
|
+
"transform": "table",
|
605
|
+
"type": "table"
|
606
|
+
},
|
607
|
+
{
|
608
|
+
"columns": [],
|
609
|
+
"datasource": "${DS_INFLUXDB}",
|
610
|
+
"description": "Views rendered in this request.\n\n- Count: Number of occurrences\n- Mean: Average time spent in this query\n- Maximum: Slowest occurrence",
|
611
|
+
"fontSize": "100%",
|
612
|
+
"gridPos": {
|
613
|
+
"h": 9,
|
614
|
+
"w": 12,
|
615
|
+
"x": 0,
|
616
|
+
"y": 13
|
617
|
+
},
|
618
|
+
"id": 10,
|
619
|
+
"links": [],
|
620
|
+
"options": {},
|
621
|
+
"pageSize": null,
|
622
|
+
"scroll": true,
|
623
|
+
"showHeader": true,
|
624
|
+
"sort": {
|
625
|
+
"col": 4,
|
626
|
+
"desc": true
|
627
|
+
},
|
628
|
+
"styles": [
|
629
|
+
{
|
630
|
+
"alias": "Time",
|
631
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
632
|
+
"pattern": "Time",
|
633
|
+
"type": "hidden"
|
634
|
+
},
|
635
|
+
{
|
636
|
+
"alias": "Count",
|
637
|
+
"colorMode": null,
|
638
|
+
"colors": [
|
639
|
+
"rgba(245, 54, 54, 0.9)",
|
640
|
+
"rgba(237, 129, 40, 0.89)",
|
641
|
+
"rgba(50, 172, 45, 0.97)"
|
642
|
+
],
|
643
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
644
|
+
"decimals": null,
|
645
|
+
"mappingType": 1,
|
646
|
+
"pattern": "count",
|
647
|
+
"thresholds": [],
|
648
|
+
"type": "number",
|
649
|
+
"unit": "short"
|
650
|
+
},
|
651
|
+
{
|
652
|
+
"alias": "Mean",
|
653
|
+
"colorMode": null,
|
654
|
+
"colors": [
|
655
|
+
"rgba(245, 54, 54, 0.9)",
|
656
|
+
"rgba(237, 129, 40, 0.89)",
|
657
|
+
"rgba(50, 172, 45, 0.97)"
|
658
|
+
],
|
659
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
660
|
+
"decimals": 2,
|
661
|
+
"mappingType": 1,
|
662
|
+
"pattern": "mean",
|
663
|
+
"thresholds": [],
|
664
|
+
"type": "number",
|
665
|
+
"unit": "ms"
|
666
|
+
},
|
667
|
+
{
|
668
|
+
"alias": "Maximum",
|
669
|
+
"colorMode": null,
|
670
|
+
"colors": [
|
671
|
+
"rgba(245, 54, 54, 0.9)",
|
672
|
+
"rgba(237, 129, 40, 0.89)",
|
673
|
+
"rgba(50, 172, 45, 0.97)"
|
674
|
+
],
|
675
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
676
|
+
"decimals": 2,
|
677
|
+
"mappingType": 1,
|
678
|
+
"pattern": "max",
|
679
|
+
"thresholds": [],
|
680
|
+
"type": "number",
|
681
|
+
"unit": "ms"
|
682
|
+
},
|
683
|
+
{
|
684
|
+
"alias": "File",
|
685
|
+
"colorMode": null,
|
686
|
+
"colors": [
|
687
|
+
"rgba(245, 54, 54, 0.9)",
|
688
|
+
"rgba(237, 129, 40, 0.89)",
|
689
|
+
"rgba(50, 172, 45, 0.97)"
|
690
|
+
],
|
691
|
+
"decimals": 2,
|
692
|
+
"pattern": "filename",
|
693
|
+
"thresholds": [],
|
694
|
+
"type": "number",
|
695
|
+
"unit": "ms"
|
696
|
+
}
|
697
|
+
],
|
698
|
+
"targets": [
|
699
|
+
{
|
700
|
+
"groupBy": [
|
701
|
+
{
|
702
|
+
"params": [
|
703
|
+
"filename"
|
704
|
+
],
|
705
|
+
"type": "tag"
|
706
|
+
}
|
707
|
+
],
|
708
|
+
"measurement": "rails",
|
709
|
+
"orderByTime": "ASC",
|
710
|
+
"policy": "default",
|
711
|
+
"refId": "A",
|
712
|
+
"resultFormat": "table",
|
713
|
+
"select": [
|
714
|
+
[
|
715
|
+
{
|
716
|
+
"params": [
|
717
|
+
"value"
|
718
|
+
],
|
719
|
+
"type": "field"
|
720
|
+
},
|
721
|
+
{
|
722
|
+
"params": [],
|
723
|
+
"type": "count"
|
724
|
+
}
|
725
|
+
],
|
726
|
+
[
|
727
|
+
{
|
728
|
+
"params": [
|
729
|
+
"value"
|
730
|
+
],
|
731
|
+
"type": "field"
|
732
|
+
},
|
733
|
+
{
|
734
|
+
"params": [],
|
735
|
+
"type": "mean"
|
736
|
+
}
|
737
|
+
],
|
738
|
+
[
|
739
|
+
{
|
740
|
+
"params": [
|
741
|
+
"value"
|
742
|
+
],
|
743
|
+
"type": "field"
|
744
|
+
},
|
745
|
+
{
|
746
|
+
"params": [],
|
747
|
+
"type": "max"
|
748
|
+
}
|
749
|
+
]
|
750
|
+
],
|
751
|
+
"tags": [
|
752
|
+
{
|
753
|
+
"key": "request",
|
754
|
+
"operator": "=~",
|
755
|
+
"value": "/^$request_id$/"
|
756
|
+
},
|
757
|
+
{
|
758
|
+
"condition": "AND",
|
759
|
+
"key": "hook",
|
760
|
+
"operator": "=",
|
761
|
+
"value": "render_template"
|
762
|
+
}
|
763
|
+
]
|
764
|
+
}
|
765
|
+
],
|
766
|
+
"title": "Views Rendered",
|
767
|
+
"transform": "table",
|
768
|
+
"type": "table"
|
769
|
+
},
|
770
|
+
{
|
771
|
+
"columns": [],
|
772
|
+
"datasource": "${DS_INFLUXDB}",
|
773
|
+
"description": "Partials rendered in this request.\n\n- Count: Number of occurrences\n- Mean: Average time spent in this partial\n- Maximum: Slowest occurrence\n- Total: Total time spent in this partial",
|
774
|
+
"fontSize": "100%",
|
775
|
+
"gridPos": {
|
776
|
+
"h": 9,
|
777
|
+
"w": 12,
|
778
|
+
"x": 12,
|
779
|
+
"y": 13
|
780
|
+
},
|
781
|
+
"id": 16,
|
782
|
+
"links": [],
|
783
|
+
"options": {},
|
784
|
+
"pageSize": null,
|
785
|
+
"scroll": true,
|
786
|
+
"showHeader": true,
|
787
|
+
"sort": {
|
788
|
+
"col": 4,
|
789
|
+
"desc": true
|
790
|
+
},
|
791
|
+
"styles": [
|
792
|
+
{
|
793
|
+
"alias": "Time",
|
794
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
795
|
+
"pattern": "Time",
|
796
|
+
"type": "hidden"
|
797
|
+
},
|
798
|
+
{
|
799
|
+
"alias": "Count",
|
800
|
+
"colorMode": null,
|
801
|
+
"colors": [
|
802
|
+
"rgba(245, 54, 54, 0.9)",
|
803
|
+
"rgba(237, 129, 40, 0.89)",
|
804
|
+
"rgba(50, 172, 45, 0.97)"
|
805
|
+
],
|
806
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
807
|
+
"decimals": 0,
|
808
|
+
"mappingType": 1,
|
809
|
+
"pattern": "count",
|
810
|
+
"thresholds": [],
|
811
|
+
"type": "number",
|
812
|
+
"unit": "short"
|
813
|
+
},
|
814
|
+
{
|
815
|
+
"alias": "File",
|
816
|
+
"colorMode": null,
|
817
|
+
"colors": [
|
818
|
+
"rgba(245, 54, 54, 0.9)",
|
819
|
+
"rgba(237, 129, 40, 0.89)",
|
820
|
+
"rgba(50, 172, 45, 0.97)"
|
821
|
+
],
|
822
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
823
|
+
"decimals": 2,
|
824
|
+
"mappingType": 1,
|
825
|
+
"pattern": "filename",
|
826
|
+
"thresholds": [],
|
827
|
+
"type": "string",
|
828
|
+
"unit": "short"
|
829
|
+
},
|
830
|
+
{
|
831
|
+
"alias": "Mean",
|
832
|
+
"colorMode": null,
|
833
|
+
"colors": [
|
834
|
+
"rgba(245, 54, 54, 0.9)",
|
835
|
+
"rgba(237, 129, 40, 0.89)",
|
836
|
+
"rgba(50, 172, 45, 0.97)"
|
837
|
+
],
|
838
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
839
|
+
"decimals": 2,
|
840
|
+
"mappingType": 1,
|
841
|
+
"pattern": "mean",
|
842
|
+
"thresholds": [],
|
843
|
+
"type": "number",
|
844
|
+
"unit": "ms"
|
845
|
+
},
|
846
|
+
{
|
847
|
+
"alias": "Maximum",
|
848
|
+
"colorMode": null,
|
849
|
+
"colors": [
|
850
|
+
"rgba(245, 54, 54, 0.9)",
|
851
|
+
"rgba(237, 129, 40, 0.89)",
|
852
|
+
"rgba(50, 172, 45, 0.97)"
|
853
|
+
],
|
854
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
855
|
+
"decimals": 2,
|
856
|
+
"mappingType": 1,
|
857
|
+
"pattern": "max",
|
858
|
+
"thresholds": [],
|
859
|
+
"type": "number",
|
860
|
+
"unit": "ms"
|
861
|
+
},
|
862
|
+
{
|
863
|
+
"alias": "Total",
|
864
|
+
"colorMode": null,
|
865
|
+
"colors": [
|
866
|
+
"rgba(245, 54, 54, 0.9)",
|
867
|
+
"rgba(237, 129, 40, 0.89)",
|
868
|
+
"rgba(50, 172, 45, 0.97)"
|
869
|
+
],
|
870
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
871
|
+
"decimals": 2,
|
872
|
+
"mappingType": 1,
|
873
|
+
"pattern": "sum",
|
874
|
+
"thresholds": [],
|
875
|
+
"type": "number",
|
876
|
+
"unit": "ms"
|
877
|
+
},
|
878
|
+
{
|
879
|
+
"alias": "",
|
880
|
+
"colorMode": null,
|
881
|
+
"colors": [
|
882
|
+
"rgba(245, 54, 54, 0.9)",
|
883
|
+
"rgba(237, 129, 40, 0.89)",
|
884
|
+
"rgba(50, 172, 45, 0.97)"
|
885
|
+
],
|
886
|
+
"decimals": 2,
|
887
|
+
"pattern": "/.*/",
|
888
|
+
"thresholds": [],
|
889
|
+
"type": "number",
|
890
|
+
"unit": "ms"
|
891
|
+
}
|
892
|
+
],
|
893
|
+
"targets": [
|
894
|
+
{
|
895
|
+
"groupBy": [
|
896
|
+
{
|
897
|
+
"params": [
|
898
|
+
"filename"
|
899
|
+
],
|
900
|
+
"type": "tag"
|
901
|
+
}
|
902
|
+
],
|
903
|
+
"measurement": "rails",
|
904
|
+
"orderByTime": "ASC",
|
905
|
+
"policy": "default",
|
906
|
+
"refId": "A",
|
907
|
+
"resultFormat": "table",
|
908
|
+
"select": [
|
909
|
+
[
|
910
|
+
{
|
911
|
+
"params": [
|
912
|
+
"value"
|
913
|
+
],
|
914
|
+
"type": "field"
|
915
|
+
},
|
916
|
+
{
|
917
|
+
"params": [],
|
918
|
+
"type": "count"
|
919
|
+
}
|
920
|
+
],
|
921
|
+
[
|
922
|
+
{
|
923
|
+
"params": [
|
924
|
+
"value"
|
925
|
+
],
|
926
|
+
"type": "field"
|
927
|
+
},
|
928
|
+
{
|
929
|
+
"params": [],
|
930
|
+
"type": "mean"
|
931
|
+
}
|
932
|
+
],
|
933
|
+
[
|
934
|
+
{
|
935
|
+
"params": [
|
936
|
+
"value"
|
937
|
+
],
|
938
|
+
"type": "field"
|
939
|
+
},
|
940
|
+
{
|
941
|
+
"params": [],
|
942
|
+
"type": "max"
|
943
|
+
}
|
944
|
+
],
|
945
|
+
[
|
946
|
+
{
|
947
|
+
"params": [
|
948
|
+
"value"
|
949
|
+
],
|
950
|
+
"type": "field"
|
951
|
+
},
|
952
|
+
{
|
953
|
+
"params": [],
|
954
|
+
"type": "sum"
|
955
|
+
}
|
956
|
+
]
|
957
|
+
],
|
958
|
+
"tags": [
|
959
|
+
{
|
960
|
+
"key": "request",
|
961
|
+
"operator": "=~",
|
962
|
+
"value": "/^$request_id$/"
|
963
|
+
},
|
964
|
+
{
|
965
|
+
"condition": "AND",
|
966
|
+
"key": "hook",
|
967
|
+
"operator": "=",
|
968
|
+
"value": "render_partial"
|
969
|
+
}
|
970
|
+
]
|
971
|
+
}
|
972
|
+
],
|
973
|
+
"title": "Partials Rendered",
|
974
|
+
"transform": "table",
|
975
|
+
"type": "table"
|
976
|
+
}
|
977
|
+
],
|
978
|
+
"refresh": false,
|
979
|
+
"schemaVersion": 18,
|
980
|
+
"style": "dark",
|
981
|
+
"tags": [
|
982
|
+
"performance",
|
983
|
+
"ruby on rails",
|
984
|
+
"influxdb"
|
985
|
+
],
|
986
|
+
"templating": {
|
987
|
+
"list": [
|
988
|
+
{
|
989
|
+
"current": {
|
990
|
+
"text": "",
|
991
|
+
"value": ""
|
992
|
+
},
|
993
|
+
"hide": 2,
|
994
|
+
"label": null,
|
995
|
+
"name": "request_id",
|
996
|
+
"options": [
|
997
|
+
{
|
998
|
+
"selected": false,
|
999
|
+
"text": "",
|
1000
|
+
"value": ""
|
1001
|
+
}
|
1002
|
+
],
|
1003
|
+
"query": "",
|
1004
|
+
"skipUrlSync": false,
|
1005
|
+
"type": "textbox"
|
1006
|
+
},
|
1007
|
+
{
|
1008
|
+
"current": {
|
1009
|
+
"text": "",
|
1010
|
+
"value": ""
|
1011
|
+
},
|
1012
|
+
"hide": 2,
|
1013
|
+
"label": null,
|
1014
|
+
"name": "method",
|
1015
|
+
"options": [
|
1016
|
+
{
|
1017
|
+
"selected": false,
|
1018
|
+
"text": "",
|
1019
|
+
"value": ""
|
1020
|
+
}
|
1021
|
+
],
|
1022
|
+
"query": "",
|
1023
|
+
"skipUrlSync": false,
|
1024
|
+
"type": "textbox"
|
1025
|
+
}
|
1026
|
+
]
|
1027
|
+
},
|
1028
|
+
"time": {
|
1029
|
+
"from": "now-6h",
|
1030
|
+
"to": "now"
|
1031
|
+
},
|
1032
|
+
"timepicker": {
|
1033
|
+
"hidden": true,
|
1034
|
+
"refresh_intervals": [
|
1035
|
+
""
|
1036
|
+
],
|
1037
|
+
"time_options": [
|
1038
|
+
"5m",
|
1039
|
+
"15m",
|
1040
|
+
"1h",
|
1041
|
+
"6h",
|
1042
|
+
"12h",
|
1043
|
+
"24h",
|
1044
|
+
"2d",
|
1045
|
+
"7d",
|
1046
|
+
"30d"
|
1047
|
+
]
|
1048
|
+
},
|
1049
|
+
"timezone": "",
|
1050
|
+
"title": "Ruby On Rails Performance (per Request)",
|
1051
|
+
"uid": "H8S9fSVWz",
|
1052
|
+
"version": 11
|
1053
|
+
}
|