Class: ElasticAPM::Spies::FaradaySpy Private
- Inherits:
-
Object
- Object
- ElasticAPM::Spies::FaradaySpy
- Defined in:
- lib/elastic_apm/spies/faraday.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: Ext
Constant Summary collapse
- DISABLE_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.
:__elastic_apm_faraday_disabled
- TYPE =
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.
'external'
- SUBTYPE =
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.
'http'
Class Method Summary collapse
- .disable_in ⇒ Object private
- .disabled=(disabled) ⇒ Object private
- .disabled? ⇒ Boolean private
Instance Method Summary collapse
-
#install ⇒ Object
private
rubocop:enable Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity.
Class Method Details
.disable_in ⇒ 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.
38 39 40 41 42 43 44 45 46 |
# File 'lib/elastic_apm/spies/faraday.rb', line 38 def disable_in self.disabled = true begin yield ensure self.disabled = false end end |
.disabled=(disabled) ⇒ 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.
30 31 32 |
# File 'lib/elastic_apm/spies/faraday.rb', line 30 def disabled=(disabled) Thread.current[DISABLE_KEY] = disabled 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.
34 35 36 |
# File 'lib/elastic_apm/spies/faraday.rb', line 34 def disabled? Thread.current[DISABLE_KEY] ||= 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.
rubocop:enable Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity
140 141 142 |
# File 'lib/elastic_apm/spies/faraday.rb', line 140 def install ::Faraday::Connection.prepend(Ext) end |