influxdb-rails 1.0.0.beta4 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +11 -0
  3. data/.github/workflows/rubocop.yml +18 -0
  4. data/.github/workflows/spec.yml +32 -0
  5. data/.gitignore +1 -0
  6. data/.rubocop.yml +35 -7
  7. data/CHANGELOG.md +40 -3
  8. data/README.md +125 -27
  9. data/Rakefile +0 -6
  10. data/gemfiles/Gemfile.rails-6.0.x +9 -0
  11. data/gemfiles/Gemfile.rails-6.1.x +9 -0
  12. data/influxdb-rails.gemspec +7 -4
  13. data/lib/influxdb-rails.rb +13 -2
  14. data/lib/influxdb/rails/configuration.rb +22 -13
  15. data/lib/influxdb/rails/context.rb +6 -40
  16. data/lib/influxdb/rails/helpers/rspec_matchers.rb +48 -0
  17. data/lib/influxdb/rails/metric.rb +39 -0
  18. data/lib/influxdb/rails/middleware/action_mailer_subscriber.rb +22 -0
  19. data/lib/influxdb/rails/middleware/active_job_subscriber.rb +67 -0
  20. data/lib/influxdb/rails/middleware/active_record_subscriber.rb +26 -0
  21. data/lib/influxdb/rails/middleware/block_instrumentation_subscriber.rb +24 -0
  22. data/lib/influxdb/rails/middleware/render_subscriber.rb +15 -16
  23. data/lib/influxdb/rails/middleware/request_subscriber.rb +16 -21
  24. data/lib/influxdb/rails/middleware/sql_subscriber.rb +18 -18
  25. data/lib/influxdb/rails/middleware/subscriber.rb +40 -27
  26. data/lib/influxdb/rails/railtie.rb +15 -18
  27. data/lib/influxdb/rails/sql/normalizer.rb +3 -3
  28. data/lib/influxdb/rails/tags.rb +33 -0
  29. data/lib/influxdb/rails/test_client.rb +13 -0
  30. data/lib/influxdb/rails/values.rb +24 -0
  31. data/lib/influxdb/rails/version.rb +1 -1
  32. data/lib/rails/generators/influxdb/templates/initializer.rb +4 -0
  33. data/sample-dashboard/Dockerfile +2 -3
  34. data/sample-dashboard/README.md +21 -28
  35. data/sample-dashboard/Rakefile +10 -4
  36. data/sample-dashboard/Ruby On Rails ActiveJob.json +600 -0
  37. data/sample-dashboard/Ruby On Rails Performance per Action.json +1330 -0
  38. data/sample-dashboard/{Ruby On Rails Performance (per Request).json → Ruby On Rails Performance per Request.json } +367 -217
  39. data/sample-dashboard/Ruby On Rails Performance.json +1348 -1110
  40. data/sample-dashboard/Ruby On Rails Requests.json +834 -0
  41. data/sample-dashboard/Ruby On Rails Slowlog by Action.json +278 -0
  42. data/sample-dashboard/Ruby On Rails Slowlog by Request.json +277 -0
  43. data/sample-dashboard/Ruby On Rails Slowlog by SQL.json +328 -0
  44. data/sample-dashboard/docker-compose.yml +7 -1
  45. data/sample-dashboard/provisioning/activejob.json +600 -0
  46. data/sample-dashboard/provisioning/performance-action.json +1330 -0
  47. data/sample-dashboard/provisioning/performance-request.json +361 -211
  48. data/sample-dashboard/provisioning/performance.json +1337 -1099
  49. data/sample-dashboard/provisioning/requests.json +834 -0
  50. data/sample-dashboard/provisioning/slowlog-action.json +278 -0
  51. data/sample-dashboard/provisioning/slowlog-requests.json +277 -0
  52. data/sample-dashboard/provisioning/slowlog-sql.json +328 -0
  53. data/spec/requests/action_controller_metrics_spec.rb +83 -0
  54. data/spec/requests/action_mailer_deliver_metrics_spec.rb +49 -0
  55. data/spec/requests/action_view_collection_metrics_spec.rb +66 -0
  56. data/spec/requests/action_view_partial_metrics_spec.rb +62 -0
  57. data/spec/requests/action_view_template_metrics_spec.rb +62 -0
  58. data/spec/requests/active_job_enqueue_metrics_spec.rb +65 -0
  59. data/spec/requests/active_job_perform_metrics_spec.rb +68 -0
  60. data/spec/requests/active_record_instantiation_metrics_spec.rb +65 -0
  61. data/spec/requests/active_record_sql_metrics_spec.rb +103 -0
  62. data/spec/requests/block_inistrumentation_spec.rb +64 -0
  63. data/spec/requests/context_spec.rb +27 -0
  64. data/spec/requests/logger_spec.rb +10 -0
  65. data/spec/spec_helper.rb +12 -4
  66. data/spec/support/broken_client.rb +11 -0
  67. data/spec/support/rails5/app.rb +48 -13
  68. data/spec/support/rails6/app.rb +83 -0
  69. data/spec/support/views/layouts/mailer.txt.erb +1 -0
  70. data/spec/support/views/{widgets → metrics}/_item.html.erb +0 -0
  71. data/spec/support/views/{widgets → metrics}/index.html.erb +0 -0
  72. data/spec/support/views/metrics/show.html.erb +4 -0
  73. data/spec/unit/block_instrumentation_spec.rb +18 -0
  74. metadata +124 -46
  75. data/.travis.yml +0 -37
  76. data/gemfiles/Gemfile.rails-4.2.x +0 -7
  77. data/gemfiles/Gemfile.rails-5.0.x +0 -7
  78. data/gemfiles/Gemfile.rails-5.1.x +0 -7
  79. data/lib/influxdb/rails/instrumentation.rb +0 -34
  80. data/lib/influxdb/rails/middleware/simple_subscriber.rb +0 -33
  81. data/spec/controllers/widgets_controller_spec.rb +0 -15
  82. data/spec/integration/integration_helper.rb +0 -1
  83. data/spec/integration/metrics_spec.rb +0 -27
  84. data/spec/shared_examples/data.rb +0 -61
  85. data/spec/support/rails4/app.rb +0 -48
  86. data/spec/unit/context_spec.rb +0 -40
  87. data/spec/unit/middleware/render_subscriber_spec.rb +0 -96
  88. data/spec/unit/middleware/request_subscriber_spec.rb +0 -103
  89. data/spec/unit/middleware/sql_subscriber_spec.rb +0 -108
