lib/oboe-heroku/base.rb in oboe-heroku-0.9.17.8 vs lib/oboe-heroku/base.rb in oboe-heroku-0.9.18.1

- old
+ new

@@ -29,12 +29,12 @@ module OboeBase extend ::Oboe::ThreadLocal attr_accessor :reporter attr_accessor :loaded - attr_accessor :sample_source - attr_accessor :sample_rate + thread_local :sample_source + thread_local :sample_rate thread_local :layer thread_local :layer_op # The following accessors indicate the incoming tracing state received # by the rack layer. These are primarily used to identify state @@ -181,10 +181,15 @@ ## # Determines if we are running under a forking webserver # def forking_webserver? - (defined?(::Unicorn) && ($PROGRAM_NAME =~ /unicorn/i)) ? true : false + if (defined?(::Unicorn) && ($PROGRAM_NAME =~ /unicorn/i)) || + (defined?(::Puma) && ($PROGRAM_NAME =~ /puma/i)) + true + else + false + end end ## # Indicates whether a supported framework is in use # or not