RepoPilotOpen in app →

wvanbergen/request-log-analyzer

Create reports based on your log files. Supports Rails, Apache, MySQL, Delayed::Job, and other formats.

Healthy

Healthy across all four use cases

Use as dependencyHealthy

Permissive license, no critical CVEs, actively maintained — safe to depend on.

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • 11 active contributors
  • Distributed ownership (top contributor 32% of recent commits)
  • MIT licensed
Show 3 more →
  • CI configured
  • Tests present
  • Stale — last commit 5y ago

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Healthy" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Healthy
[![RepoPilot: Healthy](https://repopilot.app/api/badge/wvanbergen/request-log-analyzer)](https://repopilot.app/r/wvanbergen/request-log-analyzer)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/wvanbergen/request-log-analyzer on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: wvanbergen/request-log-analyzer

Generated by RepoPilot · 2026-05-10 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/wvanbergen/request-log-analyzer shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

GO — Healthy across all four use cases

  • 11 active contributors
  • Distributed ownership (top contributor 32% of recent commits)
  • MIT licensed
  • CI configured
  • Tests present
  • ⚠ Stale — last commit 5y ago

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live wvanbergen/request-log-analyzer repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/wvanbergen/request-log-analyzer.

What it runs against: a local clone of wvanbergen/request-log-analyzer — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in wvanbergen/request-log-analyzer | Confirms the artifact applies here, not a fork | | 2 | License is still MIT | Catches relicense before you depend on it | | 3 | Default branch master exists | Catches branch renames | | 4 | Last commit ≤ 2028 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>wvanbergen/request-log-analyzer</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of wvanbergen/request-log-analyzer. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/wvanbergen/request-log-analyzer.git
#   cd request-log-analyzer
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of wvanbergen/request-log-analyzer and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "wvanbergen/request-log-analyzer(\\.git)?\\b" \\
  && ok "origin remote is wvanbergen/request-log-analyzer" \\
  || miss "origin remote is not wvanbergen/request-log-analyzer (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
  && ok "license is MIT" \\
  || miss "license drift — was MIT at generation time"

# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
  && ok "default branch master exists" \\
  || miss "default branch master no longer exists"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 2028 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~1998d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/wvanbergen/request-log-analyzer"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

request-log-analyzer is a Ruby command-line tool that parses production log files from Rails, Apache, MySQL, Delayed::Job, and 10+ other formats to generate performance reports identifying slow endpoints and bottlenecks. It aggregates metrics like cumulative request time, mean response time, database time, and render time across requests without requiring database changes or application instrumentation. Classic Ruby gem structure: lib/request_log_analyzer contains the core engine split into file_format/ (15 parser classes for different log types), aggregator/ (database_inserter, summarizer, echo), filter/ (anonymize), and database/ (ORM-layer for SQLite/MySQL/PostgreSQL). bin/request-log-analyzer is the CLI entry point. lib/cli/ handles argument parsing and UI (progressbar.rb, database_console.rb).

👥Who it's for

DevOps engineers and Ruby developers running production Rails applications who need to identify performance bottlenecks by analyzing existing server logs. They use it to find which controller actions consume the most time and resources, guiding optimization priorities.

🌱Maturity & risk

Production-ready and stable. The project has been actively maintained with Travis CI integration (.travis.yml present), multiple Gemfile variants for Rails 3 and 4 support, and a comprehensive CHANGELOG.rdoc. Last activity and issue history suggest ongoing support, though the pace appears measured rather than fast-moving.

Single-maintainer risk is moderate (wvanbergen as primary author per README). The codebase targets Ruby 1.9+ and older Rails versions (3/4 via separate Gemfiles), creating compatibility concerns for newer Rails 6+ apps. No visible Gemfile.lock suggests potential dependency version drift. The broad format support (15+ file format classes) increases maintenance surface area.

Active areas of work

No visible recent commits or PR activity in the provided file structure. The CHANGELOG.rdoc and .travis.yml are present but age is unknown. The project appears in maintenance mode rather than active development.

🚀Get running

git clone https://github.com/wvanbergen/request-log-analyzer.git
cd request-log-analyzer
bundle install
bin/request-log-analyzer --help

Then test with a sample log: bin/request-log-analyzer path/to/production.log

Daily commands:

bundle exec bin/request-log-analyzer log/production.log
bundle exec bin/request-log-analyzer --format rails3 --output database log/*.gz
bundle exec bin/console  # interactive IRB with gem loaded

No server—runs as one-shot analysis. Supports file globbing and gzip decompression.

🗺️Map of the codebase

🛠️How to make changes

Adding a new log format: Subclass RequestLogAnalyzer::FileFormat (see lib/request_log_analyzer/file_format/rails.rb as template), define regex patterns and field mappings, place in lib/request_log_analyzer/file_format/your_format.rb. Adding a report metric: Extend lib/request_log_analyzer/aggregator/summarizer.rb with new @results entries. CLI changes: Edit lib/cli/command_line_arguments.rb. Database schema: Modify lib/request_log_analyzer/database/*.rb model classes.

🪤Traps & gotchas

No explicit test suite in file list: verify if tests/ or spec/ directory exists outside top 60—maintainability risk. Gemfile variants (activerecord3, activerecord4): must use correct variant for your Rails version or face ActiveRecord incompatibility. Database locking: if using --output database on large logs, SQLite may lock; MySQL/PostgreSQL recommended for production logs. Memory footprint claim (README) is untested: no benchmarks visible; verify on actual large logs (>1GB). Format string brittleness: regex parsers in file_format/ are fragile to log format changes; minor log config changes can cause silent parse failures. CLI argument parsing: no validation visible for conflicting options (--output file vs --output database)—may silently choose one.

💡Concepts to learn

  • Log Line Regex Parsing — Every file_format class in this repo defines a regex pattern to extract structured fields from unstructured log lines; understanding these patterns is essential to adding new format support or debugging parse failures.
  • Aggregator Pattern — This codebase uses the Aggregator pattern (lib/request_log_analyzer/aggregator.rb) to chain multiple processing steps (insert → filter → summarize) on log entries; understanding this pattern is key to extending report generation.
  • ORM Abstraction Layer — lib/request_log_analyzer/database/*.rb implements a lightweight ORM supporting SQLite, MySQL, PostgreSQL without Rails' ActiveRecord; useful pattern for standalone CLI tools that need multi-database support.
  • Class-level Inheritable Attributes — lib/request_log_analyzer/class_level_inheritable_attributes.rb implements a custom inheritance mechanism for sharing config across parser classes; understanding this explains how file_format subclasses inherit field definitions.
  • Percentile Aggregation — The summarizer calculates response time percentiles (p50, p95, p99) to identify tail latency; this is critical for identifying performance SLAs in production.
  • Streaming Log Processing — Rather than loading full logs into memory, this tool streams line-by-line from potentially gzipped files; critical for processing multi-gigabyte production logs without memory exhaustion.
  • evanphx/benchmark-ips — Complementary Ruby benchmark tool; users analyzing logs often need fine-grained performance profiling of specific slow methods.
  • brendangregg/FlameGraph — Visualization tool for profiling data; pairs with request-log-analyzer to visualize where time is spent in call stacks.
  • elastic/logstash — Log aggregation/parsing framework used in production setups; request-log-analyzer is a lighter alternative for simple Rails log parsing without ElasticSearch.
  • ruby-prof/ruby-prof — Runtime profiler for Ruby; users often use both to correlate slow logs with CPU hotspots detected by ruby-prof.
  • newrelic/rpm — Real-time APM tool; request-log-analyzer offers offline retrospective analysis of logs as a free alternative for cost-conscious teams.

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add comprehensive unit tests for file_format parsers

The repo supports 15+ log formats (Rails, Apache, MySQL, Delayed::Job, etc.) but there's no visible test directory structure. Each format in lib/request_log_analyzer/file_format/ needs dedicated test coverage to prevent regression when formats change. This is critical since parsing logic directly impacts report accuracy.

  • [ ] Create test/unit/file_format/ directory structure mirroring lib/request_log_analyzer/file_format/
  • [ ] Add test files for each format: test_rails.rb, test_apache.rb, test_mysql.rb, test_delayed_job*.rb, test_nginx.rb, test_postgresql.rb, etc.
  • [ ] Create sample log files in test/fixtures/ for each format to use in tests
  • [ ] Test edge cases: malformed lines, missing fields, timezone handling, multiline entries
  • [ ] Update .travis.yml to run test suite on multiple Ruby versions (1.9+)

Add GitHub Actions workflow to replace Travis CI

.travis.yml exists but Travis CI has changed its pricing model. GitHub Actions is now standard for open source. This enables modern CI/CD with better integration, faster feedback, and matrix testing across Ruby versions and Gemfiles (Gemfile.activerecord3, Gemfile.activerecord4).

  • [ ] Create .github/workflows/tests.yml with matrix strategy for Ruby 2.6+, 3.0+, 3.1+
  • [ ] Add matrix jobs for Gemfile, Gemfile.activerecord3, and Gemfile.activerecord4 testing
  • [ ] Include lint checks using RuboCop (currently no linter config visible)
  • [ ] Test against multiple database backends if needed (MySQL, PostgreSQL)
  • [ ] Remove or deprecate .travis.yml with notes in CONTRIBUTING.rdoc

Add integration tests for tracker classes with real log samples

The lib/request_log_analyzer/tracker/ directory contains 5 tracker types (duration, frequency, hourly_spread, numeric_value, timespan) that aggregate parsed data. Without integration tests, it's unclear if trackers correctly process parsed requests. This directly impacts report quality.

  • [ ] Create test/integration/tracker/ directory
  • [ ] For each tracker in lib/request_log_analyzer/tracker/, create test_*.rb files
  • [ ] Use sample Rails/Apache log files from test/fixtures/ to test full pipeline: parse → aggregate → track
  • [ ] Test tracker output formatting (lib/request_log_analyzer/output/fixed_width.rb and html.rb)
  • [ ] Validate aggregation logic: test_duration.rb should verify percentiles, medians, and mean calculations are correct

🌿Good first issues

  • Add spec/ directory with RSpec tests for lib/request_log_analyzer/file_format/rails.rb covering valid Rails log lines, malformed lines, and edge cases (multiline backtraces, UUID request IDs). Currently no visible unit test coverage.: Medium: Prevents format parser regressions as Rails logging evolves
  • Document each of the 15 file_format classes (apache.rb, nginx.rb, etc.) with sample log line and field extraction examples in doc/FORMATS.md. Currently only mentioned in --format help text.: Low: Reduces trial-and-error for users choosing formats; improves discoverability
  • Create a basic integration test script in examples/ that downloads a real Rails production.log, runs the analyzer, and validates output contains expected metrics (e.g., 'GET', 'POST', milliseconds). No runnable examples visible.: Low-Medium: Makes onboarding faster for new users; serves as regression suite

Top contributors

Click to expand

📝Recent commits

Click to expand
  • b83865d — Another small README cleanup (wvanbergen)
  • 8c2f9a1 — README cleanup (wvanbergen)
  • 96519b8 — Small documentation updates (wvanbergen)
  • 139a3d7 — Bump version (wvanbergen)
  • 81a0509 — Merge pull request #176 from wvanbergen/rescue_syntax_error_on_eval (Willem van Bergen)
  • fcb6deb — Merge pull request #174 from mstark/rails3_file_upload_parameters (Willem van Bergen)
  • 3a41156 — Rescue SyntaxError when converting eval'ed parameters (wvanbergen)
  • 3148ef4 — update changelog (mstark)
  • cb55c98 — add encoding to fix specs in ruby 1.9 env (mstark)
  • 0832ee1 — More CONTRIBUTING copy updates (wvanbergen)

🔒Security observations

  • High · SQL Injection Risk in Database Operations — lib/request_log_analyzer/database/, lib/request_log_analyzer/aggregator/database_inserter.rb, lib/request_log_analyzer/filter/. The codebase contains database interaction components (lib/request_log_analyzer/database/) that parse and insert log data. Without visible parameterized query patterns or ORM safeguards in the file structure, there is potential for SQL injection if user-supplied log data or filters are not properly sanitized before database operations. Fix: Ensure all database queries use parameterized statements or prepared statements. Use Rails ActiveRecord query interface exclusively. Implement input validation and sanitization for all filter inputs (lib/request_log_analyzer/filter/) before database operations.
  • High · Potential XSS in HTML Output Generation — lib/request_log_analyzer/output/html.rb. The HTML output module (lib/request_log_analyzer/output/html.rb) generates HTML reports from log data. If log contents or user-supplied data are rendered without proper escaping, this could lead to reflected or stored XSS vulnerabilities. Fix: Ensure all dynamic content is HTML-escaped using Rails helpers like h() or ERB::Util.html_escape(). Validate that template rendering uses safe defaults. Implement Content Security Policy headers if applicable.
  • High · Log File Processing Security — lib/request_log_analyzer/source/log_parser.rb, lib/request_log_analyzer/file_format/. The log parser (lib/request_log_analyzer/source/log_parser.rb) processes arbitrary log files from multiple sources (Apache, Rails, MySQL, etc.). Maliciously crafted log files could exploit regex patterns, cause denial of service through resource exhaustion, or bypass security controls. Fix: Implement file size limits and timeout mechanisms for log parsing. Use strict regex patterns with anchors to prevent catastrophic backtracking. Validate log format before processing. Consider sandboxing log file processing.
  • Medium · Command Injection via CLI Arguments — lib/cli/command_line_arguments.rb, bin/request-log-analyzer. The CLI tool accepts command-line arguments (lib/cli/command_line_arguments.rb) that may be passed to system commands or used in file operations. Insufficient validation could allow command injection or path traversal attacks. Fix: Validate all CLI inputs against whitelists. Use shell-safe methods for file operations. Avoid passing user input directly to system commands. Use File.expand_path() with safe base directories.
  • Medium · Insecure Deserialization Risk — lib/cli/database_console_init.rb, lib/request_log_analyzer/aggregator/. Database console initialization (lib/cli/database_console_init.rb) and aggregator components may deserialize data without proper validation, potentially allowing object injection attacks. Fix: Avoid deserializing untrusted data. If deserialization is necessary, use safe methods and validate object types. Consider using JSON instead of Ruby's Marshal format.
  • Medium · Anonymization Filter Implementation — lib/request_log_analyzer/filter/anonymize.rb. The anonymize filter (lib/request_log_analyzer/filter/anonymize.rb) is intended to obscure sensitive data, but its effectiveness depends on proper implementation. Incomplete anonymization could leak PII. Fix: Ensure all sensitive fields (IP addresses, user IDs, email addresses, etc.) are properly anonymized. Use strong hashing functions (SHA-256+) instead of simple transformations. Document which fields are anonymized.
  • Medium · Missing Input Validation in Filters — lib/request_log_analyzer/filter/timespan.rb, lib/request_log_analyzer/filter/field.rb. Filter modules (lib/request_log_analyzer/filter/) accept user inputs for timespan and field filtering. These inputs may not be adequately validated, leading to unexpected behavior or security bypasses. Fix: Implement strict input validation for all filter parameters. Validate date formats, field names against a whitelist, and numeric ranges. Provide clear error messages for invalid inputs.
  • Low · Outdated Gemfile Dependencies — undefined. The project maintains multiple Gemfiles for different Rails versions (Gemfile.activerecord3, Fix: undefined

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Healthy signals · wvanbergen/request-log-analyzer — RepoPilot