Skip to content

0.3.3.pre.1

Pre-release
Pre-release

Choose a tag to compare

@railspulse-old railspulse-old released this 17 May 13:29

Release v0.3.3.pre.1

Improvements

  • Significant reduction in database round-trips when recording operations. SQL operations are now bulk-inserted via insert_all! rather than one INSERT per operation. SQL normalization is performed once per unique query (not once per execution), and Query records are resolved with a single SELECT plus one insert_all for any missing entries — previously this was N individual create_or_find_by calls. High-traffic requests with many repeated queries (classic N+1 patterns) will see the largest gains.

  • Lower memory usage in summary aggregation. SummaryService now uses pluck to fetch only the columns needed for statistics (route_id, duration, status, etc.) instead of loading full ActiveRecord objects. This significantly reduces memory pressure during hourly/daily summary jobs on large datasets.

  • Fixed SQL normalization of IN clauses containing nested parentheses. The normalize_in_clauses method was rewritten using paren-depth tracking instead of a flat regex. The previous implementation stopped at the first ) it encountered, which broke queries containing subqueries with nested function calls or clauses (e.g., IN (SELECT id FROM ... HAVING COUNT(*) > 1)).

  • Row count now captured for SQL operations. The operation subscriber records row_count from ActiveRecord's notification payload for SQL events, making this data available for future analysis features.

  • async declared as an explicit runtime dependency. The async gem (used for non-blocking request tracking) is now listed in the gemspec rather than relying on it being available transitively.

Bug Fixes

  • None

Breaking Changes

  • None

Upgrade Notes

  • Run rails generate rails_pulse:upgrade after updating (no schema changes in this release, but the generator is safe to run as a no-op).