Module: Datadog::Patcher

Extended by:
CommonMethods
Defined in:
lib/ddtrace/patcher.rb

Overview

Deprecated: This module should no longer be included. It's only being kept around for backwards compatibility concerns regarding customer usage.

Defined Under Namespace

Modules: CommonMethods

Constant Summary collapse

INCLUDED_WARN_ONLY_ONCE =
Datadog::Utils::OnlyOnce.new
DO_ONCE_USAGE_WARN_ONLY_ONCE =
Datadog::Utils::OnlyOnce.new

Class Method Summary collapse

Methods included from CommonMethods

do_once, done?, without_warnings

Class Method Details

.included(base) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/ddtrace/patcher.rb', line 11

def self.included(base)
  INCLUDED_WARN_ONLY_ONCE.run do
    Datadog.logger.warn(
      'Including Datadog::Patcher is deprecated. ' \
      'For the #do_once behavior, use Datadog::Utils::OnlyOnce instead. ' \
      'For the #without_warnings behavior, use Datadog::Patcher.without_warnings { ... } as a module function.'
    )
  end

  base.extend(CommonMethods)
  base.include(CommonMethods)
end