Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update observability.mdx #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/observability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import DocLink from "../src/components/DocLink.js";

# Logging & Observability

One of the greatest things of AWS Lambda is that you get all the benfits of CloudWatch logging built into the platform. Logging is just a simple Ruby `puts` command away. Here are a few amazing things to help you succeed with good logging and observability patterns in AWS with CloudWatch.
One of the greatest things about AWS Lambda is that you get all the benefits of CloudWatch logging built into the platform. Logging is just a simple Ruby `puts` command away. Here are a few amazing things to help you succeed with good logging and observability patterns in AWS with CloudWatch.

## STDOUT is a Must!

Lambda is a read-only file system. The Lamby gem will set the `RAILS_LOG_TO_STDOUT` environment variable on your behalf. It also freedom patches the core Ruby `Logger` class to force STDOUT. That said, be on the lookout for any rogue disk-based logging you may have to address. Older Rails applications may have to use a pattern like this.
Lambda is a read-only file system. The Lamby gem will set the `RAILS_LOG_TO_STDOUT` environment variable on your behalf. It also patches the core Ruby `Logger` class to force STDOUT. That said, be on the lookout for any rogue disk-based logging you may have to address. Older Rails applications may have to use a pattern like this.

```ruby title="config/environments/production.rb"
logger = ActiveSupport::Logger.new(STDOUT)
Expand Down