Reporter#slowest_actions_by
method now takes an options hash for optional parameters. See #18 If you're calling this method directly in your code anywhere (in a rake task, or in your own reporting method, for example), then you'll want to audit your usage to use a hash.
'keep_since' => 'retention
The use of the namekeep_since
to denote a retention period, or a period of time after which metrics should be included for reporting purposes have been replaced with the termretention
.
NOTE: v0.3.x is no longer built against Rubinius.
- Refactored the
HowSlow::config
options - you will definitely want to take a look at the new structure, as they are very likely to break your previous use ofHowSlow 0.2.0
- Possible breakage of Rails 4 support. More specifically I changed the
how_slow.gemspec
file to exclude Rails 4 support (for now) - No longer support Rails 3.0 (bumped minimum version to Rails 3.1)
- Changed
HowSlow
from aRails::Railtie
to aRails::Engine
in order to make the mailer views easily available and override-able in the app that is usingHowSlow
- Added email report support!
- Added
#to_default_email_string
methods to the various metric types as a convenience method for getting their values in a human-readable format in email - Added a rake task -
how_slow:metrics_email
for sending an email with a metrics report. Suitable for consumption bycron
or something similar that is outside of your application. - The
actionmailer
gem is now required, but this shouldn't be a big deal, because if you're already using Rails then you already have this installed - Changed the way that files are "required" in order to support Ruby 1.8 load paths
- Building against eight different Ruby implementations via TravisCI from 1.8-2.0, including MRI, JRuby, and Rubinius
- Updated README to reflect latest code changes and usage recommendations
- Updated all the code-level documentation to reflect the latest 0.3.0 functionality
- Slightly changed the gem description
- The logger changes the JSON attribute
type
totype_name
so as not to collide with the deprecatedtype
method in Ruby. This means that any metrics you collected using the0.1.x
version of the gem will essentially be ignored. You might just want to delete them now. - The
slowest_action
method has been replaced. First, it is no longer a method on the module. Second, it has been renamed toslowest_actions_by
and allows you to specify which measurement (total_runtime
,db_runtime
,view_runtime
, orother_runtime
). Otherwise the method still accepts thenumber_of_actions
andkeep_since
arguments, which work the same way as they did previously. - Moved the responsibility of collecting and logging metrics out of the module
itself and into subclasses that wrap the
action
andcounter
metrics types. Like an ORM, these classes wrap the data in a given metric with a Ruby object and make the metric's data available as attributes. - Some of the hash keys in metrics have been changed from strings to symbols. Check the structure if code that depends on these hashes seems to suddenly break.
- To supoprt the new
counter
metric type, I added theHowSlow::Reporter#sum_counters_by
method, which allows you to get metrics reports on counters in a fashion similar toaction
metrics. - There is a new metric type, a counter, which is used to count anything you
want it to count.
The default
keep_since
value for theslowest_actions_by
method has been changed fromnil
to7.days.ago
. - Completely rewrote and expanded the test suite to better organize it, make it more comprehensive, and overall much more readable.