tag:github.com,2008:https://github.com/InfluxCommunity/influxdb-rails/releasesRelease notes from influxdb-rails2021-09-15T10:06:48Ztag:github.com,2008:Repository/15147022/v1.0.32021-09-15T10:10:50ZExceptional Exceptions<p>This release changes how the status of requests that end up in an exception are measured. The <a href="https://github.com/influxdata/influxdb-rails/tree/one-stable#action-controller"><code>ActionController</code></a> measurement will set the status just like Rails.logger does for some "standard" exceptions like <code>ActiveRecord::RecordNotFound</code> or <code>ActionController::RoutingError</code>. 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.</p>
<p>After dropping support for Ruby 2.4 a while ago, we now require Ruby 2.5.</p>hennevogeltag:github.com,2008:Repository/15147022/v1.0.22021-04-13T14:05:47ZBugfix boolean custom tags<p>Fix passing booleans to custom tags (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="855978879" data-permission-text="Title is private" data-url="https://github.com/InfluxCommunity/influxdb-rails/issues/171" data-hovercard-type="pull_request" data-hovercard-url="/InfluxCommunity/influxdb-rails/pull/171/hovercard" href="https://github.com/InfluxCommunity/influxdb-rails/pull/171">#171</a>)</p>hennevogeltag:github.com,2008:Repository/15147022/v1.0.12021-03-23T16:25:19ZInstrumentation Overdrive - influxdb-rails 1.0.1<h2>Highlights</h2>
<p>This release is adding three new types of instrumentation:</p>
<ol>
<li>
<p><code>ActiveJob</code> Instrumentation<br>
We now instrument all those pesky background jobs, so you can stay on top of what is happening in your <code>ActiveJob</code> queues. When have they been queued? How many are queued? How long did they take?</p>
</li>
<li>
<p>Block Instrumentation<br>
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.</p>
</li>
</ol>
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="InfluxDB::Rails.instrument "expensive_operation", tags: { }, values: { } do
expensive_operation
end"><pre><span class="pl-v">InfluxDB</span>::<span class="pl-v">Rails</span><span class="pl-kos">.</span><span class="pl-en">instrument</span> <span class="pl-s">"expensive_operation"</span><span class="pl-kos">,</span> <span class="pl-pds">tags</span>: <span class="pl-kos">{</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-pds">values</span>: <span class="pl-kos">{</span> <span class="pl-kos">}</span> <span class="pl-k">do</span>
<span class="pl-en">expensive_operation</span>
<span class="pl-k">end</span></pre></div>
<ol start="3">
<li>
<p><code>ActionMailer</code> Instrumentation<br>
For those of you who send E-Mails (who doesn't?) we added instrumentation for <code>ActionMailer</code> that will tell you the throughput of your mailer classes.</p>
</li>
<li>
<p>A couple of new template dashboards based on the new measurements we produce<br>
See for yourself 👀</p>
</li>
</ol>
<p><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/514785/112139550-2d577a00-8bd3-11eb-9d69-916e162a9bb7.gif"><img src="https://user-images.githubusercontent.com/514785/112139550-2d577a00-8bd3-11eb-9d69-916e162a9bb7.gif" alt="Cycling through our dashboards" style="max-width: 100%;"></a></p>
<h2>Minor Changes</h2>
<p>We now also instrument <code>ActiveRecord</code> instantiation so you can hunt down the actions which are a bit too eager to load data.<br>
Unhandled exceptions are now reported as a tag in the <code>ActionController</code> instrumentation, we don't really want to replace your exception tracking tool, but some statistics about this can't hurt right?</p>
<p>We also added support for more recent Ruby (2.7 / 3.0) and Ruby on Rails (6.0 / 6.1) versions.</p>
<h2>Breaking Changes</h2>
<p>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 <code>influxdb-rails</code> 1.0.0 and update soon, all of those are out of maintenance 😸</p>
<h2>Thanks</h2>
<p>This release would have been possible without you peepz! Thank you for your support ❤️</p>
<ul>
<li>Charlie Hornsby (<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/chornsby/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/chornsby">@chornsby</a>) of aiven.io for making the SSL client config more obvious</li>
<li>Swapnil Gourshete (<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gourshete/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gourshete">@gourshete</a>) for documentation fixes</li>
<li>Andrew Kalek (<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/anlek/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/anlek">@anlek</a>) for adding basic auth support for the connection to influxdb</li>
<li><a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/SUSE/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/SUSE">@SUSE</a> for giving me leeway during <a href="https://hackweek.suse.com/" rel="nofollow">#HackWeek</a> to finally roll this!</li>
</ul>hennevogeltag:github.com,2008:Repository/15147022/v1.0.1.beta22020-09-14T11:58:27ZSecond 1.0.1 beta<p>One new subscriber: ActionMailer</p>hennevogeltag:github.com,2008:Repository/15147022/v1.0.1.beta12020-09-14T11:03:09Z1.0.1 Beta 1 <p>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</p>hennevogeltag:github.com,2008:Repository/15147022/v1.0.02019-10-23T16:41:37ZAn all new influxdb-rails 1.0<p>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!</p>
<blockquote>
<p><g-emoji class="g-emoji" alias="warning">⚠️</g-emoji> This is a complete new branch, it also includes a couple of breaking changes! <g-emoji class="g-emoji" alias="warning">⚠️</g-emoji></p>
</blockquote>
<h2>New Features</h2>
<h3>Redesign of the Measurement Output</h3>
<p>We switched from emitting eight different measurements based on <a href="https://guides.rubyonrails.org/active_support_instrumentation.html" rel="nofollow">Active Support Instrumentation</a> hooks to one measurement called <code>rails</code>. We changed this to support easier aggregation across data in the <code>rails</code> measurement, to simplify our configuration and to stay closer to the InfluxDB/Grafana nomenclature.</p>
<p>You will need to update your dashboards, sorry for the inconvenience (see the <a href="#breaking-changes">Breaking Changes</a> section).</p>
<h3>A Sample Dashboard</h3>
<p>Sending measurements to an InfluxDB is only half of the fun! 🤡 So this is the first version that includes a <a href="https://grafana.com/" rel="nofollow">grafana</a> dashboard. This dashboard tracks Ruby on Rails application performance based on the data we deliver with this gem.</p>
<p><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/514785/67407888-73607680-f5b8-11e9-8536-83f661395d1b.gif"><img src="https://user-images.githubusercontent.com/514785/67407888-73607680-f5b8-11e9-8536-83f661395d1b.gif" alt="Screenhots of the sample dashboard" style="max-width: 100%;"></a></p>
<p>Check out the <a href="https://github.com/influxdata/influxdb-rails/tree/master/sample-dashboard">sample-dashboard/</a> directory. We are really looking forward to collaborate with you on this. Let's build a the perfect Ruby on Rails dashboard together! 🤝</p>
<h3>Easy custom Tags & Values</h3>
<p>It's now way easier to include your own tags & values for measurements. Be it application wide (thank you <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Kukunin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Kukunin">@Kukunin</a> for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="356270698" data-permission-text="Title is private" data-url="https://github.com/InfluxCommunity/influxdb-rails/issues/47" data-hovercard-type="pull_request" data-hovercard-url="/InfluxCommunity/influxdb-rails/pull/47/hovercard" href="https://github.com/InfluxCommunity/influxdb-rails/pull/47">#47</a> 💐) or per request!</p>
<h3>New <code>ActiveRecord</code> and <code>ActionView</code> instrumentation</h3>
<p>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 <code>ActionController</code> measurements now include more tags (method, status, format). And last but not least, all measurements now include the application name (thank you <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/stefanhorning/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/stefanhorning">@stefanhorning</a> for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="293577064" data-permission-text="Title is private" data-url="https://github.com/InfluxCommunity/influxdb-rails/issues/44" data-hovercard-type="pull_request" data-hovercard-url="/InfluxCommunity/influxdb-rails/pull/44/hovercard" href="https://github.com/InfluxCommunity/influxdb-rails/pull/44">#44</a> 💐). See our README.md for all the new goodness.</p>
<h2>Breaking Changes</h2>
<p>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...</p>
<h3>Client Configuration</h3>
<p>To simplify the configuration we have separated all of the <a href="https://github.com/influxdata/influxdb-ruby">influxdb-ruby client</a> settings. Please update your configuration accordingly.</p>
<table>
<thead>
<tr>
<th>0.4.x</th>
<th>1.0.x</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>influxdb_database</code></td>
<td><code>client.database</code></td>
</tr>
<tr>
<td><code>influxdb_username</code></td>
<td><code>client.username</code></td>
</tr>
<tr>
<td><code>influxdb_password</code></td>
<td><code>client.password</code></td>
</tr>
<tr>
<td><code>influxdb_hosts</code></td>
<td><code>client.hosts</code></td>
</tr>
<tr>
<td><code>influxdb_port</code></td>
<td><code>client.port</code></td>
</tr>
<tr>
<td><code>async</code></td>
<td><code>client.async</code></td>
</tr>
<tr>
<td><code>use_ssl</code></td>
<td><code>client.use_ssl</code></td>
</tr>
<tr>
<td><code>retry</code></td>
<td><code>client.retry</code></td>
</tr>
<tr>
<td><code>open_timeout</code></td>
<td><code>client.open_timeout</code></td>
</tr>
<tr>
<td><code>read_timeout</code></td>
<td><code>client.read_timeout</code></td>
</tr>
<tr>
<td><code>max_delay</code></td>
<td><code>client.max_delay</code></td>
</tr>
<tr>
<td><code>time_precision</code></td>
<td><code>client.time_precision</code></td>
</tr>
</tbody>
</table>
<h3>Exceptions</h3>
<p>To simplify our code base and in honor to the many Free Software exception trackers (<a href="https://github.com/errbit/errbit">errbit</a>, <a href="https://sentry.io" rel="nofollow">sentry</a> 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 <code>rails.exceptions</code> 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 <a href="https://guides.rubyonrails.org/active_support_instrumentation.html" rel="nofollow">ActiveSupport Instrumentation</a> hooks and data instead of this.</p>
<h3>Measurement Output</h3>
<p>As explained above, the measurement output changed. Below you find a table of what moved where.</p>
<table>
<thead>
<tr>
<th>0.4.x</th>
<th>1.0.x (measurement: <code>rails</code>)</th>
</tr>
</thead>
<tbody>
<tr>
<td>measurement: <code>rails.controller</code></td>
<td>tag-key: <code>hook</code>, tag-value: <code>process_action</code>, field-key: <code>controller</code></td>
</tr>
<tr>
<td>measurement: <code>rails.view</code></td>
<td>tag-key: <code>hook</code>, tag-value: <code>process_action</code>, field-key: <code>view</code></td>
</tr>
<tr>
<td>measurement: <code>rails.db</code></td>
<td>tag-key: <code>hook</code>, tag-value: <code>process_action</code>, field-key: <code>db</code></td>
</tr>
<tr>
<td>measurement: <code>rails.render_template</code></td>
<td>tag-key: <code>hook</code>, tag-value: <code>render_template</code></td>
</tr>
<tr>
<td>measurement: <code>rails.render_partial</code></td>
<td>tag-key: <code>hook</code>, tag-value: <code>render_partial</code></td>
</tr>
<tr>
<td>measurement: <code>rails.render_collection</code></td>
<td>tag-key: <code>hook</code>, tag-value: <code>render_collection</code></td>
</tr>
<tr>
<td>measurement: <code>rails.sql</code></td>
<td>tag-key: <code>hook</code>, tag-value: <code>sql</code></td>
</tr>
<tr>
<td>measurement: <code>rails.exceptions</code></td>
<td>Not Available anymore</td>
</tr>
</tbody>
</table>
<p>See the <a href="https://docs.influxdata.com/influxdb/v1.7/concepts/key_concepts/#measurement" rel="nofollow">InfluxDB Key Concepts</a> documentation about what measurement, tag-key, tag-value and field-key mean.</p>
<h4>Measurement Configuration</h4>
<p>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.</p>
<p>The following settings in your initializer don't have an effect anymore, you can remove them.</p>
<ul>
<li><code>series_name_for_controller_runtimes</code></li>
<li><code>series_name_for_view_runtimes</code></li>
<li><code>series_name_for_db_runtimes</code></li>
<li><code>series_name_for_render_template</code></li>
<li><code>series_name_for_render_partial</code></li>
<li><code>series_name_for_render_collection</code></li>
<li><code>series_name_for_sql</code></li>
<li><code>series_name_for_exceptions</code></li>
<li><code>series_name_for_instrumentation</code></li>
</ul>
<p>And there are two new variables (with sensible defaults) that you can add to your initializer. You can use <code>measurement_name = 'rails'</code> to influence how the measurement we send is called. To disable measuring some specific hook (setting <code>series_name_for_something = nil</code> in 0.4x) you can use the variable <code>ignored_hooks = ['sql.active_record', 'render_template.action_view']</code>. See <a href="https://github.com/influxdata/influxdb-rails#usage">README.md#usage</a> for the list of hooks we support.</p>
<h3>Other breaking changes</h3>
<ul>
<li>Support for Ruby <= 2.2.x has been removed</li>
<li>Support for Rails <= 4.1.x has been removed</li>
<li>Removed previously deprecated methods, if you still have them in your initializer they will now crash.
<ul>
<li><code>InfluxDB::Rails::Configuration#reraise_global_exceptions</code></li>
<li><code>InfluxDB::Rails::Configuration#database_name</code></li>
<li><code>InfluxDB::Rails::Configuration#application_id</code></li>
</ul>
</li>
</ul>
<h2>Installation & Update</h2>
<p>Please refer to README.md for everything else.</p>
<p>Hope this helps you instrument your Ruby on Rails application with <a href="https://www.fsf.org/about/what-is-free-software" rel="nofollow">Free Software</a>! ❤️ - <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ChrisBr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ChrisBr">@ChrisBr</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/hennevogel/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/hennevogel">@hennevogel</a> & <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dmke/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dmke">@dmke</a></p>hennevogeltag:github.com,2008:Repository/15147022/v1.0.0.beta32019-01-07T18:37:56Zv1.0.0.beta3<p>Version 1.0.0.beta3</p>dmketag:github.com,2008:Repository/15147022/v1.0.0.beta22018-12-07T19:39:49Zv1.0.0.beta2<p>Version 1.0.0.beta2</p>dmketag:github.com,2008:Repository/15147022/v1.0.0.beta12018-11-22T21:09:10Zv1.0.0.beta1<p>Version 1.0.0.beta1</p>dmketag:github.com,2008:Repository/15147022/v0.4.32017-12-12T20:13:57Zv0.4.3<p>Version 0.4.3</p>dmke