influxdb-rails 1.0.1.beta3 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/spec.yml +2 -1
  3. data/CHANGELOG.md +10 -1
  4. data/README.md +40 -30
  5. data/influxdb-rails.gemspec +1 -1
  6. data/lib/influxdb/rails/tags.rb +1 -1
  7. data/lib/influxdb/rails/values.rb +1 -1
  8. data/lib/influxdb/rails/version.rb +1 -1
  9. data/sample-dashboard/Dockerfile +2 -2
  10. data/sample-dashboard/README.md +21 -28
  11. data/sample-dashboard/Rakefile +8 -3
  12. data/sample-dashboard/Ruby On Rails ActiveJob.json +600 -0
  13. data/sample-dashboard/{Ruby On Rails Performance (per Action).json → Ruby On Rails Performance per Action.json } +343 -589
  14. data/sample-dashboard/{Ruby On Rails Performance (per Request).json → Ruby On Rails Performance per Request.json } +361 -211
  15. data/sample-dashboard/Ruby On Rails Performance.json +1347 -1139
  16. data/sample-dashboard/Ruby On Rails Requests.json +834 -0
  17. data/sample-dashboard/Ruby On Rails Slowlog by Action.json +278 -0
  18. data/sample-dashboard/Ruby On Rails Slowlog by Request.json +277 -0
  19. data/sample-dashboard/Ruby On Rails Slowlog by SQL.json +328 -0
  20. data/sample-dashboard/docker-compose.yml +6 -1
  21. data/sample-dashboard/provisioning/activejob.json +600 -0
  22. data/sample-dashboard/provisioning/performance-action.json +334 -580
  23. data/sample-dashboard/provisioning/performance-request.json +355 -205
  24. data/sample-dashboard/provisioning/performance.json +1336 -1128
  25. data/sample-dashboard/provisioning/requests.json +834 -0
  26. data/sample-dashboard/provisioning/slowlog-action.json +278 -0
  27. data/sample-dashboard/provisioning/slowlog-requests.json +277 -0
  28. data/sample-dashboard/provisioning/slowlog-sql.json +328 -0
  29. metadata +18 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fe64b1f95e624972f8ef34c23e3d3f3b9312d33bbdd8480c1ba630449edcc03
4
- data.tar.gz: 95efa62efbc63f9d480cf896c8b6b37d32aebd27e9ca874fcb5d9542cdcf6de0
3
+ metadata.gz: 8e3add8b49d3fbf1997dc07754f80def0d41912c63547089ecba0b2d3eb1e7d5
4
+ data.tar.gz: 20b896a9146f74b8dfd2ea3ee5b5e8461a41efbf189304b5e2c98a1c9a02458d
5
5
  SHA512:
6
- metadata.gz: 9d730e69f948734211948092f47f2d089cde0a117e8cf50a4abd6de0a76f382f16f7e7da565547a5e6daf3740aa806ba2376f2dfe8145c4d61749639bdc095e7
7
- data.tar.gz: 25e4085b54c19d22e6fa06bc09f52243fe1d4cc932de513deebafe922b6c415eed2a0250d120a663bdd5621401669a9eba922178e2136b519d2c98124e7fe63a
6
+ metadata.gz: 97433217a36b42704ceed5fb5656f2ffbf11dbd0d08bbd17a14972355ba6fe63ed1c4382d789f0691c3496a95b5e4ff8e388399ce4876614c237add03ed27926
7
+ data.tar.gz: b8f0b71d8ba29926e7924489b69b4a199c24a821bc2f0268b804714f44c946aecc3fcf3115305ddab23eccd092efdebb6f77c3d71616d7de8b8226288d7c2832
@@ -11,10 +11,11 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby: [ '2.5', '2.6', '2.7', 'head' ]
14
+ ruby: [ '2.5', '2.6', '2.7', '3.0', 'head' ]
15
15
  rails: [ 'gemfiles/Gemfile.rails-6.1.x', 'gemfiles/Gemfile.rails-6.0.x', 'gemfiles/Gemfile.rails-5.2.x']
16
16
  exclude:
17
17
  - { ruby: '2.7', rails: 'gemfiles/Gemfile.rails-5.2.x' }
18
+ - { ruby: '3.0', rails: 'gemfiles/Gemfile.rails-5.2.x' }
18
19
  - { ruby: 'head', rails: 'gemfiles/Gemfile.rails-5.2.x' }
19
20
  - { ruby: '2.5', rails: 'gemfiles/Gemfile.rails-6.0.x' }
20
21
  continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
data/CHANGELOG.md CHANGED
@@ -2,16 +2,23 @@
2
2
 
