Changelog

Improving AppSignal, one deploy at a time.

May 14, 2024

ViewComponent support and other improvements

Ruby3.7.5

Support events emitted by ViewComponent. Rendering of ViewComponent-based components will appear as events in your performance samples' event timeline.

For AppSignal to instrument ViewComponent events, you must first configure ViewComponent to emit those events:

ruby
# config/application.rb module MyRailsApp class Application < Rails::Application config.view_component.instrumentation_enabled = true config.view_component.use_deprecated_instrumentation_name = false end end

Thanks to Trae Robrock (@trobrock) for providing a starting point for this implementation!

Support Kamal-based deployments. Read the KAMAL_VERSION environment variable, which Kamal exposes within the deployed container, if present, and use it as the application revision if it is not set. This will automatically report deploy markers for applications using Kamal.

Fix an issue where an error about the AppSignal internal logger is raised when sending a heartbeat.

See the Ruby gem 3.7.5 changelog for more information.

May 09, 2024

Fix LocalJumpError on Active Job < 7.1

Ruby3.7.4

Fix LocalJumpError in Active Job instrumentation initialization for Active Job < 7.1.

See the Ruby gem 3.7.4 changelog for more information.

May 08, 2024

Report Active Job errors only on discard

Ruby3.7.3

Added

  • Add option to activejob_report_errors option to only report errors when a job is discard by Active Job. In the example below the job is retried twice. If it fails with an error twice the job is discarded. If activejob_report_errors is set to discard, you will only get an error reported when the job is discarded. This new discard value only works for Active Job 7.1 and newer.

    ruby
    class ExampleJob < ActiveJob::Base retry_on StandardError, :attempts => 2 # ... end

    More information in our Active Job documentation.

  • Track Active Job executions per job. When a job is retried the "executions" metadata for Active Job jobs goes up by one for every retry. We now track this as the executions tag on the job sample.

See the Ruby gem 3.7.3 changelog for more information.

May 06, 2024

Fix deprecation warnings

Ruby3.7.2

Fixed

  • Fix deprecation warnings for Probes.probes introduced in 3.7.1 for internally registered probes.

See the Ruby gem 3.7.2 changelog for more information.

Apr 29, 2024

Probe improvements and small fixes

Ruby3.7.1

Changed

  • If the gem can't find a valid log path in the app's log/ directory, it will no longer print the warning more than once.
  • Stop the minutely probes when Appsignal.stop is called. When Appsignal.stop is called, the probes thread will no longer continue running in the app process.
  • Listen to the APPSIGNAL_HTTP_PROXY environment variable in the extension installer. When APPSIGNAL_HTTP_PROXY is set during gem instal appsignal or bundle install, it will use the proxy specified in the APPSIGNAL_HTTP_PROXY environment variable to download the extension and agent.
  • Allow unregistering minutely probes. Use Appsignal::Probes.unregister to unregister probes registered with Appsignal::Probes.register if you do not need a certain probe, including default probes.
  • Add Appsignal::Probes.register method as the preferred method to register probes. The Appsignal::Probes.probes.register and Appsignal::Minutely.probes.register methods are now deprecated.
  • Automatically start new probes registered with Appsignal::Probes.register when the gem has already started the probes thread. Previously, the late registered probes would not be run.
  • Rename the Minutely constant to Probes so that the API is the same between AppSignal integrations. If your apps calls Appsignal::Minutely, please update it to Appsignal::Probes. If your app calls Appsignal::Minutely after this upgrade without the name change, the gem will print a deprecation warning for each time the Appsignal::Minutely is called.
  • Log debug messages when metrics are received for easier debugging.

Fixed

  • Clear the AppSignal in memory logger, used during the gem start, after the file/STDOUT logger is started. This reduces memory usage of the AppSignal Ruby gem by a tiny bit, and prevent stale logs being logged whenever a process gets forked and starts AppSignal.

See the Ruby gem 3.7.1 changelog for more information.

Apr 22, 2024

Add heartbeats and `ignore_logs` config option

Ruby3.7.0

ignore_logs configuration option

Add the ignore_logs configuration option, which can also be configured as the APPSIGNAL_IGNORE_LOGS environment variable.

