Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Squash Production Defects Quickly - The Power O...

Squash Production Defects Quickly - The Power Of Structured Logging - EuRuKo 2024

Rails apps can be a black box. Ever seen a defect where you just can't figure out what's going on?This talk will give you practical steps to improve the observability of your Rails app, taking the time to understand and fix defects from hours or days to minutes.

Rails 8 brings an exciting new feature: built-in structured logging. This talk will delve into the transformative impact of structured logging on application observability and fixing defects.

Structured logging, as a cornerstone of observability, offers a more organized and query-able way to handle logs compared to traditional text-based logs. This session will guide you through the nuances of structured logging in Rails, demonstrating how it can be leveraged to gain better insights into your application's behavior.

This talk will be a deep technical dive into how to make structured logging work with an existing Rails app.

Avatar for John Gallagher

John Gallagher

June 06, 2025
Tweet

More Decks by John Gallagher

Other Decks in Programming

Transcript

  1. How often do you encounter issues where you lack visibility

    into your application's performance or errors?
  2. How often do you encounter issues where you lack visibility

    into your application's performance or errors?
  3. Event Filter By Group By Values Of Job Performed Job

    Queue Job Class Data To Collect Decide
  4. Event Filter By Group By Values Of Job Performed Job

    Queue Job Class Duration Data To Collect Decide
  5. Instrumentation Build 1. Data type (Traces, Logs, Metrics) 2. Plain

    Text vs Structured 3. Logging Library 4. Customise
  6. Instrumentation Build Library Payload Rails Docs Mature fluentd lograge logging

    contextual_logger semantic_logger dry-logger Thank you to all authors of these gems for your hard work!
  7. Instrumentation Build Library Payload Rails Docs Mature fluentd ❌ ✅

    ❌ ✅ lograge ❌ ✅ ❌ ✅ logging ❌ ❌ ❌ ❌ contextual_logger ✅ ✅ ❌ ❌ semantic_logger ✅ ✅ ✅ ✅ dry-logger ✅ ❌ ✅ ❌ Thank you to all authors of these gems for your hard work!
  8. Instrumentation Build Library Payload Rails Docs Mature fluentd ❌ ✅

    ❌ ✅ lograge ❌ ✅ ❌ ✅ logging ❌ ❌ ❌ ❌ contextual_logger ✅ ✅ ❌ ❌ semantic_logger ✅ ✅ ✅ ✅ dry-logger ✅ ❌ ✅ ❌ Thank you to all authors of these gems for your hard work!
  9. 1. No conventions 2. Missing attributes 3. Missing API requests

    Many more... Instrumentation Build Weaknesses
  10. 1. No conventions 2. Missing attributes 3. Missing API requests

    Instrumentation Build Weaknesses ✅ ✅ ✅
  11. Graphs Use Event Filter By Group By Plot Values Of

    Job Performed Job Queue Job Class Duration