Module: Datadog::Contrib::Faraday::Patcher
- Defined in:
- lib/ddtrace/contrib/faraday/patcher.rb
Overview
Responsible for hooking the instrumentation into faraday
Class Method Summary collapse
Class Method Details
.patch ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ddtrace/contrib/faraday/patcher.rb', line 12 def patch return @patched if patched? || !compatible? require 'ddtrace/ext/app_types' require 'ddtrace/contrib/faraday/middleware' add_pin add_middleware @patched = true rescue => e Tracer.log.error("Unable to apply Faraday integration: #{e}") @patched end |
.patched? ⇒ Boolean
27 28 29 |
# File 'lib/ddtrace/contrib/faraday/patcher.rb', line 27 def patched? @patched end |