The value of ignore_logs is a list (comma-separated, when using the environment variable) of log line messages that should be ignored. For example, the value "start" will cause any message containing the word "start" to be ignored. Any log line message containing a value in ignore_logs will not be reported to AppSignal.

The values can use a small subset of regular expression syntax (specifically, ^, $ and .*) to narrow or expand the scope of lines that should be matched.

For example, the value "^start$" can be used to ignore any message that is exactly the word "start", but not messages that merely contain it, like "Process failed to start". The value "Task .* succeeded" can be used to ignore messages about task success regardless of the specific task name.

Heartbeats

Heartbeats are currently only available to beta testers. If you are interested in trying it out, send an email to support@appsignal.com!


Add heartbeats support. You can send heartbeats directly from your code, to track the execution of certain processes:

ruby
def send_invoices() # ... your code here ... Appsignal.heartbeat("send_invoices") end

You can pass a block to Appsignal.heartbeat, to report to AppSignal both when the process starts, and when it finishes, allowing you to see the duration of the process:

ruby
def send_invoices() Appsignal.heartbeat("send_invoices") do # ... your code here ... end end

If an exception is raised within the block, the finish event will not be reported to AppSignal, triggering a notification about the missing heartbeat. The exception will bubble outside of the heartbeat block.


See the Ruby gem 3.7.0 changelog for more information.

Mar 25, 2024

Fix CPU usage measurements

Ruby3.6.4

Fix CPU user/system usage measurements, as to take into account the amount of CPUs available.

Mar 25, 2024

Fix instrumentation for older redis-client versions

Ruby3.6.5

Fix a bug where performing queries using older versions of redis-client would result in a NoMethodError being raised.

Using redis-client version 0.14.0 or greater is a requirement for AppSignal to instrument Redis queries.

See the Ruby gem 3.6.5 changelog for more information.

Mar 20, 2024

Improve Rails error reporter and other improvements

Ruby3.6.3

Improve Rails error reporter

Add request parameters, "path" and "method" tags to errors reported in controllers via the Rails error reporter. (Thanks @bdewater-thatch!)

Add CPU count configuration option

Implement CPU count configuration option. Use it to override the auto-detected, cgroups-provided number of CPUs that is used to calculate CPU usage percentages.

To set it, use the the cpu_count configuration option or the APPSIGNAL_CPU_COUNT environment variable.

Mar 05, 2024

Active Job error reporting config option

Ruby3.6.1

Added

  • Add activejob_report_errors config option. When set to "none", ActiveJob jobs will no longer report errors. This can be used in combination with custom exception reporting. By default, the config option has the value "all", which reports all errors.

See the Ruby gem 3.6.1 changelog for more information.

Feb 26, 2024

Ruby gem 3.6.0

Ruby3.6.0

Added

  • Add instrumentation for all Rack responses, including streaming responses. New response_body_each.rack, response_body_call.rack and response_body_to_ary.rack events will be shown in the event timeline. This will show how long it takes to complete responses, depending on the response implementation.

    This Sinatra route with a streaming response will be better instrumented, for example:

    ruby
    get "/stream" do stream do |out| sleep 1 out << "1" sleep 1 out << "2" sleep 1 out << "3" end end
  • Add histogram support to the OpenTelemetry HTTP server. This allows OpenTelemetry-based instrumentations to report histogram data to AppSignal as distribution metrics.

Changed

  • Breaking change: Normalize CPU metrics for cgroups v1 systems. When we can detect how many CPUs are configured in the container's limits, we will normalize the CPU percentages to a maximum of 100%. This is a breaking change. Triggers for CPU percentages that are configured for a CPU percentage higher than 100% will no longer trigger after this update. Please configure triggers to a percentage with a maximum of 100% CPU percentage.
  • Support fractional CPUs for cgroups v2 metrics. Previously a CPU count of 0.5 would be interpreted as 1 CPU. Now it will be correctly seen as half a CPU and calculate CPU percentages accordingly.
  • Update bundled trusted root certificates.

Fixed

  • Fix (sub)traces not being reported in their entirety when the OpenTelemetry exporter sends one trace in multiple export requests. This would be an issue for long running traces, that are exported in several requests.

See the Ruby gem 3.6.0 changelog for more information.

Feb 08, 2024

Default headers don't include `REQUEST_URI` anymore

