Class: Skylight::Probes::HTTPClient::Probe Private
- Defined in:
- lib/skylight/probes/httpclient.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.
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_httpclient_disabled
Class Method Summary collapse
- .disable ⇒ Object private
- .disabled? ⇒ Boolean private
Instance Method Summary collapse
- #install ⇒ Object private
Class Method Details
.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.
24 25 26 27 28 29 30 |
# File 'lib/skylight/probes/httpclient.rb', line 24 def self.disable old_value = Thread.current[DISABLED_KEY] Thread.current[DISABLED_KEY] = true yield ensure Thread.current[DISABLED_KEY] = old_value 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.
32 33 34 |
# File 'lib/skylight/probes/httpclient.rb', line 32 def self.disabled? !!Thread.current[DISABLED_KEY] 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.
36 37 38 |
# File 'lib/skylight/probes/httpclient.rb', line 36 def install ::HTTPClient.prepend(Instrumentation) end |