What problem does it solve?
Default Rails production logging is unstructured, noisy, and missing critical context like request IDs and user IDs, making it nearly impossible to debug outages, track recurring errors, or comply with PII regulations. This skill provides senior Rails developer-approved observability defaults that work out of the box for Rails 8 production apps.
Core Features & Use Cases
- Structured single-line logs with lograge: Replace Rails' default 6-line per-request multiline logs with parseable JSON, tagged with request and user context for easy grepping and aggregation to tools like ELK, Loki, or Datadog.
- Standardized error reporting: Use Rails.error.report (Rails 7.1+) to send errors to Sentry, Honeybadger, or Rollbar with a single consistent API, eliminating scattered vendor-specific error handling code.
- PII scrubbing and logging guardrails: Auto-scrub sensitive data like passwords, card numbers, and JWTs from logs and error reports, with clear, enforceable rules for what data is permitted in logs.
- Use Case: A Rails 8 app experiencing a 2am outage can use the structured logs and centralized error tracking from this skill to trace the failing request, identify the root cause, and confirm no sensitive user data was leaked in logs within minutes instead of hours.
Quick Start
Use the observability-baseline skill to configure structured lograge logging, request tagging, Sentry error tracking, and PII scrubbing for your Rails 8 production app following senior Rails best practices.