Releases: influxdata/influxdb-rails
Exceptional Exceptions
This release changes how the status of requests that end up in an exception are measured. The ActionController
measurement will set the status just like Rails.logger does for some "standard" exceptions like ActiveRecord::RecordNotFound
or ActionController::RoutingError
. Everything that isn't handled by default in Rails is reported as with a 500 status tag. This makes it easier to distinguish "standard' exceptions from "real" exceptional things.
After dropping support for Ruby 2.4 a while ago, we now require Ruby 2.5.
Bugfix boolean custom tags
Fix passing booleans to custom tags (#171)
Instrumentation Overdrive - influxdb-rails 1.0.1
Highlights
This release is adding three new types of instrumentation:
-
ActiveJob
Instrumentation
We now instrument all those pesky background jobs, so you can stay on top of what is happening in yourActiveJob
queues. When have they been queued? How many are queued? How long did they take? -
Block Instrumentation
If you have some special devilish block of code you want to instrument the performance of, we now added a way for you to do that.
InfluxDB::Rails.instrument "expensive_operation", tags: { }, values: { } do
expensive_operation
end
-
ActionMailer
Instrumentation
For those of you who send E-Mails (who doesn't?) we added instrumentation forActionMailer
that will tell you the throughput of your mailer classes. -
A couple of new template dashboards based on the new measurements we produce
See for yourself 👀
Minor Changes
We now also instrument ActiveRecord
instantiation so you can hunt down the actions which are a bit too eager to load data.
Unhandled exceptions are now reported as a tag in the ActionController
instrumentation, we don't really want to replace your exception tracking tool, but some statistics about this can't hurt right?
We also added support for more recent Ruby (2.7 / 3.0) and Ruby on Rails (6.0 / 6.1) versions.
Breaking Changes
But we also dropped support for Ruby 2.3, 2.4 and Rails 4.2, 5.0 and 5.1. If you are using those versions you should stay on influxdb-rails
1.0.0 and update soon, all of those are out of maintenance 😸
Thanks
This release would have been possible without you peepz! Thank you for your support ❤️
- Charlie Hornsby (@chornsby) of aiven.io for making the SSL client config more obvious
- Swapnil Gourshete (@gourshete) for documentation fixes
- Andrew Kalek (@anlek) for adding basic auth support for the connection to influxdb
- @SUSE for giving me leeway during #HackWeek to finally roll this!
Second 1.0.1 beta
One new subscriber: ActionMailer
1.0.1 Beta 1
First beta release of 1.0.1. Loads of new subscribers like ActiveRecord instantiation, all of ActiveJob and block instrumentation. Check it out and report problems
An all new influxdb-rails 1.0
This is the first stable release of the v1.0 branch of influxdb-rails. We have packed for you a lot of awesome features and bug fixes into 1.0. And we hope you'll enjoy using this as much as we have creating it!
⚠️ This is a complete new branch, it also includes a couple of breaking changes!⚠️
New Features
Redesign of the Measurement Output
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 (see the Breaking Changes section).
A Sample Dashboard
Sending measurements to an InfluxDB is only half of the fun! 🤡 So this is the first version that includes a grafana dashboard. This dashboard tracks Ruby on Rails application performance based on the data we deliver with this gem.
Check out the sample-dashboard/ directory. We are really looking forward to collaborate with you on this. Let's build a the perfect Ruby on Rails dashboard together! 🤝
Easy custom Tags & Values
It's now way easier to include your own tags & values for measurements. Be it application wide (thank you @Kukunin for #47 💐) or per request!
New ActiveRecord
and ActionView
instrumentation
We have expanded the set of measurements to include also data from ActiveRecord and from ActionView so you get to know where your application really spends time on. Additionally to that the ActionController
measurements now include more tags (method, status, format). And last but not least, all measurements now include the application name (thank you @stefanhorning for #44 💐). See our README.md for all the new goodness.
Breaking Changes
As this is a complete new branch it also includes a couple of breaking changes and you will have to update your configuration and your dashboards based on our data. We are sorry we have to put you through this...
Client Configuration
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 |
Exceptions
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.
Measurement Output
As explained above, the measurement output changed. 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.
Measurement Configuration
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.
Other breaking changes
- 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
Installation & Update
Please refer to README.md for everything else.
Hope this helps you instrument your Ruby on Rails application with Free Software! ❤️ - @ChrisBr, @hennevogel & @dmke