Type signatures and improved Capistrano & Hatchbox deploys
Added
- Add Sorbet and RBS type signatures for the gem's public APIs. If your editor supports showing type signatures, they will now show up in for the AppSignal Ruby gem.
- When a deployment tool (Capistrano, Hatchbox.io) provides the
REVISION
file in the deployed application, AppSignal will now use that to set the revision config.
Changed
- Improve the YARD documentation for public APIs. This will make the documentation clearer and more useful for developers using the Ruby gem. Private APIs have been hidden from the generated output.
- When an error occurs while initializing AppSignal or when running a probe, use the error log level to log the error's backtrace.
Fixed
-
When a Hash-like value (such as
ActiveSupport::HashWithIndifferentAccess
orSinatra::IndifferentHash
) is passed to a transaction helper (such asadd_params
,add_session_data
, ...) it is now converted to a RubyHash
before setting it as the value or merging it with the existing value. This allows Hash-like objects to be merged, instead of logging a warning and only storing the new value.Ruby# Example scenario Appsignal.add_params(:key1 => { :abc => "value" }) Appsignal.add_params(ActiveSupport::HashWithIndifferentAccess.new(:key2 => { :def => "value" })) # Params { :key1 => { :abc => "value" }, # Keys from HashWithIndifferentAccess are stored as Strings "key2" => { "def" => "value" } }
View the Ruby gem v4.6.0 changelog for more information.