Skip to content

Commit

Permalink
Merge pull request #6469 from ChrisBr/influxdb-beta
Browse files Browse the repository at this point in the history
Update influxdb-rails gem
  • Loading branch information
ChrisBr committed Dec 10, 2018
2 parents 5770331 + f925e77 commit 3a00a33
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/api/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ gem 'addressable'
# for XML builder
gem 'builder'
# to write the rails metrics directly into InfluxDB.
gem 'influxdb-rails', '>=1.0.0.beta1'
gem 'influxdb-rails', '>=1.0.0.beta2'

group :development, :production do
# to have the delayed job daemon
Expand Down
10 changes: 5 additions & 5 deletions src/api/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ GEM
ruby_parser (~> 3.5)
i18n (1.1.1)
concurrent-ruby (~> 1.0)
influxdb (0.5.3)
influxdb-rails (1.0.0.beta1)
influxdb (~> 0.5.0)
railties (> 3)
influxdb (0.6.4)
influxdb-rails (1.0.0.beta2)
influxdb (~> 0.6, >= 0.6.4)
railties (>= 4.2)
innertube (1.1.0)
jaro_winkler (1.5.1)
joiner (0.4.2)
Expand Down Expand Up @@ -488,7 +488,7 @@ DEPENDENCIES
haml
haml-rails
haml_lint
influxdb-rails (>= 1.0.0.beta1)
influxdb-rails (>= 1.0.0.beta2)
jquery-datatables
jquery-rails
jquery-ui-rails (~> 4.2.1)
Expand Down
2 changes: 2 additions & 0 deletions src/api/config/initializers/influxdb_rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
config.influxdb_port = CONFIG['influxdb_port']
config.retry = CONFIG['influxdb_retry']
config.use_ssl = CONFIG['influxdb_ssl']

config.time_precision = CONFIG['influxdb_time_precision']
end
1 change: 1 addition & 0 deletions src/api/config/options.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ default: &default
# influxdb_port: 8086
# influxdb_ssl: true
# influxdb_retry: 10
# influxdb_time_precision: ms

# Enable (true) / Disable (false) Ruby on Rails profiling top-bar in the web ui
peek_enabled: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def call(_name, _started, finished, _unique_id, data)
InfluxDB::Rails.client.write_point(series_name,
tags: tags(data),
values: values(data[:runtime]),
timestamp: InfluxDB::Rails.convert_timestamp(finished.utc))
timestamp: InfluxDB.convert_timestamp(finished.utc))
rescue StandardError => e
logger.info "[InfluxDB Backend Subscriber]: #{e.message}"
end
Expand Down

0 comments on commit 3a00a33

Please sign in to comment.