observability-baseline

Configure structured lograge logging, error reporting, and PII scrubbing for Rails 8 production apps.

21|2|Updated May 24, 2026
One-click install
npx skills add https://github.com/sandeepmvl/rails-skills --skill observability-baseline-sandeepmvl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: observability-baseline
Source: https://github.com/sandeepmvl/rails-skills/tree/main/skills/15-observability-baseline
Command: npx skills add https://github.com/sandeepmvl/rails-skills --skill observability-baseline-sandeepmvl

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about observability-baseline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure structured JSON logging in Rails 8 production?

Structured JSON logging in Rails 8 production is configured using lograge to replace default multiline logs with single-line, parseable JSON tagged with request and user context for easy aggregation.

How do I standardize Rails error reporting for Sentry, Honeybadger, or Rollbar?

Standardized Rails error reporting uses the Rails.error.report API (Rails 7.1+) to send errors to Sentry, Honeybadger, or Rollbar with a single consistent interface, eliminating scattered vendor-specific error handling code.

How do I scrub PII like passwords and JWTs from Rails application logs?

Scrubbing PII from Rails logs applies strict guardrails and auto-scrubbing rules to remove sensitive data like passwords, card numbers, and JWTs from both application logs and error reports.

Does this observability setup work with Rails 7.1 or only Rails 8?

This baseline observability setup targets Rails 8 production applications, but relies on the Rails.error.report standard introduced in Rails 7.1 for standardized error reporting functionality.

What is the best way to correlate Rails production requests with user IDs during outages?

Correlating Rails production requests with user IDs during outages uses lograge to tag structured single-line JSON logs with request IDs and user context, enabling rapid tracing and root cause identification.

Why are default Rails production logs difficult to use for debugging outages?

Default Rails production logs are difficult for debugging outages because they are unstructured, noisy, multiline outputs missing critical context like request IDs and user IDs, making it nearly impossible to track recurring errors.