Skip to content

Conversation

@solnic
Copy link
Collaborator

@solnic solnic commented Jan 12, 2026

Introduce config.std_lib_logger_filter configuration option to allow users to define a custom filter for log messages sent to Sentry via the standard library logger integration.

Example usage:

Sentry.init do |config|
  config.std_lib_logger_filter = proc do |logger, message, severity|
    # Only send ERROR and above messages
    severity == :error || severity == :fatal
  end

  config.enabled_patches = [:std_lib_logger]
end

Closes #2823

Introduce `config.std_lib_logger_filter` configuration option to allow
users to define a custom filter for log messages sent to Sentry via the
standard library logger integration.

Example usage:

```ruby
Sentry.init do |config|
  config.std_lib_logger_filter = proc do |logger, message, severity|
    # Only send ERROR and above messages
    severity == :error || severity == :fatal
  end

  config.enabled_patches = [:std_lib_logger]
end
```
@github-actions
Copy link

github-actions bot commented Jan 12, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against df2bed6

@solnic solnic marked this pull request as ready for review January 12, 2026 12:55
@solnic solnic requested a review from sl0thentr0py January 12, 2026 12:55
@solnic solnic requested a review from dingsdax January 12, 2026 12:55
Copy link
Member

@sl0thentr0py sl0thentr0py left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@solnic solnic merged commit 8b8bad5 into master Jan 12, 2026
137 checks passed
@solnic solnic deleted the 2823-add-std-lib-logger-filter branch January 12, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sentry logs not respecting Sidekiq/ActiveJob logs configuration?

4 participants