You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Default structured logging to off and require explicit opt-in #3101
Rails structured logging automatically turns Rails ActiveRecord and ActionController events into Sentry logs. That makes it automatic logging instrumentation, so starting with sentry-rails 7.1.0 it will be off by default, like the rest of logs and metrics. The interpretation behind that behavior was that adding sentry-rails counted as the logging opt-in, analogous to adding a dedicated logging integration. But in that case it was too ambiguous; this is a corrective follow-up.
We're sorry for the disruption of changing a default within 7.x. We chose to make the change now instead of waiting for 8.0, so that everyone adopting logs gets the same, predictable behavior from the start.
Make Rails structured logging opt-in
Users who want Rails structured logs should enable them explicitly:
Before 7.0, config.rails.structured_logging.enabled followed the global enable_logs option. feat!: Remove enable_logs #3053 removed enable_logs in 7.0 and set the Rails default to true.
7.1.0 makes it opt-in: an unset option means off, and sentry-rails logs a warning at boot until the option is set explicitly. Both the warning and the "unset" state are removed in 8.0.
Sentry.logger.* stays available regardless of this setting. No global enable_logs gate and no double opt-in.
SDK (sentry-rails 7.1.0)
Default structured_logging.enabled to true or nil (unset), treated as off
changed the title [-][Rails] Default structured logging to off and require explicit opt-in[/-][+]Default structured logging to off and require explicit opt-in[/+]on Sep 28, 2026
Activity
linear-code commentedon Sep 28, 2026
RUBY-219
[-][Rails] Default structured logging to off and require explicit opt-in[/-][+]Default structured logging to off and require explicit opt-in[/+]