@@ -0,0 +1,1330 @@
1
+ {
2
+ "__inputs": [
3
+ {
4
+ "name": "DS_INFLUXDB-RAILS",
5
+ "label": "InfluxDB-Rails",
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": "7.1.1"
18
+ },
19
+ {
20
+ "type": "panel",
21
+ "id": "graph",
22
+ "name": "Graph",
23
+ "version": ""
24
+ },
25
+ {
26
+ "type": "datasource",
27
+ "id": "influxdb",
28
+ "name": "InfluxDB",
29
+ "version": "1.0.0"
30
+ },
31
+ {
32
+ "type": "panel",
33
+ "id": "stat",
34
+ "name": "Stat",
35
+ "version": ""
36
+ },
37
+ {
38
+ "type": "panel",
39
+ "id": "table-old",
40
+ "name": "Table (old)",
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": "Controller Action Performance Insights based on influxdb-rails",
58
+ "editable": true,
59
+ "gnetId": 11031,
60
+ "graphTooltip": 0,
61
+ "id": null,
62
+ "iteration": 1616428619978,
63
+ "links": [
64
+ {
65
+ "$$hashKey": "object:226",
66
+ "icon": "external link",
67
+ "keepTime": false,
68
+ "tags": [
69
+ "influxdb-rails"
70
+ ],
71
+ "type": "dashboards"
72
+ }
73
+ ],
74
+ "panels": [
75
+ {
76
+ "cacheTimeout": null,
77
+ "datasource": "InfluxDB",
78
+ "fieldConfig": {
79
+ "defaults": {
80
+ "custom": {},
81
+ "mappings": [
82
+ {
83
+ "id": 0,
84
+ "op": "=",
85
+ "text": "N/A",
86
+ "type": 1,
87
+ "value": "null"
88
+ }
89
+ ],
90
+ "nullValueMode": "connected",
91
+ "thresholds": {
92
+ "mode": "absolute",
93
+ "steps": [
94
+ {
95
+ "color": "green",
96
+ "value": null
97
+ }
98
+ ]
99
+ },
100
+ "unit": "short"
101
+ },
102
+ "overrides": []
103
+ },
104
+ "gridPos": {
105
+ "h": 3,
106
+ "w": 5,
107
+ "x": 0,
108
+ "y": 0
109
+ },
110
+ "id": 22,
111
+ "interval": null,
112
+ "links": [],
113
+ "maxDataPoints": 100,
114
+ "options": {
115
+ "colorMode": "value",
116
+ "graphMode": "none",
117
+ "justifyMode": "center",
118
+ "orientation": "horizontal",
119
+ "reduceOptions": {
120
+ "calcs": [
121
+ "sum"
122
+ ],
123
+ "fields": "/^rails\\.count$/",
124
+ "values": false
125
+ },
126
+ "textMode": "auto"
127
+ },
128
+ "pluginVersion": "7.1.1",
129
+ "targets": [
130
+ {
131
+ "groupBy": [],
132
+ "measurement": "rails",
133
+ "orderByTime": "ASC",
134
+ "policy": "default",
135
+ "refId": "A",
136
+ "resultFormat": "time_series",
137
+ "select": [
138
+ [
139
+ {
140
+ "params": [
141
+ "controller"
142
+ ],
143
+ "type": "field"
144
+ },
145
+ {
146
+ "params": [],
147
+ "type": "count"
148
+ }
149
+ ]
150
+ ],
151
+ "tags": [
152
+ {
153
+ "key": "method",
154
+ "operator": "=~",
155
+ "value": "/^$Action$/"
156
+ },
157
+ {
158
+ "condition": "AND",
159
+ "key": "hook",
160
+ "operator": "=",
161
+ "value": "process_action"
162
+ }
163
+ ]
164
+ }
165
+ ],
166
+ "title": "Requests Served",
167
+ "type": "stat"
168
+ },
169
+ {
170
+ "cacheTimeout": null,
171
+ "datasource": "InfluxDB",
172
+ "description": "",
173
+ "fieldConfig": {
174
+ "defaults": {
175
+ "custom": {},
176
+ "decimals": 2,
177
+ "displayName": "Response Time",
178
+ "mappings": [],
179
+ "nullValueMode": "connected",
180
+ "thresholds": {
181
+ "mode": "absolute",
182
+ "steps": [
183
+ {
184
+ "color": "#299c46",
185
+ "value": null
186
+ },
187
+ {
188
+ "color": "yellow",
189
+ "value": 150
190
+ },
191
+ {
192
+ "color": "red",
193
+ "value": 300
194
+ }
195
+ ]
196
+ },
197
+ "unit": "ms"
198
+ },
199
+ "overrides": []
200
+ },
201
+ "gridPos": {
202
+ "h": 3,
203
+ "w": 6,
204
+ "x": 5,
205
+ "y": 0
206
+ },
207
+ "id": 30,
208
+ "interval": null,
209
+ "links": [],
210
+ "maxDataPoints": 100,
211
+ "options": {
212
+ "colorMode": "value",
213
+ "graphMode": "none",
214
+ "justifyMode": "center",
215
+ "orientation": "horizontal",
216
+ "reduceOptions": {
217
+ "calcs": [
218
+ "mean"
219
+ ],
220
+ "fields": "",
221
+ "values": false
222
+ },
223
+ "textMode": "auto"
224
+ },
225
+ "pluginVersion": "7.1.1",
226
+ "targets": [
227
+ {
228
+ "groupBy": [
229
+ {
230
+ "params": [
231
+ "$__interval"
232
+ ],
233
+ "type": "time"
234
+ },
235
+ {
236
+ "params": [
237
+ "null"
238
+ ],
239
+ "type": "fill"
240
+ }
241
+ ],
242
+ "hide": false,
243
+ "measurement": "rails",
244
+ "orderByTime": "ASC",
245
+ "policy": "default",
246
+ "refId": "A",
247
+ "resultFormat": "time_series",
248
+ "select": [
249
+ [
250
+ {
251
+ "params": [
252
+ "controller"
253
+ ],
254
+ "type": "field"
255
+ },
256
+ {
257
+ "params": [],
258
+ "type": "mean"
259
+ }
260
+ ]
261
+ ],
262
+ "tags": [
263
+ {
264
+ "key": "hook",
265
+ "operator": "=",
266
+ "value": "process_action"
267
+ },
268
+ {
269
+ "condition": "AND",
270
+ "key": "method",
271
+ "operator": "=~",
272
+ "value": "/^$Action$/"
273
+ }
274
+ ]
275
+ }
276
+ ],
277
+ "title": "Average Response",
278
+ "type": "stat"
279
+ },
280
+ {
281
+ "cacheTimeout": null,
282
+ "datasource": "InfluxDB",
283
+ "description": "",
284
+ "fieldConfig": {
285
+ "defaults": {
286
+ "custom": {},
287
+ "decimals": 2,
288
+ "displayName": "Response Time",
289
+ "mappings": [],
290
+ "nullValueMode": "connected",
291
+ "thresholds": {
292
+ "mode": "absolute",
293
+ "steps": [
294
+ {
295
+ "color": "#299c46",
296
+ "value": null
297
+ },
298
+ {
299
+ "color": "yellow",
300
+ "value": 150
301
+ },
302
+ {
303
+ "color": "red",
304
+ "value": 300
305
+ }
306
+ ]
307
+ },
308
+ "unit": "ms"
309
+ },
310
+ "overrides": []
311
+ },
312
+ "gridPos": {
313
+ "h": 3,
314
+ "w": 6,
315
+ "x": 11,
316
+ "y": 0
317
+ },
318
+ "id": 31,
319
+ "interval": null,
320
+ "links": [],
321
+ "maxDataPoints": 100,
322
+ "options": {
323
+ "colorMode": "value",
324
+ "graphMode": "none",
325
+ "justifyMode": "center",
326
+ "orientation": "horizontal",
327
+ "reduceOptions": {
328
+ "calcs": [
329
+ "mean"
330
+ ],
331
+ "fields": "",
332
+ "values": false
333
+ },
334
+ "textMode": "auto"
335
+ },
336
+ "pluginVersion": "7.1.1",
337
+ "targets": [
338
+ {
339
+ "groupBy": [
340
+ {
341
+ "params": [
342
+ "$__interval"
343
+ ],
344
+ "type": "time"
345
+ },
346
+ {
347
+ "params": [
348
+ "null"
349
+ ],
350
+ "type": "fill"
351
+ }
352
+ ],
353
+ "hide": false,
354
+ "measurement": "rails",
355
+ "orderByTime": "ASC",
356
+ "policy": "default",
357
+ "refId": "A",
358
+ "resultFormat": "time_series",
359
+ "select": [
360
+ [
361
+ {
362
+ "params": [
363
+ "view"
364
+ ],
365
+ "type": "field"
366
+ },
367
+ {
368
+ "params": [],
369
+ "type": "mean"
370
+ }
371
+ ]
372
+ ],
373
+ "tags": [
374
+ {
375
+ "key": "hook",
376
+ "operator": "=",
377
+ "value": "process_action"
378
+ },
379
+ {
380
+ "condition": "AND",
381
+ "key": "method",
382
+ "operator": "=~",
383
+ "value": "/^$Action$/"
384
+ }
385
+ ]
386
+ }
387
+ ],
388
+ "title": "Average View Rendering",
389
+ "type": "stat"
390
+ },
391
+ {
392
+ "cacheTimeout": null,
393
+ "datasource": "InfluxDB",
394
+ "fieldConfig": {
395
+ "defaults": {
396
+ "custom": {},
397
+ "displayName": "Response Time",
398
+ "mappings": [],
399
+ "nullValueMode": "connected",
400
+ "thresholds": {
401
+ "mode": "absolute",
402
+ "steps": [
403
+ {
404
+ "color": "#299c46",
405
+ "value": null
406
+ },
407
+ {
408
+ "color": "rgba(237, 129, 40, 0.89)",
409
+ "value": 50
410
+ },
411
+ {
412
+ "color": "#d44a3a",
413
+ "value": 100
414
+ }
415
+ ]
416
+ },
417
+ "unit": "ms"
418
+ },
419
+ "overrides": []
420
+ },
421
+ "gridPos": {
422
+ "h": 3,
423
+ "w": 7,
424
+ "x": 17,
425
+ "y": 0
426
+ },
427
+ "id": 28,
428
+ "interval": null,
429
+ "links": [],
430
+ "maxDataPoints": 100,
431
+ "options": {
432
+ "colorMode": "value",
433
+ "graphMode": "none",
434
+ "justifyMode": "center",
435
+ "orientation": "horizontal",
436
+ "reduceOptions": {
437
+ "calcs": [
438
+ "mean"
439
+ ],
440
+ "fields": "",
441
+ "values": false
442
+ },
443
+ "textMode": "auto"
444
+ },
445
+ "pluginVersion": "7.1.1",
446
+ "targets": [
447
+ {
448
+ "groupBy": [
449
+ {
450
+ "params": [
451
+ "$__interval"
452
+ ],
453
+ "type": "time"
454
+ },
455
+ {
456
+ "params": [
457
+ "null"
458
+ ],
459
+ "type": "fill"
460
+ }
461
+ ],
462
+ "measurement": "rails",
463
+ "orderByTime": "ASC",
464
+ "policy": "default",
465
+ "refId": "A",
466
+ "resultFormat": "time_series",
467
+ "select": [
468
+ [
469
+ {
470
+ "params": [
471
+ "db"
472
+ ],
473
+ "type": "field"
474
+ },
475
+ {
476
+ "params": [],
477
+ "type": "mean"
478
+ }
479
+ ]
480
+ ],
481
+ "tags": [
482
+ {
483
+ "key": "hook",
484
+ "operator": "=",
485
+ "value": "process_action"
486
+ },
487
+ {
488
+ "condition": "AND",
489
+ "key": "method",
490
+ "operator": "=~",
491
+ "value": "/^$Action$/"
492
+ }
493
+ ]
494
+ }
495
+ ],
496
+ "title": "Average Database Response",
497
+ "type": "stat"
498
+ },
499
+ {
500
+ "aliasColors": {},
501
+ "bars": true,
502
+ "dashLength": 10,
503
+ "dashes": false,
504
+ "datasource": "InfluxDB",
505
+ "fieldConfig": {
506
+ "defaults": {
507
+ "custom": {},
508
+ "links": []
509
+ },
510
+ "overrides": []
511
+ },
512
+ "fill": 1,
513
+ "fillGradient": 0,
514
+ "gridPos": {
515
+ "h": 8,
516
+ "w": 13,
517
+ "x": 0,
518
+ "y": 3
519
+ },
520
+ "hiddenSeries": false,
521
+ "id": 20,
522
+ "legend": {
523
+ "avg": false,
524
+ "current": false,
525
+ "max": false,
526
+ "min": false,
527
+ "show": true,
528
+ "total": false,
529
+ "values": false
530
+ },
531
+ "lines": false,
532
+ "linewidth": 7,
533
+ "links": [],
534
+ "nullPointMode": "null",
535
+ "percentage": false,
536
+ "pluginVersion": "7.1.1",
537
+ "pointradius": 3,
538
+ "points": true,
539
+ "renderer": "flot",
540
+ "seriesOverrides": [
541
+ {
542
+ "alias": "rails.max",
543
+ "fillBelowTo": "rails.min",
544
+ "lines": false
545
+ },
546
+ {
547
+ "alias": "rails.min",
548
+ "lines": false
549
+ }
550
+ ],
551
+ "spaceLength": 10,
552
+ "stack": false,
553
+ "steppedLine": false,
554
+ "targets": [
555
+ {
556
+ "alias": "",
557
+ "groupBy": [
558
+ {
559
+ "params": [
560
+ "$__interval"
561
+ ],
562
+ "type": "time"
563
+ },
564
+ {
565
+ "params": [
566
+ "null"
567
+ ],
568
+ "type": "fill"
569
+ }
570
+ ],
571
+ "measurement": "rails",
572
+ "orderByTime": "ASC",
573
+ "policy": "default",
574
+ "refId": "A",
575
+ "resultFormat": "time_series",
576
+ "select": [
577
+ [
578
+ {
579
+ "params": [
580
+ "controller"
581
+ ],
582
+ "type": "field"
583
+ },
584
+ {
585
+ "params": [],
586
+ "type": "sum"
587
+ }
588
+ ]
589
+ ],
590
+ "tags": [
591
+ {
592
+ "key": "method",
593
+ "operator": "=~",
594
+ "value": "/^$Action$/"
595
+ },
596
+ {
597
+ "condition": "AND",
598
+ "key": "hook",
599
+ "operator": "=",
600
+ "value": "process_action"
601
+ }
602
+ ]
603
+ }
604
+ ],
605
+ "thresholds": [],
606
+ "timeFrom": null,
607
+ "timeRegions": [],
608
+ "timeShift": null,
609
+ "title": "Response time",
610
+ "tooltip": {
611
+ "shared": true,
612
+ "sort": 0,
613
+ "value_type": "individual"
614
+ },
615
+ "type": "graph",
616
+ "xaxis": {
617
+ "buckets": null,
618
+ "mode": "time",
619
+ "name": null,
620
+ "show": true,
621
+ "values": []
622
+ },
623
+ "yaxes": [
624
+ {
625
+ "decimals": null,
626
+ "format": "dtdurationms",
627
+ "label": "",
628
+ "logBase": 1,
629
+ "max": null,
630
+ "min": null,
631
+ "show": true
632
+ },
633
+ {
634
+ "format": "short",
635
+ "label": null,
636
+ "logBase": 1,
637
+ "max": null,
638
+ "min": null,
639
+ "show": false
640
+ }
641
+ ],
642
+ "yaxis": {
643
+ "align": false,
644
+ "alignLevel": null
645
+ }
646
+ },
647
+ {
648
+ "columns": [],
649
+ "datasource": "InfluxDB",
650
+ "fieldConfig": {
651
+ "defaults": {
652
+ "custom": {}
653
+ },
654
+ "overrides": []
655
+ },
656
+ "fontSize": "100%",
657
+ "gridPos": {
658
+ "h": 8,
659
+ "w": 11,
660
+ "x": 13,
661
+ "y": 3
662
+ },
663
+ "id": 26,
664
+ "links": [],
665
+ "pageSize": null,
666
+ "scroll": true,
667
+ "showHeader": true,
668
+ "sort": {
669
+ "col": 3,
670
+ "desc": true
671
+ },
672
+ "styles": [
673
+ {
674
+ "alias": "Time",
675
+ "align": "auto",
676
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
677
+ "pattern": "Time",
678
+ "type": "date"
679
+ },
680
+ {
681
+ "alias": "Reqest",
682
+ "align": "auto",
683
+ "colorMode": null,
684
+ "colors": [
685
+ "rgba(245, 54, 54, 0.9)",
686
+ "rgba(237, 129, 40, 0.89)",
687
+ "rgba(50, 172, 45, 0.97)"
688
+ ],
689
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
690
+ "decimals": 2,
691
+ "link": true,
692
+ "linkTargetBlank": true,
693
+ "linkTooltip": "Show details of this request",
694
+ "linkUrl": "/d/influxdb-rails-request/ruby-on-rails-performance-per-request?orgId=1&var-request_id=${__cell}&from=${__cell_2}&to=${__cell_0}&var-method=${__cell_1}",
695
+ "mappingType": 1,
696
+ "pattern": "request_id",
697
+ "thresholds": [],
698
+ "type": "string",
699
+ "unit": "short"
700
+ },
701
+ {
702
+ "alias": "Response time",
703
+ "align": "auto",
704
+ "colorMode": null,
705
+ "colors": [
706
+ "rgba(245, 54, 54, 0.9)",
707
+ "rgba(237, 129, 40, 0.89)",
708
+ "rgba(50, 172, 45, 0.97)"
709
+ ],
710
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
711
+ "decimals": 2,
712
+ "mappingType": 1,
713
+ "pattern": "controller",
714
+ "thresholds": [],
715
+ "type": "number",
716
+ "unit": "ms"
717
+ },
718
+ {
719
+ "alias": "Time",
720
+ "align": "auto",
721
+ "colorMode": null,
722
+ "colors": [
723
+ "rgba(245, 54, 54, 0.9)",
724
+ "rgba(237, 129, 40, 0.89)",
725
+ "rgba(50, 172, 45, 0.97)"
726
+ ],
727
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
728
+ "decimals": 2,
729
+ "mappingType": 1,
730
+ "pattern": "started",
731
+ "thresholds": [],
732
+ "type": "hidden",
733
+ "unit": "short"
734
+ },
735
+ {
736
+ "alias": "",
737
+ "align": "auto",
738
+ "colorMode": null,
739
+ "colors": [
740
+ "rgba(245, 54, 54, 0.9)",
741
+ "rgba(237, 129, 40, 0.89)",
742
+ "rgba(50, 172, 45, 0.97)"
743
+ ],
744
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
745
+ "decimals": 2,
746
+ "mappingType": 1,
747
+ "pattern": "method",
748
+ "thresholds": [],
749
+ "type": "hidden",
750
+ "unit": "short"
751
+ },
752
+ {
753
+ "alias": "",
754
+ "align": "auto",
755
+ "colorMode": null,
756
+ "colors": [
757
+ "rgba(245, 54, 54, 0.9)",
758
+ "rgba(237, 129, 40, 0.89)",
759
+ "rgba(50, 172, 45, 0.97)"
760
+ ],
761
+ "decimals": 2,
762
+ "pattern": "/.*/",
763
+ "thresholds": [],
764
+ "type": "number",
765
+ "unit": "short"
766
+ }
767
+ ],
768
+ "targets": [
769
+ {
770
+ "groupBy": [
771
+ {
772
+ "params": [
773
+ "method"
774
+ ],
775
+ "type": "tag"
776
+ }
777
+ ],
778
+ "limit": "50",
779
+ "measurement": "rails",
780
+ "orderByTime": "DESC",
781
+ "policy": "default",
782
+ "refId": "A",
783
+ "resultFormat": "table",
784
+ "select": [
785
+ [
786
+ {
787
+ "params": [
788
+ "started"
789
+ ],
790
+ "type": "field"
791
+ }
792
+ ],
793
+ [
794
+ {
795
+ "params": [
796
+ "controller"
797
+ ],
798
+ "type": "field"
799
+ }
800
+ ],
801
+ [
802
+ {
803
+ "params": [
804
+ "request_id"
805
+ ],
806
+ "type": "field"
807
+ }
808
+ ]
809
+ ],
810
+ "tags": [
811
+ {
812
+ "key": "method",
813
+ "operator": "=~",
814
+ "value": "/^$Action$/"
815
+ },
816
+ {
817
+ "condition": "AND",
818
+ "key": "hook",
819
+ "operator": "=",
820
+ "value": "process_action"
821
+ }
822
+ ]
823
+ }
824
+ ],
825
+ "title": "Last requests",
826
+ "transform": "table",
827
+ "type": "table-old"
828
+ },
829
+ {
830
+ "columns": [],
831
+ "datasource": "InfluxDB",
832
+ "fieldConfig": {
833
+ "defaults": {
834
+ "custom": {}
835
+ },
836
+ "overrides": []
837
+ },
838
+ "fontSize": "100%",
839
+ "gridPos": {
840
+ "h": 15,
841
+ "w": 13,
842
+ "x": 0,
843
+ "y": 11
844
+ },
845
+ "id": 2,
846
+ "links": [],
847
+ "pageSize": null,
848
+ "scroll": true,
849
+ "showHeader": true,
850
+ "sort": {
851
+ "col": 5,
852
+ "desc": true
853
+ },
854
+ "styles": [
855
+ {
856
+ "alias": "Time",
857
+ "align": "auto",
858
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
859
+ "pattern": "Time",
860
+ "type": "hidden"
861
+ },
862
+ {
863
+ "alias": "Partial",
864
+ "align": "auto",
865
+ "colorMode": null,
866
+ "colors": [
867
+ "rgba(245, 54, 54, 0.9)",
868
+ "rgba(237, 129, 40, 0.89)",
869
+ "rgba(50, 172, 45, 0.97)"
870
+ ],
871
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
872
+ "decimals": 2,
873
+ "mappingType": 1,
874
+ "pattern": "filename",
875
+ "sanitize": false,
876
+ "thresholds": [],
877
+ "type": "string",
878
+ "unit": "short"
879
+ },
880
+ {
881
+ "alias": "Count",
882
+ "align": "auto",
883
+ "colorMode": null,
884
+ "colors": [
885
+ "rgba(245, 54, 54, 0.9)",
886
+ "rgba(237, 129, 40, 0.89)",
887
+ "rgba(50, 172, 45, 0.97)"
888
+ ],
889
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
890
+ "decimals": 0,
891
+ "mappingType": 1,
892
+ "pattern": "count",
893
+ "thresholds": [],
894
+ "type": "number",
895
+ "unit": "short"
896
+ },
897
+ {
898
+ "alias": "Mean",
899
+ "align": "auto",
900
+ "colorMode": null,
901
+ "colors": [
902
+ "rgba(245, 54, 54, 0.9)",
903
+ "rgba(237, 129, 40, 0.89)",
904
+ "rgba(50, 172, 45, 0.97)"
905
+ ],
906
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
907
+ "decimals": 2,
908
+ "mappingType": 1,
909
+ "pattern": "mean",
910
+ "thresholds": [],
911
+ "type": "number",
912
+ "unit": "ms"
913
+ },
914
+ {
915
+ "alias": "Median",
916
+ "align": "auto",
917
+ "colorMode": null,
918
+ "colors": [
919
+ "rgba(245, 54, 54, 0.9)",
920
+ "rgba(237, 129, 40, 0.89)",
921
+ "rgba(50, 172, 45, 0.97)"
922
+ ],
923
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
924
+ "decimals": 2,
925
+ "mappingType": 1,
926
+ "pattern": "median",
927
+ "thresholds": [],
928
+ "type": "number",
929
+ "unit": "ms"
930
+ },
931
+ {
932
+ "alias": "Max",
933
+ "align": "auto",
934
+ "colorMode": null,
935
+ "colors": [
936
+ "rgba(245, 54, 54, 0.9)",
937
+ "rgba(237, 129, 40, 0.89)",
938
+ "rgba(50, 172, 45, 0.97)"
939
+ ],
940
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
941
+ "decimals": 2,
942
+ "mappingType": 1,
943
+ "pattern": "max",
944
+ "thresholds": [],
945
+ "type": "number",
946
+ "unit": "ms"
947
+ },
948
+ {
949
+ "alias": "",
950
+ "align": "auto",
951
+ "colorMode": null,
952
+ "colors": [
953
+ "rgba(245, 54, 54, 0.9)",
954
+ "rgba(237, 129, 40, 0.89)",
955
+ "rgba(50, 172, 45, 0.97)"
956
+ ],
957
+ "decimals": 2,
958
+ "pattern": "/.*/",
959
+ "thresholds": [],
960
+ "type": "number",
961
+ "unit": "short"
962
+ }
963
+ ],
964
+ "targets": [
965
+ {
966
+ "groupBy": [
967
+ {
968
+ "params": [
969
+ "filename"
970
+ ],
971
+ "type": "tag"
972
+ }
973
+ ],
974
+ "measurement": "rails",
975
+ "orderByTime": "ASC",
976
+ "policy": "default",
977
+ "refId": "A",
978
+ "resultFormat": "table",
979
+ "select": [
980
+ [
981
+ {
982
+ "params": [
983
+ "value"
984
+ ],
985
+ "type": "field"
986
+ },
987
+ {
988
+ "params": [],
989
+ "type": "count"
990
+ }
991
+ ],
992
+ [
993
+ {
994
+ "params": [
995
+ "value"
996
+ ],
997
+ "type": "field"
998
+ },
999
+ {
1000
+ "params": [],
1001
+ "type": "mean"
1002
+ }
1003
+ ],
1004
+ [
1005
+ {
1006
+ "params": [
1007
+ "value"
1008
+ ],
1009
+ "type": "field"
1010
+ },
1011
+ {
1012
+ "params": [],
1013
+ "type": "median"
1014
+ }
1015
+ ],
1016
+ [
1017
+ {
1018
+ "params": [
1019
+ "value"
1020
+ ],
1021
+ "type": "field"
1022
+ },
1023
+ {
1024
+ "params": [],
1025
+ "type": "max"
1026
+ }
1027
+ ]
1028
+ ],
1029
+ "tags": [
1030
+ {
1031
+ "key": "location",
1032
+ "operator": "=~",
1033
+ "value": "/^$Action$/"
1034
+ },
1035
+ {
1036
+ "condition": "AND",
1037
+ "key": "hook",
1038
+ "operator": "=",
1039
+ "value": "render_template"
1040
+ }
1041
+ ]
1042
+ }
1043
+ ],
1044
+ "title": "Partials",
1045
+ "transform": "table",
1046
+ "type": "table-old"
1047
+ },
1048
+ {
1049
+ "columns": [],
1050
+ "datasource": "InfluxDB",
1051
+ "fieldConfig": {
1052
+ "defaults": {
1053
+ "custom": {}
1054
+ },
1055
+ "overrides": []
1056
+ },
1057
+ "fontSize": "100%",
1058
+ "gridPos": {
1059
+ "h": 15,
1060
+ "w": 11,
1061
+ "x": 13,
1062
+ "y": 11
1063
+ },
1064
+ "id": 4,
1065
+ "links": [],
1066
+ "pageSize": null,
1067
+ "scroll": true,
1068
+ "showHeader": true,
1069
+ "sort": {
1070
+ "col": 5,
1071
+ "desc": true
1072
+ },
1073
+ "styles": [
1074
+ {
1075
+ "$$hashKey": "object:171",
1076
+ "alias": "Time",
1077
+ "align": "auto",
1078
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1079
+ "pattern": "Time",
1080
+ "type": "hidden"
1081
+ },
1082
+ {
1083
+ "$$hashKey": "object:173",
1084
+ "alias": "Count",
1085
+ "align": "auto",
1086
+ "colorMode": null,
1087
+ "colors": [
1088
+ "rgba(245, 54, 54, 0.9)",
1089
+ "rgba(237, 129, 40, 0.89)",
1090
+ "rgba(50, 172, 45, 0.97)"
1091
+ ],
1092
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1093
+ "decimals": 0,
1094
+ "mappingType": 1,
1095
+ "pattern": "count",
1096
+ "thresholds": [],
1097
+ "type": "number",
1098
+ "unit": "short"
1099
+ },
1100
+ {
1101
+ "$$hashKey": "object:174",
1102
+ "alias": "Mean",
1103
+ "align": "auto",
1104
+ "colorMode": null,
1105
+ "colors": [
1106
+ "rgba(245, 54, 54, 0.9)",
1107
+ "rgba(237, 129, 40, 0.89)",
1108
+ "rgba(50, 172, 45, 0.97)"
1109
+ ],
1110
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1111
+ "decimals": 2,
1112
+ "mappingType": 1,
1113
+ "pattern": "mean",
1114
+ "thresholds": [],
1115
+ "type": "number",
1116
+ "unit": "ms"
1117
+ },
1118
+ {
1119
+ "$$hashKey": "object:175",
1120
+ "alias": "Median",
1121
+ "align": "auto",
1122
+ "colorMode": null,
1123
+ "colors": [
1124
+ "rgba(245, 54, 54, 0.9)",
1125
+ "rgba(237, 129, 40, 0.89)",
1126
+ "rgba(50, 172, 45, 0.97)"
1127
+ ],
1128
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1129
+ "decimals": 2,
1130
+ "mappingType": 1,
1131
+ "pattern": "median",
1132
+ "thresholds": [],
1133
+ "type": "number",
1134
+ "unit": "ms"
1135
+ },
1136
+ {
1137
+ "$$hashKey": "object:176",
1138
+ "alias": "Name",
1139
+ "align": "auto",
1140
+ "colorMode": null,
1141
+ "colors": [
1142
+ "rgba(245, 54, 54, 0.9)",
1143
+ "rgba(237, 129, 40, 0.89)",
1144
+ "rgba(50, 172, 45, 0.97)"
1145
+ ],
1146
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1147
+ "decimals": 2,
1148
+ "mappingType": 1,
1149
+ "pattern": "name",
1150
+ "thresholds": [],
1151
+ "type": "string",
1152
+ "unit": "short",
1153
+ "valueMaps": [
1154
+ {
1155
+ "$$hashKey": "object:299",
1156
+ "text": "Raw",
1157
+ "value": ""
1158
+ }
1159
+ ]
1160
+ },
1161
+ {
1162
+ "$$hashKey": "object:177",
1163
+ "alias": "Max",
1164
+ "align": "auto",
1165
+ "colorMode": null,
1166
+ "colors": [
1167
+ "rgba(245, 54, 54, 0.9)",
1168
+ "rgba(237, 129, 40, 0.89)",
1169
+ "rgba(50, 172, 45, 0.97)"
1170
+ ],
1171
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1172
+ "decimals": 2,
1173
+ "mappingType": 1,
1174
+ "pattern": "max",
1175
+ "thresholds": [],
1176
+ "type": "number",
1177
+ "unit": "ms"
1178
+ }
1179
+ ],
1180
+ "targets": [
1181
+ {
1182
+ "groupBy": [
1183
+ {
1184
+ "params": [
1185
+ "name"
1186
+ ],
1187
+ "type": "tag"
1188
+ }
1189
+ ],
1190
+ "measurement": "rails",
1191
+ "orderByTime": "ASC",
1192
+ "policy": "default",
1193
+ "refId": "A",
1194
+ "resultFormat": "table",
1195
+ "select": [
1196
+ [
1197
+ {
1198
+ "params": [
1199
+ "value"
1200
+ ],
1201
+ "type": "field"
1202
+ },
1203
+ {
1204
+ "params": [],
1205
+ "type": "count"
1206
+ }
1207
+ ],
1208
+ [
1209
+ {
1210
+ "params": [
1211
+ "value"
1212
+ ],
1213
+ "type": "field"
1214
+ },
1215
+ {
1216
+ "params": [],
1217
+ "type": "mean"
1218
+ }
1219
+ ],
1220
+ [
1221
+ {
1222
+ "params": [
1223
+ "value"
1224
+ ],
1225
+ "type": "field"
1226
+ },
1227
+ {
1228
+ "params": [],
1229
+ "type": "median"
1230
+ }
1231
+ ],
1232
+ [
1233
+ {
1234
+ "params": [
1235
+ "value"
1236
+ ],
1237
+ "type": "field"
1238
+ },
1239
+ {
1240
+ "params": [],
1241
+ "type": "max"
1242
+ }
1243
+ ]
1244
+ ],
1245
+ "tags": [
1246
+ {
1247
+ "key": "location",
1248
+ "operator": "=~",
1249
+ "value": "/^$Action$/"
1250
+ },
1251
+ {
1252
+ "condition": "AND",
1253
+ "key": "hook",
1254
+ "operator": "=",
1255
+ "value": "sql"
1256
+ }
1257
+ ]
1258
+ }
1259
+ ],
1260
+ "title": "SQL",
1261
+ "transform": "table",
1262
+ "type": "table-old"
1263
+ }
1264
+ ],
1265
+ "refresh": false,
1266
+ "schemaVersion": 26,
1267
+ "style": "dark",
1268
+ "tags": [
1269
+ "Performance",
1270
+ "Ruby on Rails"
1271
+ ],
1272
+ "templating": {
1273
+ "list": [
1274
+ {
1275
+ "allValue": null,
1276
+ "current": {},
1277
+ "datasource": "InfluxDB",
1278
+ "definition": "",
1279
+ "hide": 0,
1280
+ "includeAll": false,
1281
+ "label": null,
1282
+ "multi": true,
1283
+ "name": "Action",
1284
+ "options": [],
1285
+ "query": "show tag values from \"rails\" with key = \"method\";",
1286
+ "refresh": 1,
1287
+ "regex": "",
1288
+ "skipUrlSync": false,
1289
+ "sort": 0,
1290
+ "tagValuesQuery": "",
1291
+ "tags": [],
1292
+ "tagsQuery": "",
1293
+ "type": "query",
1294
+ "useTags": false
1295
+ }
1296
+ ]
1297
+ },
1298
+ "time": {
1299
+ "from": "now-1h",
1300
+ "to": "now"
1301
+ },
1302
+ "timepicker": {
1303
+ "refresh_intervals": [
1304
+ "10s",
1305
+ "30s",
1306
+ "1m",
1307
+ "5m",
1308
+ "15m",
1309
+ "30m",
1310
+ "1h",
1311
+ "2h",
1312
+ "1d"
1313
+ ],
1314
+ "time_options": [
1315
+ "5m",
1316
+ "15m",
1317
+ "1h",
1318
+ "6h",
1319
+ "12h",
1320
+ "24h",
1321
+ "2d",
1322
+ "7d",
1323
+ "30d"
1324
+ ]
1325
+ },
1326
+ "timezone": "",
1327
+ "title": "Performance (per Action)",
1328
+ "uid": "influxdb-rails-action",
1329
+ "version": 10
1330
+ }