Class: Skylight::Probes::Middleware::Probe Private
- Defined in:
- lib/skylight/probes/middleware.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
Modules: InstanceInstrumentation
Constant Summary collapse
- DISABLED_KEY =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
:__skylight_middleware_disabled
Class Method Summary collapse
- .add_instrumentation(middleware) ⇒ Object private
- .disable! ⇒ Object private
- .disabled? ⇒ Boolean private
- .enable! ⇒ Object private
Instance Method Summary collapse
- #install ⇒ Object private
Class Method Details
.add_instrumentation(middleware) ⇒ 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.
113 114 115 |
# File 'lib/skylight/probes/middleware.rb', line 113 def self.add_instrumentation(middleware) middleware.singleton_class.prepend(InstanceInstrumentation) end |
.disable! ⇒ 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.
48 49 50 |
# File 'lib/skylight/probes/middleware.rb', line 48 def self.disable! @disabled = true end |
.disabled? ⇒ 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.
56 57 58 |
# File 'lib/skylight/probes/middleware.rb', line 56 def self.disabled? !!@disabled end |
.enable! ⇒ 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.
52 53 54 |
# File 'lib/skylight/probes/middleware.rb', line 52 def self.enable! @disabled = false 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.
117 118 119 120 121 122 123 |
# File 'lib/skylight/probes/middleware.rb', line 117 def install if defined?(::ActionDispatch::MiddlewareStack::InstrumentationProxy) ::ActionDispatch::MiddlewareStack::InstrumentationProxy.prepend(InstrumentationExtensions) else ::ActionDispatch::MiddlewareStack::Middleware.prepend(Instrumentation) end end |