3
3
  For the full commit log, [see here](https://github.com/influxdata/influxdb-rails/commits/master).
4
4
 
5
- ## v1.0.1.beta3, release 2020-10-16
5
+ ## v1.0.1, released 2021-03-23
6
+
7
+ The final release, no code changes.
8
+
9
+ ## v1.0.1.beta3, released 2020-10-16
10
+
6
11
  - Drop `perform_start.active_job` subscriber, it's rather useless on dashboards.
7
12
 
8
13
  ## v1.0.1.beta2, released 2020-09-14
14
+
9
15
  - Implement [`deliver.action_mailer`](https://guides.rubyonrails.org/active_support_instrumentation.html#deliver-action-mailer) subscriber
10
16
  - Add missing Active Job documentation
11
17
  - Drop support for Ruby 2.4
12
18
  - Drop support for Rails < 5.2
13
19
 
14
20
  ## v1.0.1.beta1, released 2020-08-21
21
+
15
22
  - Drop support for Ruby 2.3
16
23
  - Drop support for Rails 4.x
17
24
  - Add `auth_method` to client configuration (#96, @anlek)
@@ -26,9 +33,11 @@ For the full commit log, [see here](https://github.com/influxdata/influxdb-rails
26
33
  - Record unhandled exceptions as tags for process_action.action_controller
27
34
 
28
35
  ## v1.0.0, released 2019-10-23
36
+
29
37
  The Final release, no code changes.
30
38
 
31
39
  ## v1.0.0.beta5, unreleased
40
+
32
41
  - Silently eat all dropped configuration options and do not crash
33
42
  - Add per action view to the sample dashboard
34
43
 
data/README.md CHANGED
@@ -1,16 +1,14 @@
1
1
  > :warning: You are looking at the README for the master branch of this gem.
2
- > See the latest [released version (1.0.0)](https://github.com/influxdata/influxdb-rails/tree/v1.0.0#readme)
2
+ > See the latest [released version (1.0.1)](https://github.com/influxdata/influxdb-rails/tree/v1.0.1#readme)
3
3
  > instead.
4
4
 
5
5
  # influxdb-rails
6
6
 
7
7
  [![Gem Version](https://badge.fury.io/rb/influxdb-rails.svg)](https://badge.fury.io/rb/influxdb-rails)
8
- [![Build Status](https://travis-ci.org/influxdata/influxdb-rails.svg?branch=master)](https://travis-ci.org/influxdata/influxdb-rails)
8
+ [![Build Status](https://github.com/influxdata/influxdb-rails/actions/workflows/spec.yml/badge.svg)](https://github.com/influxdata/influxdb-rails/actions)
9
9
 
10
- Automatically instrument your Ruby on Rails applications and write the
11
- metrics directly into [InfluxDB](http://influxdb.org/).
12
-
13
- This gem is designed for Rails 4.2+, Ruby 2.3+ and InfluxDB 0.9+.
10
+ Automatically instrument your Ruby on Rails applications and write the metrics directly into
11
+ [InfluxDB](https://www.influxdata.com/).
14
12
 
15
13
  ## Table of contents
16
14
 
@@ -41,8 +39,8 @@ configuration of this gem.
41
39
 
42
40
  ## Usage
43
41
 
44
- Out of the box, you'll automatically get reporting for sql, model, view and
45
- controller Rails instrumentation for every request.
42
+ Out of the box, you'll automatically get reporting for the Ruby on Rails components mentioned
43
+ below.
46
44
 
47
45
  ### Action Controller
48
46
 
@@ -55,9 +53,9 @@ Reported values:
55
53
 
56
54
  ```ruby
57
55
  controller: 48.467,
58
- view: 46.848
56
+ view: 46.848,
59
57
  db: 0.157,
60
- started: 1465839830100400200
58
+ started: 1465839830100400200,
61
59
  request_id: "d5bf620b-3494-425b-b7e1-4953597ea744"
62
60
  ```
63
61
 
@@ -71,14 +69,12 @@ Reported tags:
71
69
  method: "PostsController#index",
72
70
  http_method: "GET",
73
71
  format: "html",
74
- status: ["200", ""]
75
- exception: ["", "ArgumentError"]
72
+ status: ["200", ""],
73
+ exception: "ArgumentError"
76
74
  }
77
75
  ```
78
76
 
79
- *Note*: If an exception happens during that particular instrumentation the
80
- `status` will be blank and the tag `exception` will contain the name of the
81
- exception class.
77
+ *Note*: If an exception happens during that particular action the `status` will be blank and the tag `exception` will contain the name of the exception class. The status is blank because we can't know how you handle the exception outside the action.
82
78
 
83
79
  ### Action View
84
80
 
@@ -100,11 +96,11 @@ Reported values:
100
96
  Reported tags:
101
97
 
102
98
  ```ruby
103
- hook: ["render_template", "render_partial", "render_collection"]
99
+ hook: ["render_template", "render_partial", "render_collection"],
104
100
  server: Socket.gethostname,
105
101
  app_name: configuration.application_name,
106
102
  location: "PostsController#index",
107
- filename: "/some/file/action.html",
103
+ filename: "/some/file/action.html"
108
104
  ```
109
105
 
110
106
  ### Active Record
@@ -112,15 +108,16 @@ Reported tags:
112
108
  Reported ActiveSupport instrumentation hooks:
113
109
 
114
110
  - [sql.active\_record](https://guides.rubyonrails.org/active_support_instrumentation.html#sql-active-record)
111
+ - [instantiation.active\_record](https://guides.rubyonrails.org/active_support_instrumentation.html#instantiation-active-record)
115
112
 
116
- Reported values:
113
+ Reported SQL values:
117
114
 
118
115
  ```ruby
119
116
  sql: "SELECT \"posts\".* FROM \"posts\"",
120
117
  request_id: "d5bf620b-3494-425b-b7e1-4953597ea744"
121
118
  ```
122
119
 
123
- Reported tags:
120
+ Reported SQL tags:
124
121
 
125
122
  ```ruby
126
123
  hook: "sql",
@@ -132,6 +129,24 @@ Reported tags:
132
129
  name: "Post Load"
133
130
  ```
134
131
 
132
+ Reported instantiation values:
133
+
134
+ ```ruby
135
+ record_count: 1,
136
+ request_id: "d5bf620b-3494-425b-b7e1-4953597ea744"
137
+ value: 7.689
138
+ ```
139
+
140
+ Reported instantiation tags:
141
+
142
+ ```ruby
143
+ hook: "instantiation",
144
+ server: Socket.gethostname,
145
+ app_name: configuration.application_name,
146
+ location: "PostsController#index",
147
+ class_name: "POST"
148
+ ```
149
+
135
150
  ### Active Job
136
151
 
137
152
  Reported ActiveSupport instrumentation hooks:
@@ -189,9 +204,7 @@ InfluxDB::Rails.configure do |config|
189
204
  end
190
205
  ```
191
206
 
192
- You'll find *most* of the configuration settings in the initializer file. The
193
- canonical list of default values is located in `lib/influxdb/rails/configuration.rb`
194
- (`InfluxDB::Rails::Configuration::DEFAULTS`).
207
+ You'll find all of the configuration settings in the initializer file.
195
208
 
196
209
  ### Custom Tags
197
210
 
@@ -239,7 +252,7 @@ end
239
252
  Reported tags:
240
253
 
241
254
  ```ruby
242
- hook: "block_instrumentation"
255
+ hook: "block_instrumentation",
243
256
  server: Socket.gethostname,
244
257
  app_name: configuration.application_name,
245
258
  location: "PostsController#index",
@@ -248,7 +261,7 @@ Reported tags:
248
261
 
249
262
  Reported values:
250
263
  ```ruby
251
- value: 100 # execution time of the block
264
+ value: 100 # execution time of the block in ms
252
265
  ```
253
266
 
254
267
  You can also overwrite the `value`
@@ -331,7 +344,7 @@ might cause performance issues on traffic intensive applications. Disable it in
331
344
  the configuration if you are not willing to tolerate this.
332
345
 
333
346
  By default, this gem performs writes to InfluxDB asynchronously. A single
334
- hooks usually only performs some time delta calculations, and then enqueues
347
+ hook usually only performs some time delta calculations, and then enqueues
335
348
  the data point into a worker queue (which is processed by a background
336
349
  thread).
337
350
 
@@ -355,8 +368,7 @@ implications, depending on the value of `config.client.async`:
355
368
  cycle), it might block all available request threads
356
369
 
357
370
  In both cases, your application server might become unresponsive and needs
358
- to be restarted (which can happen automatically in `cgroups` contexts,
359
- like Docker containers).
371
+ to be restarted.
360
372
 
361
373
  If you setup a maximum retry value (`Integer === config.client.retry`),
362
374
  the client will try up to that amount of times to send the data to the server
@@ -387,13 +399,11 @@ The data points are simply discarded.
387
399
  rake test:all
388
400
  ```
389
401
 
390
- - or wait for [Travis][travis-pr] to pick up your changes, *after*
402
+ - or wait for [our CI](https://github.com/influxdata/influxdb-rails/actions) to pick up your changes, *after*
391
403
  you made a pull request.
392
404
  - Send a pull request.
393
405
  - If your changes are looking good, we'll merge them.
394
406
 
395
- [travis-pr]: https://travis-ci.org/influxdata/influxdb-rails/pull_requests
396
-
397
407
  ### Testing Tasks
398
408
 
399
409
  ```console
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
38
38
  spec.add_development_dependency "rdoc"
39
39
  spec.add_development_dependency "rspec"
40
40
  spec.add_development_dependency "rspec-rails", ">= 3.0.0"
41
- spec.add_development_dependency "rubocop", "~> 1.7.0"
41
+ spec.add_development_dependency "rubocop", "~> 1.9.0"
42
42
  spec.add_development_dependency "sqlite3"
43
43
  spec.add_development_dependency "tzinfo"
44
44
  end
@@ -9,7 +9,7 @@ module InfluxDB
9
9
 
10
10
  def to_h
11
11
  expanded_tags.reject do |_, value|
12
- value.nil? || value == ""
12
+ value.blank?
13
13
  end
14
14
  end
15
15
 
@@ -8,7 +8,7 @@ module InfluxDB
8
8
 
9
9
  def to_h
10
10
  expanded_values.reject do |_, value|
11
- value.nil? || value == ""
11
+ value.blank?
12
12
  end
13
13
  end
14
14
 
@@ -1,5 +1,5 @@
1
1
  module InfluxDB
2
2
  module Rails
3
- VERSION = "1.0.1.beta3".freeze
3
+ VERSION = "1.0.1".freeze
4
4
  end
5
5
  end
@@ -1,11 +1,11 @@
1
- FROM opensuse/leap:15.1
1
+ FROM opensuse/leap:15.2
2
2
 
3
3
  ENV NOKOGIRI_USE_SYSTEM_LIBRARIES 1
4
4
  RUN useradd -g users -p rails -d /home/rails -m rails
5
5
  RUN echo 'rails ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
6
6
 
7
7
  RUN zypper -n addrepo -f https://dl.yarnpkg.com/rpm/yarn.repo; zypper --gpg-auto-import-keys refresh
8
- RUN zypper -n install --no-recommends ruby2.5-devel nodejs10 make gcc timezone sudo pkg-config sqlite3-devel libxml2-devel libxslt-devel yarn git-core curl
8
+ RUN zypper -n install --no-recommends ruby2.5-devel nodejs10 make gcc-c++ timezone sudo pkg-config sqlite3-devel libxml2-devel libxslt-devel yarn git-core curl
9
9
  RUN zypper -n clean -a
10
10
  RUN gem install --no-format-executable --no-document rails -v '~> 6'
11
11
 
@@ -4,36 +4,42 @@ A dashboard providing Ruby on Rails performance insights based on
4
4
  [Free Software](https://www.fsf.org/about/what-is-free-software), ready to
5
5
  run inside your data-center.
6
6
 
7
- ![Screenshot of the dashboard](https://grafana.com/api/dashboards/10428/images/6557/image)
7
+ ![Screenshot of the dashboard](https://grafana.com/api/dashboards/10428/images/10103/image)
8
8
 
9
- By default it measures (in various forms):
9
+ By default it measures (in various forms) performance of:
10
10
 
11
- - Controller Action Runtime
12
- - View/Partial Render Runtime
13
- - Database Query Runtime
11
+ - Controller Actions
12
+ - View/Partial Rendering
13
+ - Database Queries
14
+ - ActiveJobs
15
+ - ActionMailers
14
16
 
15
- It provides an overview and you can also drill down into numbers on a per request basis. Of course you can use all the awesome features that Influx (Downsampling/Data Retention), Grafana (Alerts, Annotations) and influxdb-rails (custom tags) provide and extend this to your needs. Use your freedom and run, copy, distribute, study, change and improve this software!
17
+ The dashboards provide an overview and various ways to drill down into numbers on a per request or per action basis. Of course you can use all the awesome features that Influx (Downsampling/Data Retention), Grafana (Alerts, Annotations) and influxdb-rails (custom tags) provide and extend this to your needs. Use your freedom and run, copy, distribute, study, change and improve this software!
16
18
 
17
19
  ## Requirements
18
20
 
19
- To be able to measure performance you need the following things available:
21
+ To be able to measure performance of your Ruby on Rails application you need to have the following things available:
20
22
 
21
- - [InfluxDB 1.x](https://docs.influxdata.com/influxdb/v1.8/introduction/install/)
22
- - [Grafana](https://grafana.com/docs/)
23
+ - [InfluxDB 1.x](https://www.influxdata.com/products/influxdb/)
24
+ - [Grafana](https://grafana.com/)
23
25
  - A [Ruby On Rails](https://rubyonrails.org/) application with [influxdb-rails](https://github.com/influxdata/influxdb-rails) enabled
24
26
 
25
27
  ## Installation
26
28
 
27
- Once you have influx/grafana instances running in your infrastructure just [import both
28
- dashboards from grafana](https://grafana.com/docs/reference/export_import/#importing-a-dashboard).
29
+ Once you have influx/grafana instances running in your infrastructure just [import the
30
+ dashboards from grafana.com](https://grafana.com/docs/reference/export_import/#importing-a-dashboard).
29
31
 
30
- - [Overview Dashboard](https://grafana.com/dashboards/10428)
31
- - [Request Dashboard](https://grafana.com/dashboards/10429)
32
+ - [Ruby On Rails Performance Overview](https://grafana.com/dashboards/10428/)
33
+ - Performance insights into individual requests, see [Ruby On Rails Performance per Request](https://grafana.com/dashboards/10429/)
34
+ - Performance of individual actions, see [Ruby On Rails Performance per Action](https://grafana.com/grafana/dashboards/11031)
35
+ - [Ruby On Rails Health Overview](https://grafana.com/grafana/dashboards/14115)
36
+ - [Ruby on Rails ActiveJob Overview](https://grafana.com/grafana/dashboards/14116)
37
+ - [Ruby on Rails Slowlog by Request](https://grafana.com/grafana/dashboards/14118)
38
+ - [Ruby on Rails Slowlog by Action](https://grafana.com/grafana/dashboards/14117)
39
+ - [Ruby on Rails Slowlog by SQL](https://grafana.com/grafana/dashboards/14119)
32
40
 
33
41
  You can also paste the `.json` files from this repository.
34
42
 
35
- In the unlikely case that you need to change the dashboard *UID*s during import you can configure the *UID* the `Overview` dashboard uses to link to the `Request` dashboard in the [variables](https://grafana.com/docs/reference/templating/#adding-a-variable). Just paste whatever *UID* you've set up for the `Request` dashboard.
36
-
37
43
  ## Demo
38
44
 
39
45
  This repository includes a [docker-compose](https://docs.docker.com/compose/) demo setup that brings a simple rails app, influxdb and grafana.
@@ -54,19 +60,6 @@ Go to http://0.0.0.0:4000 and do some things. Every request to the rails app wil
54
60
 
55
61
  You can also use the dashboard with any other rails app you already have. Follow our [install instructions](https://github.com/influxdata/influxdb-rails/#installation), the default configuration works with the demo InfluxDB running on localhost:8086.
56
62
 
57
- To be able to view individual requests you have to enable request ID tags in your application. Something like:
58
-
59
- ```ruby
60
- class ApplicationController < ActionController::Base
61
-
62
- before_action :set_influx_data
63
-
64
- def set_influx_data
65
- InfluxDB::Rails.current.values = { request: request.request_id }
66
- end
67
- end
68
- ```
69
-
70
63
  ### ...then see the dashboards in action
71
64
 
72
65
  Just go to http://0.0.0.0:3000 and log in with admin/admin.
@@ -2,8 +2,13 @@ task default: %w[prepare]
2
2
 
3
3
  # rubocop:disable Layout/LineLength
4
4
  task :prepare do
5
- sh "cat 'Ruby On Rails Performance.json' | sed 's/${DS_INFLUXDB}/InfluxDB/g' > provisioning/performance.json"
6
- sh "cat 'Ruby On Rails Performance (per Request).json' | sed 's/${DS_INFLUXDB}/InfluxDB/g' > provisioning/performance-request.json"
7
- sh "cat 'Ruby On Rails Performance (per Action).json' | sed 's/${DS_INFLUXDB}/InfluxDB/g' > provisioning/performance-action.json"
5
+ sh "cat 'Ruby On Rails Performance.json' | sed 's/${DS_INFLUXDB-RAILS}/InfluxDB/g' > provisioning/performance.json"
6
+ sh "cat 'Ruby On Rails Performance per Request.json' | sed 's/${DS_INFLUXDB-RAILS}/InfluxDB/g' > provisioning/performance-request.json"
7
+ sh "cat 'Ruby On Rails Performance per Action.json' | sed 's/${DS_INFLUXDB-RAILS}/InfluxDB/g' > provisioning/performance-action.json"
8
+ sh "cat 'Ruby On Rails ActiveJob.json' | sed 's/${DS_INFLUXDB-RAILS}/InfluxDB/g' > provisioning/activejob.json"
9
+ sh "cat 'Ruby On Rails Requests.json' | sed 's/${DS_INFLUXDB-RAILS}/InfluxDB/g' > provisioning/requests.json"
10
+ sh "cat 'Ruby On Rails Slowlog by Action.json' | sed 's/${DS_INFLUXDB-RAILS}/InfluxDB/g' > provisioning/slowlog-action.json"
11
+ sh "cat 'Ruby On Rails Slowlog by Request.json' | sed 's/${DS_INFLUXDB-RAILS}/InfluxDB/g' > provisioning/slowlog-requests.json"
12
+ sh "cat 'Ruby On Rails Slowlog by SQL.json' | sed 's/${DS_INFLUXDB-RAILS}/InfluxDB/g' > provisioning/slowlog-sql.json"
8
13
  end
9
14
  # rubocop:enable Layout/LineLength
@@ -0,0 +1,600 @@
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
+ "annotations": {
33
+ "list": [
34
+ {
35
+ "builtIn": 1,
36
+ "datasource": "-- Grafana --",
37
+ "enable": true,
38
+ "hide": true,
39
+ "iconColor": "rgba(0, 211, 255, 1)",
40
+ "name": "Annotations & Alerts",
41
+ "type": "dashboard"
42
+ }
43
+ ]
44
+ },
45
+ "editable": true,
46
+ "gnetId": null,
47
+ "graphTooltip": 0,
48
+ "id": null,
49
+ "iteration": 1616428804223,
50
+ "links": [
51
+ {
52
+ "icon": "external link",
53
+ "includeVars": true,
54
+ "keepTime": true,
55
+ "tags": [
56
+ "influxdb-rails"
57
+ ],
58
+ "type": "dashboards"
59
+ }
60
+ ],
61
+ "panels": [
62
+ {
63
+ "aliasColors": {},
64
+ "bars": false,
65
+ "cacheTimeout": null,
66
+ "dashLength": 10,
67
+ "dashes": false,
68
+ "datasource": "${DS_INFLUXDB-RAILS}",
69
+ "decimals": 1,
70
+ "description": "Number of jobs per queue",
71
+ "fieldConfig": {
72
+ "defaults": {
73
+ "custom": {},
74
+ "links": []
75
+ },
76
+ "overrides": []
77
+ },
78
+ "fill": 3,
79
+ "fillGradient": 0,
80
+ "gridPos": {
81
+ "h": 7,
82
+ "w": 24,
83
+ "x": 0,
84
+ "y": 0
85
+ },
86
+ "hiddenSeries": false,
87
+ "hideTimeOverride": false,
88
+ "id": 2,
89
+ "legend": {
90
+ "alignAsTable": true,
91
+ "avg": false,
92
+ "current": false,
93
+ "hideEmpty": false,
94
+ "hideZero": false,
95
+ "max": false,
96
+ "min": false,
97
+ "rightSide": true,
98
+ "show": true,
99
+ "sideWidth": 250,
100
+ "total": false,
101
+ "values": false
102
+ },
103
+ "lines": true,
104
+ "linewidth": 1,
105
+ "links": [],
106
+ "nullPointMode": "null as zero",
107
+ "paceLength": 10,
108
+ "percentage": false,
109
+ "pluginVersion": "7.1.1",
110
+ "pointradius": 0.5,
111
+ "points": false,
112
+ "renderer": "flot",
113
+ "seriesOverrides": [],
114
+ "spaceLength": 10,
115
+ "stack": true,
116
+ "steppedLine": false,
117
+ "targets": [
118
+ {
119
+ "alias": "$tag_queue",
120
+ "groupBy": [
121
+ {
122
+ "params": [
123
+ "$per"
124
+ ],
125
+ "type": "time"
126
+ },
127
+ {
128
+ "params": [
129
+ "queue"
130
+ ],
131
+ "type": "tag"
132
+ },
133
+ {
134
+ "params": [
135
+ "null"
136
+ ],
137
+ "type": "fill"
138
+ }
139
+ ],
140
+ "measurement": "rails",
141
+ "orderByTime": "ASC",
142
+ "policy": "default",
143
+ "refId": "A",
144
+ "resultFormat": "time_series",
145
+ "select": [
146
+ [
147
+ {
148
+ "params": [
149
+ "value"
150
+ ],
151
+ "type": "field"
152
+ },
153
+ {
154
+ "params": [],
155
+ "type": "count"
156
+ }
157
+ ]
158
+ ],
159
+ "tags": [
160
+ {
161
+ "key": "hook",
162
+ "operator": "=",
163
+ "value": "enqueue"
164
+ }
165
+ ]
166
+ }
167
+ ],
168
+ "thresholds": [],
169
+ "timeFrom": null,
170
+ "timeRegions": [],
171
+ "timeShift": null,
172
+ "title": "by Queues",
173
+ "tooltip": {
174
+ "shared": true,
175
+ "sort": 0,
176
+ "value_type": "individual"
177
+ },
178
+ "type": "graph",
179
+ "xaxis": {
180
+ "buckets": null,
181
+ "mode": "time",
182
+ "name": null,
183
+ "show": true,
184
+ "values": []
185
+ },
186
+ "yaxes": [
187
+ {
188
+ "format": "short",
189
+ "label": "jobs",
190
+ "logBase": 1,
191
+ "max": null,
192
+ "min": null,
193
+ "show": true
194
+ },
195
+ {
196
+ "format": "short",
197
+ "label": null,
198
+ "logBase": 1,
199
+ "max": null,
200
+ "min": null,
201
+ "show": false
202
+ }
203
+ ],
204
+ "yaxis": {
205
+ "align": false,
206
+ "alignLevel": null
207
+ }
208
+ },
209
+ {
210
+ "aliasColors": {},
211
+ "bars": false,
212
+ "dashLength": 10,
213
+ "dashes": false,
214
+ "datasource": "${DS_INFLUXDB-RAILS}",
215
+ "description": "Number of jobs per class",
216
+ "fieldConfig": {
217
+ "defaults": {
218
+ "custom": {},
219
+ "links": []
220
+ },
221
+ "overrides": []
222
+ },
223
+ "fill": 1,
224
+ "fillGradient": 0,
225
+ "gridPos": {
226
+ "h": 8,
227
+ "w": 24,
228
+ "x": 0,
229
+ "y": 7
230
+ },
231
+ "hiddenSeries": false,
232
+ "id": 4,
233
+ "legend": {
234
+ "alignAsTable": true,
235
+ "avg": false,
236
+ "current": false,
237
+ "max": false,
238
+ "min": false,
239
+ "rightSide": true,
240
+ "show": true,
241
+ "sideWidth": 250,
242
+ "total": false,
243
+ "values": false
244
+ },
245
+ "lines": true,
246
+ "linewidth": 1,
247
+ "links": [],
248
+ "nullPointMode": "null as zero",
249
+ "paceLength": 10,
250
+ "percentage": false,
251
+ "pluginVersion": "7.1.1",
252
+ "pointradius": 2,
253
+ "points": false,
254
+ "renderer": "flot",
255
+ "seriesOverrides": [],
256
+ "spaceLength": 10,
257
+ "stack": false,
258
+ "steppedLine": false,
259
+ "targets": [
260
+ {
261
+ "alias": "$tag_job",
262
+ "groupBy": [
263
+ {
264
+ "params": [
265
+ "$per"
266
+ ],
267
+ "type": "time"
268
+ },
269
+ {
270
+ "params": [
271
+ "job"
272
+ ],
273
+ "type": "tag"
274
+ },
275
+ {
276
+ "params": [
277
+ "null"
278
+ ],
279
+ "type": "fill"
280
+ }
281
+ ],
282
+ "measurement": "rails",
283
+ "orderByTime": "ASC",
284
+ "policy": "default",
285
+ "refId": "A",
286
+ "resultFormat": "time_series",
287
+ "select": [
288
+ [
289
+ {
290
+ "params": [
291
+ "value"
292
+ ],
293
+ "type": "field"
294
+ },
295
+ {
296
+ "params": [],
297
+ "type": "count"
298
+ }
299
+ ]
300
+ ],
301
+ "tags": [
302
+ {
303
+ "key": "hook",
304
+ "operator": "=",
305
+ "value": "perform_start"
306
+ }
307
+ ]
308
+ }
309
+ ],
310
+ "thresholds": [],
311
+ "timeFrom": null,
312
+ "timeRegions": [],
313
+ "timeShift": null,
314
+ "title": "by Classes",
315
+ "tooltip": {
316
+ "shared": true,
317
+ "sort": 0,
318
+ "value_type": "individual"
319
+ },
320
+ "type": "graph",
321
+ "xaxis": {
322
+ "buckets": null,
323
+ "mode": "time",
324
+ "name": null,
325
+ "show": true,
326
+ "values": []
327
+ },
328
+ "yaxes": [
329
+ {
330
+ "format": "short",
331
+ "label": null,
332
+ "logBase": 1,
333
+ "max": null,
334
+ "min": null,
335
+ "show": true
336
+ },
337
+ {
338
+ "format": "short",
339
+ "label": null,
340
+ "logBase": 1,
341
+ "max": null,
342
+ "min": null,
343
+ "show": false
344
+ }
345
+ ],
346
+ "yaxis": {
347
+ "align": false,
348
+ "alignLevel": null
349
+ }
350
+ },
351
+ {
352
+ "aliasColors": {},
353
+ "bars": true,
354
+ "dashLength": 10,
355
+ "dashes": false,
356
+ "datasource": "${DS_INFLUXDB-RAILS}",
357
+ "description": "Performance of jobs by class",
358
+ "fieldConfig": {
359
+ "defaults": {
360
+ "custom": {},
361
+ "links": [],
362
+ "unit": "ms"
363
+ },
364
+ "overrides": []
365
+ },
366
+ "fill": 0,
367
+ "fillGradient": 0,
368
+ "gridPos": {
369
+ "h": 7,
370
+ "w": 24,
371
+ "x": 0,
372
+ "y": 15
373
+ },
374
+ "hiddenSeries": false,
375
+ "id": 5,
376
+ "legend": {
377
+ "alignAsTable": true,
378
+ "avg": false,
379
+ "current": false,
380
+ "max": false,
381
+ "min": false,
382
+ "rightSide": true,
383
+ "show": true,
384
+ "sideWidth": 250,
385
+ "total": false,
386
+ "values": false
387
+ },
388
+ "lines": false,
389
+ "linewidth": 1,
390
+ "links": [],
391
+ "nullPointMode": "null",
392
+ "paceLength": 10,
393
+ "percentage": false,
394
+ "pluginVersion": "7.1.1",
395
+ "pointradius": 2,
396
+ "points": true,
397
+ "renderer": "flot",
398
+ "seriesOverrides": [],
399
+ "spaceLength": 10,
400
+ "stack": false,
401
+ "steppedLine": false,
402
+ "targets": [
403
+ {
404
+ "alias": "$tag_job",
405
+ "groupBy": [
406
+ {
407
+ "params": [
408
+ "$__interval"
409
+ ],
410
+ "type": "time"
411
+ },
412
+ {
413
+ "params": [
414
+ "job"
415
+ ],
416
+ "type": "tag"
417
+ }
418
+ ],
419
+ "measurement": "rails",
420
+ "orderByTime": "ASC",
421
+ "policy": "default",
422
+ "refId": "A",
423
+ "resultFormat": "time_series",
424
+ "select": [
425
+ [
426
+ {
427
+ "params": [
428
+ "value"
429
+ ],
430
+ "type": "field"
431
+ },
432
+ {
433
+ "params": [
434
+ "99"
435
+ ],
436
+ "type": "percentile"
437
+ }
438
+ ]
439
+ ],
440
+ "tags": [
441
+ {
442
+ "key": "hook",
443
+ "operator": "=",
444
+ "value": "perform"
445
+ }
446
+ ]
447
+ }
448
+ ],
449
+ "thresholds": [],
450
+ "timeFrom": null,
451
+ "timeRegions": [],
452
+ "timeShift": null,
453
+ "title": "Performance",
454
+ "tooltip": {
455
+ "shared": true,
456
+ "sort": 0,
457
+ "value_type": "individual"
458
+ },
459
+ "type": "graph",
460
+ "xaxis": {
461
+ "buckets": null,
462
+ "mode": "time",
463
+ "name": null,
464
+ "show": true,
465
+ "values": []
466
+ },
467
+ "yaxes": [
468
+ {
469
+ "format": "ms",
470
+ "label": null,
471
+ "logBase": 2,
472
+ "max": null,
473
+ "min": null,
474
+ "show": true
475
+ },
476
+ {
477
+ "format": "short",
478
+ "label": null,
479
+ "logBase": 1,
480
+ "max": null,
481
+ "min": null,
482
+ "show": false
483
+ }
484
+ ],
485
+ "yaxis": {
486
+ "align": false,
487
+ "alignLevel": null
488
+ }
489
+ }
490
+ ],
491
+ "refresh": "5m",
492
+ "schemaVersion": 26,
493
+ "style": "dark",
494
+ "tags": [
495
+ "influxdb-rails",
496
+ "Health",
497
+ "Performance",
498
+ "Ruby on Rails"
499
+ ],
500
+ "templating": {
501
+ "list": [
502
+ {
503
+ "auto": true,
504
+ "auto_count": "50",
505
+ "auto_min": "",
506
+ "current": {
507
+ "selected": false,
508
+ "text": "auto",
509
+ "value": "$__auto_interval_per"
510
+ },
511
+ "hide": 0,
512
+ "label": null,
513
+ "name": "per",
514
+ "options": [
515
+ {
516
+ "selected": true,
517
+ "text": "auto",
518
+ "value": "$__auto_interval_per"
519
+ },
520
+ {
521
+ "selected": false,
522
+ "text": "1m",
523
+ "value": "1m"
524
+ },
525
+ {
526
+ "selected": false,
527
+ "text": "10m",
528
+ "value": "10m"
529
+ },
530
+ {
531
+ "selected": false,
532
+ "text": "30m",
533
+ "value": "30m"
534
+ },
535
+ {
536
+ "selected": false,
537
+ "text": "1h",
538
+ "value": "1h"
539
+ },
540
+ {
541
+ "selected": false,
542
+ "text": "6h",
543
+ "value": "6h"
544
+ },
545
+ {
546
+ "selected": false,
547
+ "text": "12h",
548
+ "value": "12h"
549
+ },
550
+ {
551
+ "selected": false,
552
+ "text": "1d",
553
+ "value": "1d"
554
+ },
555
+ {
556
+ "selected": false,
557
+ "text": "7d",
558
+ "value": "7d"
559
+ },
560
+ {
561
+ "selected": false,
562
+ "text": "14d",
563
+ "value": "14d"
564
+ },
565
+ {
566
+ "selected": false,
567
+ "text": "30d",
568
+ "value": "30d"
569
+ }
570
+ ],
571
+ "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d",
572
+ "queryValue": "",
573
+ "refresh": 2,
574
+ "skipUrlSync": false,
575
+ "type": "interval"
576
+ }
577
+ ]
578
+ },
579
+ "time": {
580
+ "from": "now-1h",
581
+ "to": "now"
582
+ },
583
+ "timepicker": {
584
+ "refresh_intervals": [
585
+ "10s",
586
+ "30s",
587
+ "1m",
588
+ "5m",
589
+ "15m",
590
+ "30m",
591
+ "1h",
592
+ "2h",
593
+ "1d"
594
+ ]
595
+ },
596
+ "timezone": "",
597
+ "title": "ActiveJob",
598
+ "uid": "influxdb-rails-activejob",
599
+ "version": 12
600
+ }