Module: Datadog::Monkey
- Defined in:
- lib/ddtrace/monkey.rb
Overview
TODO: Remove me! Monkey was used for monkey-patching 3rd party libs. It is now DEPRECATED. This API is no-op, and serves only to warn of its deactivation.
Constant Summary collapse
- DEPRECATION_WARNING =
%( Datadog::Monkey has been REMOVED as of version 0.11.1. All calls to Datadog::Monkey are no-ops. *Implementations using Monkey will no longer function*. Upgrade to the new configuration API using the migration guide here: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.11.0).freeze
Class Attribute Summary collapse
Class Method Summary collapse
- .autopatch_modules ⇒ Object
- .get_patched_modules ⇒ Object
- .log_deprecation_warning(method) ⇒ Object
- .patch(modules) ⇒ Object
- .patch_all ⇒ Object
- .patch_module(m) ⇒ Object
- .without_warnings(&block) ⇒ Object
Class Attribute Details
.registry ⇒ Object
18 19 20 21 |
# File 'lib/ddtrace/monkey.rb', line 18 def registry log_deprecation_warning('Monkey#registry') @registry end |
Class Method Details
.autopatch_modules ⇒ Object
23 24 25 26 |
# File 'lib/ddtrace/monkey.rb', line 23 def autopatch_modules log_deprecation_warning('Monkey#autopatch_modules') {} end |
.get_patched_modules ⇒ Object
40 41 42 43 |
# File 'lib/ddtrace/monkey.rb', line 40 def get_patched_modules log_deprecation_warning('Monkey#get_patched_modules') {} end |
.log_deprecation_warning(method) ⇒ Object
50 51 52 |
# File 'lib/ddtrace/monkey.rb', line 50 def log_deprecation_warning(method) Datadog::Tracer.log.warn("#{method}:#{DEPRECATION_WARNING}") end |
.patch(modules) ⇒ Object
36 37 38 |
# File 'lib/ddtrace/monkey.rb', line 36 def patch(modules) log_deprecation_warning('Monkey#patch') end |
.patch_all ⇒ Object
28 29 30 |
# File 'lib/ddtrace/monkey.rb', line 28 def patch_all log_deprecation_warning('Monkey#patch_all') end |
.patch_module(m) ⇒ Object
32 33 34 |
# File 'lib/ddtrace/monkey.rb', line 32 def patch_module(m) log_deprecation_warning('Monkey#patch_module') end |
.without_warnings(&block) ⇒ Object
45 46 47 48 |
# File 'lib/ddtrace/monkey.rb', line 45 def without_warnings(&block) log_deprecation_warning('Monkey#without_warnings') Datadog::Patcher.without_warnings(&block) end |