sentry-ruby (a.k.a. Ruby SDK 4.0)
The new sentry-ruby (a.k.a. Ruby SDK 4.0) will be a completely new gem. Its structure and main interfaces will follow the SDK guideline. This issue is to give the community a look at the future plan of the Ruby SDK and gather feedback from the users.
Please notice that things can change after the work begins. So nothing is guaranteed at this stage.
Things that may be different
- The top-level namespace will be
Sentry instead of Raven
- This gem will have a different structure than the old one (see the New Structure section)
- Some old API/components will be dropped/renamed
- Some new concepts/components will be added
- Configuration will be cascading
config.rails.report_rescued_exceptions = true
# instead of
config.rails_report_rescued_exceptions = true
New APIs will be type-checked by sorbet
- Ruby 2.3, 2.4 and Rails 4.2 might not be supported
- Integrations like
Rails or Sidekiq will be extracted to standalone gems like sentry-rails or sentry-sidekiq
Things that may remain the same
- Most integrations should work in the same way (but can have different configuration option)
- Release/environment detection
New Structure
# Usages
Sentry.init do |config|
config.dsn = 'http://public@example.com/project-1'
end
Sentry.capture_message(message)
Sentry.capture_exception(exception)
event_id = Sentry.last_event_id
# the above is equivalant to
hub = Sentry.current_hub
hub.capture_message(message)
event_id = hub.last_event_id
# one of the biggest differences will be the new concept of Hub
# a Hub consists of a Client and 1 or many Scope
hub = Sentry::Hub.new(client, scope)
# and you can have multiple hubs with different clients/scopes at the same time
# for example:
client2 = Client.new
client2.configuration.dsn = 'http://public@example.com/project-2'
hub2 = Sentry::Hub.new(client2, scope2)
# this hub will send events to the project-2
hub2.capture_message(message)
Todos
send_default_pii is opt-in (default: false)
and if it's set to false we should not send any PII info with the SDK. usually this is request body, cookies, user IP address
only if the option is true we send those info
since we removed all the sanitze code in 4.0 we need at least that
sentry-ruby (a.k.a. Ruby SDK
4.0)The new
sentry-ruby(a.k.a. Ruby SDK4.0) will be a completely new gem. Its structure and main interfaces will follow the SDK guideline. This issue is to give the community a look at the future plan of the Ruby SDK and gather feedback from the users.Please notice that things can change after the work begins. So nothing is guaranteed at this stage.
Things that may be different
Sentryinstead ofRavenNew APIs will be type-checked by sorbetRailsorSidekiqwill be extracted to standalone gems likesentry-railsorsentry-sidekiqThings that may remain the same
New Structure
Todos
send_default_piioptionsentry-railssentry-delayed-jobsentry-sidekiq