Skip to content

Commit

Permalink
Add early-return so that Vernier::Profiler won't be defined if vernie…
Browse files Browse the repository at this point in the history
…r is not bundled
  • Loading branch information
solnic committed Sep 3, 2024
1 parent dd7fdf9 commit f1116ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sentry-ruby/lib/sentry/vernier/profiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
begin
require "vernier"
rescue LoadError
return
end

module Sentry
Expand All @@ -22,7 +23,7 @@ def initialize(configuration)
@started = false
@sampled = nil

@profiling_enabled = defined?(Vernier) && configuration.profiling_enabled?
@profiling_enabled = configuration.profiling_enabled?
@profiles_sample_rate = configuration.profiles_sample_rate
@project_root = configuration.project_root
@app_dirs_pattern = configuration.app_dirs_pattern
Expand Down

0 comments on commit f1116ce

Please sign in to comment.