Class: ElasticAPM::Spies::SneakersSpy Private
- Inherits:
-
Object
- Object
- ElasticAPM::Spies::SneakersSpy
- Includes:
- Logging
- Defined in:
- lib/elastic_apm/spies/sneakers.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: Middleware
Constant Summary
Constants included from Logging
Logging::LEVELS, Logging::PREFIX
Class Method Summary collapse
- .supported_version? ⇒ Boolean private
Instance Method Summary collapse
- #install ⇒ Object private
Methods included from Logging
#debug, #error, #fatal, #info, #warn
Class Method Details
.supported_version? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
27 28 29 |
# File 'lib/elastic_apm/spies/sneakers.rb', line 27 def self.supported_version? Gem.loaded_specs['sneakers'].version >= Gem::Version.create('2.12.0') end |
Instance Method Details
#install ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/elastic_apm/spies/sneakers.rb', line 31 def install unless SneakersSpy.supported_version? warn( 'Sneakers version is below 2.12.0. Sneakers spy installation failed' ) return end Sneakers.middleware.use(Middleware, nil) end |