-
Notifications
You must be signed in to change notification settings - Fork 63
1.0 Upgrade Guide
Version 1.0 of influxdb-rails includes a couple of backward incompatible changes.
To simplify the configuration we have separated all of the influxdb-ruby client settings. Please update your configuration accordingly.
0.4.x | 1.0.x |
---|---|
influxdb_database |
client.database |
influxdb_username |
client.username |
influxdb_password |
client.password |
influxdb_hosts |
client.hosts |
influxdb_port |
client.port |
async |
client.async |
use_ssl |
client.use_ssl |
retry |
client.retry |
open_timeout |
client.open_timeout |
read_timeout |
client.read_timeout |
max_delay |
client.max_delay |
time_precision |
client.time_precision |
To simplify our code base and in honor to the many Free Software exception trackers (errbit, sentry etc.), who do this job in a much nicer way, we have dropped the exceptions feature completely. So from this version on, we will not output anything into the rails.exceptions
measurement anymore. We are sorry if you have relied on this and you now have to migrate to something else for exception tracking, but this was such an invasive code-path. We rather want to concentrate our resources on supporting more ActiveSupport Instrumentation hooks and data instead of this.
In version 1.0 we switched from emitting eight different measurements based on Active Support Instrumentation hooks to one measurement called rails
. We changed this to support easier aggregation across data in the rails
measurement, to simplify our configuration and to stay closer to the InfluxDB/Grafana nomenclature.
You will need to update your dashboards, sorry for the inconvenience. Below you find a table of what moved where.
0.4.x | 1.0.x (measurement: rails ) |
---|---|
measurement: rails.controller
|
tag-key: hook , tag-value: process_action , field-key: controller
|
measurement: rails.view
|
tag-key: hook , tag-value: process_action , field-key: view
|
measurement: rails.db
|
tag-key: hook , tag-value: process_action , field-key: db
|
measurement: rails.render_template
|
tag-key: hook , tag-value: render_template
|
measurement: rails.render_partial
|
tag-key: hook , tag-value: render_partial
|
measurement: rails.render_collection
|
tag-key: hook , tag-value: render_collection
|
measurement: rails.sql
|
tag-key: hook , tag-value: sql
|
measurement: rails.exceptions
|
Not Available anymore |
See the InfluxDB Key Concepts documentation about what measurement, tag-key, tag-value and field-key mean.
As explained above, a couple of configuration variables have changed. There is no need for you to do anything after the update but we list them here for completeness.
The following settings in your initializer don't have an effect anymore, you can remove them.
series_name_for_controller_runtimes
series_name_for_view_runtimes
series_name_for_db_runtimes
series_name_for_render_template
series_name_for_render_partial
series_name_for_render_collection
series_name_for_sql
series_name_for_exceptions
series_name_for_instrumentation
And there are two new variables (with sensible defaults) that you can add to your initializer. You can use measurement_name = 'rails'
to influence how the measurement we send is called. To disable measuring some specific hook (setting series_name_for_something = nil
in 0.4x) you can use the variable ignored_hooks = ['sql.active_record', 'render_template.action_view']
. See README.md#usage for the list of hooks we support.
- Support for Ruby <= 2.2.x has been removed
- Support for Rails <= 4.1.x has been removed
- Removed previously deprecated methods, if you still have them in your initializer they will now crash.
InfluxDB::Rails::Configuration#reraise_global_exceptions
InfluxDB::Rails::Configuration#database_name
InfluxDB::Rails::Configuration#application_id