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
20 21 22 23 |
# File 'lib/ddtrace/monkey.rb', line 20 def registry log_deprecation_warning('Monkey#registry') @registry end |
Class Method Details
.autopatch_modules ⇒ Object
25 26 27 28 |
# File 'lib/ddtrace/monkey.rb', line 25 def autopatch_modules log_deprecation_warning('Monkey#autopatch_modules') {} end |
.get_patched_modules ⇒ Object
42 43 44 45 |
# File 'lib/ddtrace/monkey.rb', line 42 def get_patched_modules log_deprecation_warning('Monkey#get_patched_modules') {} end |
.log_deprecation_warning(method) ⇒ Object
52 53 54 |
# File 'lib/ddtrace/monkey.rb', line 52 def log_deprecation_warning(method) Datadog::Tracer.log.warn("#{method}:#{DEPRECATION_WARNING}") end |
.patch(modules) ⇒ Object
38 39 40 |
# File 'lib/ddtrace/monkey.rb', line 38 def patch(modules) log_deprecation_warning('Monkey#patch') end |
.patch_all ⇒ Object
30 31 32 |
# File 'lib/ddtrace/monkey.rb', line 30 def patch_all log_deprecation_warning('Monkey#patch_all') end |
.patch_module(m) ⇒ Object
34 35 36 |
# File 'lib/ddtrace/monkey.rb', line 34 def patch_module(m) log_deprecation_warning('Monkey#patch_module') end |
.without_warnings(&block) ⇒ Object
47 48 49 50 |
# File 'lib/ddtrace/monkey.rb', line 47 def without_warnings(&block) log_deprecation_warning('Monkey#without_warnings') Datadog::Patcher.without_warnings(&block) end |