Ruby3.5.6

Changed

  • The default headers no longer include REQUEST_URI as query params are not sanitize and might include PII. Now the REQUEST_PATH is used instead.

See the Ruby gem 3.5.6 changelog for more information.

Feb 01, 2024

redis-client support and MySQL query sanitization fix

Ruby3.5.5

Added

  • Add support for the redis-client gem, which is used by the redis gem since version 5.

Changed

  • Make the debug log message for OpenTelemetry spans from libraries we don't automatically recognize more clear. Mention the span id and the instrumentation library.
  • Fix an issue where queries containing a MySQL leading type indicator would only be partially sanitised.

Fixed

  • Add more testing to JRuby extension installation to better report the installation result and any possible failures.

See the Ruby gem 3.5.5 changelog for more information.

Jan 15, 2024

Fix Alpine Linux disk usage metrics

Ruby3.5.4

Changed

  • Fix disk usage returning a Vec with no entries on Alpine Linux when the df --local command fails.

Deprecated

  • Deprecate the Appsignal.set_host_gauge and Appsignal.set_process_gauge helper methods in the Ruby gem. These methods would already log deprecation warnings in the appsignal.log file, but now also as a Ruby warning. These methods will be removed in the next major version. These methods already did not report any metrics, and still do not.

Removed

  • Remove the appsignal_set_host_gauge and appsignal_set_process_gauge extension functions. These functions were already deprecated and did not report any metrics.

Fixed

  • Fix the Makefile log path inclusion in the diagnose report. The diagnose tool didn't look in the correct gem extension directory for this log file.
  • Fix reporting of the Ruby syntax version and JRuby version in install report better.

See the Ruby gem 3.5.4 changelog for more information.

Jan 04, 2024

Log warning for missing disk mountpoints

Ruby3.5.3

Changed

Log a warning when no mountpoints are found to report the disk usage metrics. This scenario shouldn't happen (it should log an error, message about skipping a mountpoint or log the disk usage). Log a warning to detect if this issue really occurs.

See the Ruby gem 3.5.3 changelog for more information.

Dec 27, 2023

Ruby 3.3 compatibility

Ruby3.5.1

Fixed

  • Fixed a bug that prevented apps from starting up when using Ruby 3.3

See the Ruby gem 3.5.1 changelog for more information.

Dec 27, 2023

Ruby Logger 1.6 compatibility

Ruby3.5.2

Fixed

  • Fix Ruby Logger 1.6.0 compatibility.

See the Ruby gem 3.5.2 changelog for more information.

Dec 11, 2023

Error causes support

Ruby3.5.0

Added support for error causes.

When AppSignal reports an error that was raised during the handling of another error, the original error (the cause) and its error message will be shown alongside the reported error.

AppSignal sample showing error causes

See the Ruby gem 3.5.0 changelog for more information.

Dec 01, 2023

Disk usage measurement improvements

Ruby3.4.16

Changed

  • Filter more disk mountpoints for disk usage and disk IO stats. This helps reduce noise in the host metrics by focussing on more important mountpoints. Any mountpoint containing /etc/hostname, /etc/hosts, /etc/resolv.conf, /snap/ or /proc/ is ignored.

Fixed

  • Support disk usage reporting (using df) on Alpine Linux. This host metric would report an error on Alpine Linux.
  • When a disk mountpoint has no inodes usage percentage, skip the mountpoint, and report the inodes information successfully for the inodes that do have an inodes usage percentage.

See the Ruby gem 3.4.16 changelog for more information.

Nov 21, 2023

CPU stats normalization for cgroups v2

Ruby3.4.15

Changed

  • CPU usage is now normalized to the number of CPUs available to the container. This means that a container with 2 CPUs will have its CPU usage reported as 50% when using 1 CPU instead of 100%. This is a breaking change for anyone using the cpu probe.
    • If you have CPU triggers set up based on the old behaviour, you might need to update those to these new normalized values to get the same behaviour. Note that this is needed only if the AppSignal integration package you're using includes this change.

See the Ruby gem 3.4.15 changelog for more information.

Start your free trial

Don’t let the bad bugs bite. Try AppSignal for free.

AppSignal offers a 30-day free trial, no credit card is required. All features are available in all plans. Start monitoring your application in just a few clicks!