Set Up Profiling
Ruby Profiling is currently in beta. Beta features are still in progress and may have bugs. We recognize the irony.
With profiling, Sentry allows you to collect and analyze performance profiles from real user devices in production to give you a complete picture of how your application performs in a variety of environments.
Profiling depends on Sentry’s performance monitoring product being enabled beforehand. To enable performance monitoring in the SDK:
Sentry.init do |config| config.dsn = 'https://examplePublicKey@o0.ingest.sentry.io/0' config.traces_sample_rate = 1.0 end
Check out the performance setup documentation for more detailed information on how to configure sampling. Setting the sample rate to 1.0 means all transactions will be captured.
Ruby profiling beta is available starting in SDK version
We use the
stackprof gem to collect profiles for Ruby.
stackprof to your
Gemfile and make sure it is loaded before
# Gemfile gem 'stackprof' gem 'sentry-ruby'
Then, make sure both
profiles_sample_rate are set and non-zero in your Sentry initializer.
# config/initializers/sentry.rb Sentry.init do |config| config.dsn = "https://examplePublicKey@o0.ingest.sentry.io/0" config.traces_sample_rate = 1.0 config.profiles_sample_rate = 1.0 end
profiles_sample_rate setting is relative to the