Skip to content

v0.2.1 — bulk capture polish

Latest

Choose a tag to compare

@dezsirazvan dezsirazvan released this 05 Jun 20:15
· 1 commit to master since this release

Polish pass on 0.2.0's bulk-database capture, plus hot-path perf work across all capturers.

Fixed

  • Bulk-op row counts on Postgres. The PG adapter does not populate payload[:row_count] for plain DELETE/UPDATE notifications, so 0.2.0 shipped row_count: 0 for the cases that matter most. BulkDatabaseCapturer now prepends a tiny shim onto ActiveRecord::Relation#delete_all / #update_all that stashes the returned row count and back-fills it onto the just-pushed event via Buffer.peek_last. No wire-shape change.
  • Model resolution in Rails dev mode. ActiveRecord::Base.descendants only sees eager-loaded models. The resolver now falls through to safe_constantize of the classified table name and verifies the reconstructed class actually owns that table, so bulk ops on lazy-autoloaded models in dev / test no longer silently drop.
  • Rails Query Log Tags noise in where_template. The parser strips /*application='X',action='Y'*/ comments before extracting the WHERE clause, so the humanized filter line reads cleanly instead of leaking instrumentation tags.

Changed

  • Framework-rewrite filter narrowed. The 0.2.0 filter that swallowed Rails-generated SET col = NULL writes was too aggressive — it also hid deliberate "null this column out" operations the customer wrote. The filter now only drops COALESCE-shaped counter bumps and empty-SET shells; honest SET col = NULL writes are captured.
  • Hot-path performance. capture_jobs, capture_database, the excluded-tables / excluded-job-classes / display-name maps, and the user-extended sensitive-key patterns are now memoized at install time across ActiveJobCapturer, DatabaseCapturer, BulkDatabaseCapturer, and SensitivePatterns. The sql.active_record subscriber uses a 5-arity block (no splat allocation) and an end_with? name-prefilter ahead of any parsing. Bulk capture overhead measured below the noise floor on a 10 ms reference query.

\xf0\x9f\x92\x8e Install: `gem "ez_logs_agent", "~> 0.2.1"`