EZLogs for Rails
Activity logs for Rails — plain English, zero per-controller code.
EZLogs is a Rails activity log gem that auto-captures every HTTP request, every Sidekiq / ActiveJob run, and every ActiveRecord change, then correlates them into one plain-English card per customer action. Anyone on your team — engineers, founders, support, PMs — can read it.
What gets captured automatically
- HTTP requests via Rack middleware — controller, action, path, status, duration, current_user if your app sets one.
- Background jobs via ActiveJob / Sidekiq instrumentation — class, queue, arguments, result, duration.
- Calls to outside services (Stripe, email, AI APIs) as steps of the action that made them — the service, method, path pattern, status and time. Never a body, a query string or a header.
- Database changes via ActiveRecord callbacks — table, primary key, operation, redacted before/after column values.
- Bulk SQL that skips callbacks —
update_all,delete_all,insert_all,upsert_all, anddependent: :delete_allcascades. - Changes made by hand or on a schedule — each
rails consoleline, rake task andrails runnerscript that changes data is one card, named after what ran it (“Rails console (deploy)”, “rake orders:backfill”).
Events are correlated by request ID, current user, and resource ID. Each customer action becomes one card, not a wall of logs.
Install: paste the prompt into your coding AI, or do it by hand
1. Fastest: let your coding AI do it
Paste this into Cursor, Claude Code or any coding AI. It does the steps below and checks that capture works. It asks you for your API key (Install & keys, the menu behind your initials, top right, after you sign up).
Install EZLogs in this app by following https://app.ezlogs.io/install/rails.md
2. By hand
bundle add ez_logs_agent
rails generate ez_logs_agent:install
# config/initializers/ez_logs_agent.rb
EzLogsAgent.configure do |config|
config.project_token = ENV["EZLOGS_API_KEY"]
end
# your environment (.env, Kamal, Heroku...)
EZLOGS_API_KEY=ezl_your_api_key_here
The generator writes the initializer for you. Set EZLOGS_API_KEY, then restart your app. No per-controller code, no model concerns, no per-job wrapper. The gem hooks into Rails’ existing instrumentation.
How is this different from PaperTrail or Audited?
PaperTrail and Audited are model-versioning gems — they let you go back and inspect a row at a given timestamp. They are great at that and EZLogs does not try to replace them. EZLogs is solving a different problem: tell me, in plain English, what one customer (or one AI agent) actually did in my app today — HTTP + jobs + DB stitched together, summarized in a sentence, readable by anyone in the company. PaperTrail+Audited gives you the rows. EZLogs gives you the story. PaperTrail, Audited, Ahoy and EZLogs compared →
How is this different from Datadog or New Relic?
Those tools answer “is the system healthy?” with metrics and traces aimed at engineers debugging. EZLogs answers “what happened to my customer?” with business-level actions aimed at the whole company. We don’t compete with metrics — we’re the layer above them.
Performance and safety
- Out-of-band: events buffered in memory, shipped over a separate connection.
- Fails open: if EZLogs is unreachable, the agent buffers up to 10,000 events and retries. If the buffer overflows, oldest events drop. The agent never raises into your request path.
- Field-level redaction on by default for passwords, tokens, secrets, API keys, and card numbers.
- Open source at github.com/dezsirazvan/ez_logs_agent. Pin to a SHA, audit the code.
Supported versions
Rails 6.1+, Ruby 3.1+. Sidekiq 6+, ActiveJob (built-in). ActiveRecord with PostgreSQL or MySQL.
No card required · Read-only by design