5.9.0
Features
-
Add new boolean option
config.enable_tracingto simplify enabling performance tracing #2005config.enable_tracing = truewill settraces_sample_rateto1.0if not set alreadyconfig.enable_tracing = falsewill turn off tracing even iftraces_sample_rate/traces_sampleris setconfig.enable_tracing = nil(default) will keep the current behaviour
-
Allow ignoring
excluded_exceptionswhen manually capturing exceptions #2007Users can now ignore the SDK's
excluded_exceptionsby passingignore_exclusionshint when usingSentry.capture_exception.# assume ignored_exception.class is included in config.excluded_exception Sentry.capture_exception(ignored_exception) # won't be sent to Sentry Sentry.capture_exception(ignored_exception, hint: { ignore_exclusions: true }) # will be sent to Sentry
-
Support capturing low-level errors propagated to Puma #2026
-
Add
spectoBacktrace::APP_DIRS_PATTERN#2029 -
Forward all
baggageheader items that are prefixed withsentry-#2025 -
Add
stackprofbased profiler #2024The SDK now supports sending profiles taken by the
stackprofgem and viewing them in the Profiling section.To use it, first add
stackprofto yourGemfileand make sure it is loaded beforesentry-ruby.# Gemfile gem 'stackprof' gem 'sentry-ruby'
Then, make sure both
traces_sample_rateandprofiles_sample_rateare set and non-zero in your sentry initializer.# config/initializers/sentry.rb Sentry.init do |config| config.dsn = "<dsn>" config.traces_sample_rate = 1.0 config.profiles_sample_rate = 1.0 end
Some implementation caveats:
- Profiles are sampled relative to traces, so if both rates are 0.5, we will capture 0.25 of all requests.
- Profiles are only captured for code running within a transaction.
- Profiles for multi-threaded servers like
pumamight not capture frames correctly when async I/O is happening. This is astackproflimitation.
Warning
Profiling is currently in beta. Beta features are still in-progress and may have bugs. We recognize the irony.
If you have any questions or feedback, please email us at profiling@sentry.io, reach out via Discord (#profiling), or open an issue.