influxdb-rails 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/influxdb-rails-0.1.4.gem +0 -0
- data/lib/influxdb-rails.rb +2 -3
- data/lib/influxdb/rails/instrumentation.rb +3 -3
- data/lib/influxdb/rails/middleware/hijack_rescue_action_everywhere.rb +2 -2
- data/lib/influxdb/rails/rack.rb +1 -1
- data/lib/influxdb/rails/version.rb +1 -1
- metadata +3 -3
- data/lib/influxdb/rails/rails.rb +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35f471a2ffda4c8e99f655a76495be2e905e95cb
|
4
|
+
data.tar.gz: c00248d373decf1fc154477d12af68094b4b3460
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ce921aceae8a76e3061950467c3802d97de5d8ead200b6fc02c32401fdf929f4b2b616bed0e0ad3b6c3964fa9eec0143f501725dba75dad1e1c2b4d6529b5f1
|
7
|
+
data.tar.gz: ca89d9fb3af58b642a1d068db1e9411a82906a33c2956d661056d3c43968d71bc1d2a80b568908c30054c4bad58bf4bf63e030c436805c13b34084641b29c1a7
|
Binary file
|
data/lib/influxdb-rails.rb
CHANGED
@@ -46,9 +46,8 @@ module InfluxDB
|
|
46
46
|
exception_presenter = ExceptionPresenter.new(e, env)
|
47
47
|
log :info, "Exception: #{exception_presenter.to_json[0..512]}..."
|
48
48
|
|
49
|
-
|
50
|
-
|
51
|
-
:dimensions => exception_presenter.dimensions
|
49
|
+
client.write_point "rails.exceptions",
|
50
|
+
exception_presenter.context.merge(exception_presenter.dimensions)
|
52
51
|
|
53
52
|
rescue => e
|
54
53
|
log :info, "[InfluxDB::Rails] Something went terribly wrong. Exception failed to take off! #{e.class}: #{e.message}"
|
@@ -5,10 +5,10 @@ module InfluxDB
|
|
5
5
|
start = Time.now
|
6
6
|
yield
|
7
7
|
|
8
|
-
unless InfluxDB.configuration.ignore_current_environment?
|
8
|
+
unless InfluxDB::Rails.configuration.ignore_current_environment?
|
9
9
|
elapsed = ((Time.now - start) * 1000).ceil
|
10
|
-
|
11
|
-
|
10
|
+
InfluxDB::Rails.client.write_point "instrumentation",
|
11
|
+
:value => elapsed, :method => "#{controller_name}##{action_name}", :server => Socket.gethostname
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -21,8 +21,8 @@ module InfluxDB
|
|
21
21
|
def handle_exception(e)
|
22
22
|
request_data = influxdb_request_data || {}
|
23
23
|
|
24
|
-
unless InfluxDB.configuration.ignore_user_agent?(request_data[:user_agent])
|
25
|
-
InfluxDB.report_exception_unless_ignorable(e, request_data)
|
24
|
+
unless InfluxDB::Rails.configuration.ignore_user_agent?(request_data[:user_agent])
|
25
|
+
InfluxDB::Rails.report_exception_unless_ignorable(e, request_data)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
data/lib/influxdb/rails/rack.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: influxdb-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Todd Persen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: influxdb
|
@@ -157,6 +157,7 @@ files:
|
|
157
157
|
- gemfiles/Gemfile.rails-3.2.x.lock
|
158
158
|
- gemfiles/Gemfile.rails-4.0.x
|
159
159
|
- gemfiles/Gemfile.rails-4.0.x.lock
|
160
|
+
- influxdb-rails-0.1.4.gem
|
160
161
|
- influxdb-rails.gemspec
|
161
162
|
- lib/influxdb-rails.rb
|
162
163
|
- lib/influxdb/rails/air_traffic_controller.rb
|
@@ -168,7 +169,6 @@ files:
|
|
168
169
|
- lib/influxdb/rails/middleware/hijack_render_exception.rb
|
169
170
|
- lib/influxdb/rails/middleware/hijack_rescue_action_everywhere.rb
|
170
171
|
- lib/influxdb/rails/rack.rb
|
171
|
-
- lib/influxdb/rails/rails.rb
|
172
172
|
- lib/influxdb/rails/railtie.rb
|
173
173
|
- lib/influxdb/rails/version.rb
|
174
174
|
- lib/rails/generators/influxdb/influxdb_generator.rb
|
data/lib/influxdb/rails/rails.rb
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
require 'action_controller'
|
2
|
-
require 'influxdb'
|
3
|
-
require 'influxdb/rails/middleware/hijack_rescue_action_everywhere'
|
4
|
-
require 'influxdb/rails/air_traffic_controller'
|
5
|
-
require 'influxdb/rails/benchmarking'
|
6
|
-
require 'influxdb/rails/instrumentation'
|
7
|
-
|
8
|
-
module InfluxDB
|
9
|
-
module Rails
|
10
|
-
def self.initialize
|
11
|
-
ActionController::Base.send(:include, InfluxDB::Rails::AirTrafficController)
|
12
|
-
ActionController::Base.send(:include, InfluxDB::Rails::Middleware::HijackRescueActionEverywhere)
|
13
|
-
ActionController::Base.send(:include, InfluxDB::Rails::Benchmarking)
|
14
|
-
ActionController::Base.send(:include, InfluxDB::Rails::Instrumentation)
|
15
|
-
|
16
|
-
::Rails.configuration.middleware.insert_after 'ActionController::Failsafe', InfluxDB::Rack
|
17
|
-
|
18
|
-
InfluxDB.configure(true) do |config|
|
19
|
-
config.logger ||= ::Rails.logger
|
20
|
-
config.debug = true
|
21
|
-
config.environment ||= ::Rails.env
|
22
|
-
config.application_root ||= ::Rails.root
|
23
|
-
config.application_name ||= "Application"
|
24
|
-
config.framework = "Rails"
|
25
|
-
config.framework_version = ::Rails.version
|
26
|
-
end
|
27
|
-
|
28
|
-
if defined?(PhusionPassenger)
|
29
|
-
PhusionPassenger.on_event(:starting_worker_process) do |forked|
|
30
|
-
InfluxDB::Worker.spawn_threads() if forked
|
31
|
-
end
|
32
|
-
else
|
33
|
-
InfluxDB::Worker.spawn_threads()
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
InfluxDB::Rails.initialize
|