Ruby/Rails logs onboarding suggests removed enable_logs

Open Beginner friendly
#130,405 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
rails, react, ruby, typescript
Domain
documentation

Research direction

Start with static/app/gettingStartedDocs/ruby-rails/onboarding.tsx, ruby/onboarding.tsx, and ruby/logs.tsx, comparing their snippets with sentry-ruby 7.x behavior. Remove the config.enable_logs = true guidance and update the version note and structured logging guidance to match 7.0.0/7.1.0 changes. Done means the Ruby and Rails onboarding snippets no longer show the removed option and the logs copy reflects current 7.x setup.

Written by the indexing model from the issue text.

Description

Bug Component: Onboarding

The Ruby and Rails onboarding snippets tell users to set config.enable_logs = true. sentry-ruby removed that option in 7.0.0, so on current SDK versions (7.x, latest 7.2.0) the snippet raises NoMethodError in Sentry.init. Reported by a customer setting up Rails with sentry-ruby 7.2.0.

Affected onboarding code (pinned to f182595):

SDK changes behind this:

  • 7.0.0, getsentry/sentry-ruby#3053: logs are enabled by default and enable_logs is removed. No compatibility shim remains
  • 7.1.0, getsentry/sentry-ruby#3102: Rails structured logging is off by default. Turn it on with config.rails.structured_logging.enabled = true

Workaround: drop the config.enable_logs = true line.

Open question: whether config.enabled_patches = [:logger] is still the recommended setup on 7.x.

cc @getsentry/value-discovery (CODEOWNERS for gettingStartedDocs) @sl0thentr0py (sentry-ruby)

via @danielsheccoury-sentry.

--

View Session in Sentry

Dominant language
Python
Stars
45.7k
Forks
5k
Avg merge
1d 1h
Merged PRs (30d)
642

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getsentry/sentry

All issues in getsentry/sentry

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.