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,33 @@
|
|
1
|
+
version: "3.7"
|
2
|
+
services:
|
3
|
+
influx:
|
4
|
+
image: influxdb:1.7
|
5
|
+
environment:
|
6
|
+
- INFLUXDB_DB=rails
|
7
|
+
- INFLUXDB_USER=root
|
8
|
+
- INFLUXDB_USER_PASSWORD=root
|
9
|
+
- INFLUXDB_READ_USER=grafana
|
10
|
+
- INFLUXDB_READ_USER_PASSWORD=grafana
|
11
|
+
volumes:
|
12
|
+
- influxdata:/var/lib/influxdb
|
13
|
+
ports:
|
14
|
+
- 8086:8086
|
15
|
+
grafana:
|
16
|
+
image: grafana/grafana:6.2.4
|
17
|
+
ports:
|
18
|
+
- 3000:3000
|
19
|
+
depends_on:
|
20
|
+
- influx
|
21
|
+
volumes:
|
22
|
+
- ./provisioning/grafana-datasource.yml:/etc/grafana/provisioning/datasources/grafana-datasource.yml:ro
|
23
|
+
- ./provisioning/grafana-dashboards.yml:/etc/grafana/provisioning/dashboards/grafana-dashboards.yml:ro
|
24
|
+
- ./provisioning/performance.json:/var/lib/grafana/dashboards/performance.json:ro
|
25
|
+
- ./provisioning/performance-request.json:/var/lib/grafana/dashboards/performance-request.json:ro
|
26
|
+
- grafanadata:/var/lib/grafana
|
27
|
+
rails:
|
28
|
+
image: hennevogel/influxdb-rails-sample
|
29
|
+
ports:
|
30
|
+
- 4000:4000
|
31
|
+
volumes:
|
32
|
+
influxdata:
|
33
|
+
grafanadata:
|