PlainAPM Changelog

New features and improvements to PlainAPM.

June 06, 2024

Search and trace summaries

Improving on answering ‘why was X slow’, traces now contain some statistics which are typically causes for slowdowns in requests and jobs:

  • ActiveRecord object allocations
  • SQL query count
  • And the duration of the slowest SQL query.

A transaction trace headers showing SQL query count, duration of the slowest query and the number of ActiveRecord object allocations

Similarly, the search results now contain summary statistics of the search results, which can help get the feel for throughput and/or latency of the resulting events:

Event search results with statistics about first/last time, events count, events per minute, and median/p99/maximum duration

May 17, 2024

Sorting by relative duration

To see the current heavy hitters easily, the requests, jobs, and transaction tables can be sorted by relative time %:

Controller endpoint requests sorted by relative time

April 22, 2024

Dokku deployment tracking

PlainAPM agent v0.10.0 just landed on rubygems.org.

While it is mostly a bugfixing release, there’s a small tweak useful for Rails apps running on Dokku - as Dokku exposes current app revision through the GIT_REV environment variable, the agent picks it up and uses it to track deployments automatically.

April 08, 2024

GC stats

Version 0.9.8 of the agent gathers additional data: GC stats and CPU time spent in thread:

  • gc_time - time spent in the garbage collector.
  • gc_major_count - number of major (full) garbage collections.
  • gc_minor_count - number of minor (young objects) garbage collections.

This allows searching for events where GC took longer than a certain threshold:

Search query results where GC took more than 5ms

Another tweak is that if the info is present, exceptions are now annotated by the current controller + endpoint, or job class + queue, which are available for searching:

Search query results w/ exceptions that happened in the MoviesController

March 31, 2024

Saved searches

Search queries can now be stored for later:

A page showing a list of saved queries

March 24, 2024

Improved tracking for action mailer

While prior releases since 0.9.4 were bug fixes, version 0.9.7 of the Ruby agent brings improved tracking of action mailer - the agent now collects the subject, sender, and a hashed list of recipients, and the app has been updated to allow searching these fields and displaying them in traces.

This should help debugging deliverability/mailer problems:

Transaction trace of actionmailer with a sender, subject and a SHA1 sum of recipient's email

March 06, 2024

Performance improvements

Version 0.9.3 of the Ruby gem/agent was a result of benchmarking and profiling the existing code. Besides performance improvements, there are three updates:

  • Inspired by a Ruby issue #19197, the agent now, on an exception, tries to walk back the cause chain to the original exception, and stores the result in a ‘root_cause’ (along with a backtrace).
  • Disabling the agent should now avoid loading/initializing any PlainAPM instrumentation code, i.e. cause no overhead.
  • Loading/initialization in Rails is improved.

February 15, 2023

Job diffs

A new bit just landed in PlainAPM:

It is now possible to show a diff of job performance between two deployments.

Performance changes of asynchronous jobs between deploys.

December 19, 2022

Job tracing, instrumenting caches

We now released two important enhancements:

  • Support for for analysing ActiveJob performance, execution statistics and traces.
  • ActiveSupport::CacheStore events are now instrumented and displayed in the UI.
  • PlainAPM agent gem version 0.6.1 was released to support these changes.
  • Tables in the UI are now sortable, and preserve sorting across page views.

Latencies and queue wait times per job

Transaction trace including two redis cache hits

November 27, 2022

Tweaks and fixes

This week was mostly about small improvements to the UI and responding to reported issues:

  • Fixed a bug with agent reporting an empty deploy revision (released in gem v0.5.5).
  • Hostname, PID and thread ID were added to the top of the trace details.
  • Display request counts grouped by status:

New request breakdown by status codes