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 plainDELETE/UPDATEnotifications, so 0.2.0 shippedrow_count: 0for the cases that matter most.BulkDatabaseCapturernow prepends a tiny shim ontoActiveRecord::Relation#delete_all/#update_allthat stashes the returned row count and back-fills it onto the just-pushed event viaBuffer.peek_last. No wire-shape change. - Model resolution in Rails dev mode.
ActiveRecord::Base.descendantsonly sees eager-loaded models. The resolver now falls through tosafe_constantizeof 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 = NULLwrites was too aggressive — it also hid deliberate "null this column out" operations the customer wrote. The filter now only dropsCOALESCE-shaped counter bumps and empty-SETshells; honestSET col = NULLwrites 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 acrossActiveJobCapturer,DatabaseCapturer,BulkDatabaseCapturer, andSensitivePatterns. Thesql.active_recordsubscriber uses a 5-arity block (no splat allocation) and anend_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"`